1

Topic: IredAdmin version

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? Nope
- Linux/BSD distribution name and version: Debian
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Web server (Apache or Nginx): NGINX
- Manage mail accounts with iRedAdmin-Pro? Nope
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I followed the upgrade procedure from 0.9.8 to 0.9.9
Cause i have a remote mySQL database i needed to change the file "upgrade_iredadmin.sh" script root into the redmail database admin user.

After changing the line, it seems from the output (see logging below) version 0.9.3 is installed.

But after checking the webpage of iredadmin it still shows the older version and keeps asking to upgrade.


Logging:
* Detected Linux/BSD distribution: DEBIAN
* HTTP server root: /opt/www
* Found iRedAdmin directory: /opt/www/iredadmin, symbol link of iRedAdmin-0.9.3
* Found iRedAdmin config file: /opt/www/iredadmin/settings.py
* Copying new version to /opt/www/iRedAdmin-0.9.3
* Copy /opt/www/iredadmin/settings.py.
cp: '/opt/www/iredadmin/settings.py' and '/opt/www/iRedAdmin-0.9.3/settings.py' are the same file
* Remove existing systemd service files.
* Copy systemd service file: /lib/systemd/system/iredadmin.service.
* Removing old symbol link /opt/www/iredadmin
* Creating symbol link /opt/www/iredadmin to /opt/www/iRedAdmin-0.9.3
* Delete all existing sessions, admins are forced to re-login to iRedAdmin.
* Enable mlmmj integration.
mlmmjadmin_api_auth_token =
* Restarting service: mlmmjadmin.
* Check and install dependent Python modules:
  + [required] json or simplejson
  + [required] dnspython
  + [required] pycurl
  + [required] requests
  + [optional] BeautifulSoup
  + [optional] lxml
* Check SQL tables, and add missed ones - if there's any
* Clean up.
* iRedAdmin has been successfully upgraded.
* Restarting uwsgi service.
* Enable service: iredadmin
Created symlink /etc/systemd/system/multi-user.target.wants/iredadmin.service -> /lib/systemd/system/iredadmin.service.
* Upgrading completed.
<<< NOTE >>> If iRedAdmin doesn't work as expected, please post your issue in
<<< NOTE >>> our online support forum: http://www.iredmail.org/forum/

Do i miss something with the upgrade or did it fail cause of the user change?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: IredAdmin version

Try to restart 3 services:

- nginx
- uwsgi
- iredadmin

iRedAdmin was running by uwsgi service as a child instance in iRedMail-0.9.8 and earlier releases, but it's now a standalone network service since iRedMail-0.9.9.

3 (edited by Mrniceone 2018-12-28 23:29:19)

Re: IredAdmin version

I restarted all 3 service, same issue, after restarting server i get the error:

[crit] 277#277: *7 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: XX.XX.XX.XX, server: example.org, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/var/run/uwsgi_iredadmin.socket:", host: "example.org"

4 (edited by Mrniceone 2018-12-29 15:07:08)

Re: IredAdmin version

Yep got it, new config is needed with ired subdomain:

location / {
    root /opt/www/iredadmin;
    uwsgi_pass 127.0.0.1:7791;
    uwsgi_param UWSGI_CHDIR /opt/www/iredadmin;
    uwsgi_param UWSGI_SCRIPT iredadmin;
    include uwsgi_params;
}

up and running now and showing new version, thanks!

5

Re: IredAdmin version

Mrniceone wrote:

    uwsgi_pass 127.0.0.1:7791;
    uwsgi_param UWSGI_CHDIR /opt/www/iredadmin;
    uwsgi_param UWSGI_SCRIPT iredadmin;
    include uwsgi_params;

You can use these same settings in old /etc/nginx/templates/iredadmin.tmpl, no subdomain required.

What's the content of your /etc/nginx/templates/iredadmin.tmpl now?

6 (edited by Mrniceone 2018-12-29 15:12:13)

Re: IredAdmin version

Content is:

# Settings for iRedAdmin.

# static files under /iredadmin/static
location ~ ^/iredadmin/static/(.*) {
    alias /opt/www/iredadmin/static/$1;
}

# Handle newsletter-style subscription/unsubscription supported in iRedAdmin-Pro.
location ~ ^/newsletter/ {
    include /etc/nginx/templates/hsts.tmpl;

    include uwsgi_params;
    uwsgi_pass 127.0.0.1:7791;
    uwsgi_param UWSGI_CHDIR /opt/www/iredadmin;
    uwsgi_param UWSGI_SCRIPT iredadmin;
    uwsgi_param SCRIPT_NAME /iredadmin;
    uwsgi_param REQUEST_URI /iredadmin/$request_uri;
}

# Python scripts
location ~ ^/iredadmin(.*) {
    rewrite ^/iredadmin(/.*)$ $1 break;

    include /etc/nginx/templates/hsts.tmpl;

    include uwsgi_params;
    uwsgi_pass 127.0.0.1:7791;
    uwsgi_param UWSGI_CHDIR /opt/www/iredadmin;
    uwsgi_param UWSGI_SCRIPT iredadmin;
    uwsgi_param SCRIPT_NAME /iredadmin;

    # Access control
    #allow 127.0.0.1;
    #allow 192.168.1.10;
    #allow 192.168.1.0/24;
    #deny all;
}

# iRedAdmin: redirect /iredadmin to /iredadmin/
location = /iredadmin {
    rewrite ^ /iredadmin/;
}

Only the iredadmin templates have changed in the directory.
Maybe it is something to add to the upgrade manual?

I've iRedadmin as a subdomain, used the "subdomain"  template.
It is all working now, Thanks big_smile!