1

Topic: 502 Bad Gateway after migrating iRedMail-1.3.2-->iRedAdmin-Pro-SQL-4.4

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version: Debian 10.6 Linux 4.19.0-12-amd64
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): 10.3.25-MariaDB-0+deb10u1 Debian 10
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Trying to install/upgrade to Licensed version
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Upgrading log:
root@mailgate3:~/iRedAdmin-Pro-SQL-4.4/tools# bash ./upgrade_iredadmin.sh
* Detected Linux/BSD distribution: DEBIAN
* HTTP server root: /opt/www
* Found iRedAdmin directory: /opt/www/iredadmin, symbol link of /opt/www/iRedAdmin-1.2
* Found iRedAdmin config file: /opt/www/iredadmin/settings.py
* Copying new version to /opt/www/iRedAdmin-Pro-SQL-4.4
* Copy /opt/www/iredadmin/settings.py.
* 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-Pro-SQL-4.4
Traceback (most recent call last):
  File "delete_sessions.py", line 9, in <module>
    import web
ImportError: No module named web
* Enable mlmmj integration.
* Restarting service: mlmmjadmin.
* Check and install dependent Python modules:
  + [required] json or simplejson
  + [required] dnspython
Install package: python-dns
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  python-dns
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.8 kB of archives.
After this operation, 105 kB of additional disk space will be used.
Get:1 http://ftp.pl.debian.org/debian buster/main amd64 python-dns all 2.3.6-4 [28.8 kB]
Fetched 28.8 kB in 0s (96.7 kB/s)     
Selecting previously unselected package python-dns.
(Reading database ... 51454 files and directories currently installed.)
Preparing to unpack .../python-dns_2.3.6-4_all.deb ...
Unpacking python-dns (2.3.6-4) ...
Setting up python-dns (2.3.6-4) ...
  + [required] pycurl
Install package: python-pycurl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  libcurl4-gnutls-dev python-pycurl-dbg python-pycurl-doc
The following NEW packages will be installed:
  python-pycurl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 66.0 kB of archives.
After this operation, 196 kB of additional disk space will be used.
Get:1 http://ftp.pl.debian.org/debian buster/main amd64 python-pycurl amd64 7.43.0.2-0.1 [66.0 kB]
Fetched 66.0 kB in 0s (2808 kB/s)       
Selecting previously unselected package python-pycurl.
(Reading database ... 51477 files and directories currently installed.)
Preparing to unpack .../python-pycurl_7.43.0.2-0.1_amd64.deb ...
Unpacking python-pycurl (7.43.0.2-0.1) ...
Setting up python-pycurl (7.43.0.2-0.1) ...
  + [required] requests
Install package: python-requests
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  python-asn1crypto python-certifi python-cffi-backend python-chardet python-cryptography python-enum34 python-idna python-ipaddress
  python-openssl python-pkg-resources python-six python-urllib3
Suggested packages:
  python-cryptography-doc python-cryptography-vectors python-enum34-doc python-openssl-doc python-openssl-dbg python-setuptools python-socks
  python-ntlm
The following NEW packages will be installed:
  python-asn1crypto python-certifi python-cffi-backend python-chardet python-cryptography python-enum34 python-idna python-ipaddress
  python-openssl python-pkg-resources python-requests python-six python-urllib3
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 1096 kB of archives.
After this operation, 5003 kB of additional disk space will be used.
Get:1 http://ftp.pl.debian.org/debian buster/main amd64 python-asn1crypto all 0.24.0-1 [78.1 kB]
Get:2 http://ftp.pl.debian.org/debian buster/main amd64 python-certifi all 2018.8.24-1 [140 kB]
Get:3 http://ftp.pl.debian.org/debian buster/main amd64 python-cffi-backend amd64 1.12.2-1 [78.8 kB]
Get:4 http://ftp.pl.debian.org/debian buster/main amd64 python-pkg-resources all 40.8.0-1 [182 kB]
Get:5 http://ftp.pl.debian.org/debian buster/main amd64 python-chardet all 3.0.4-3 [80.6 kB]
Get:6 http://ftp.pl.debian.org/debian buster/main amd64 python-enum34 all 1.1.6-2 [35.3 kB]
Get:7 http://ftp.pl.debian.org/debian buster/main amd64 python-ipaddress all 1.0.17-1 [18.1 kB]
Get:8 http://ftp.pl.debian.org/debian buster/main amd64 python-six all 1.12.0-1 [15.7 kB]
Get:9 http://ftp.pl.debian.org/debian buster/main amd64 python-cryptography amd64 2.6.1-3+deb10u2 [218 kB]
Get:10 http://ftp.pl.debian.org/debian buster/main amd64 python-idna all 2.6-1 [34.1 kB]
Get:11 http://ftp.pl.debian.org/debian buster/main amd64 python-openssl all 19.0.0-1 [52.0 kB]
Get:12 http://ftp.pl.debian.org/debian buster/main amd64 python-urllib3 all 1.24.1-1 [97.0 kB]
Get:13 http://ftp.pl.debian.org/debian buster/main amd64 python-requests all 2.21.0-1 [67.1 kB]
Fetched 1096 kB in 0s (16.3 MB/s)         
Selecting previously unselected package python-asn1crypto.
(Reading database ... 51486 files and directories currently installed.)
Preparing to unpack .../00-python-asn1crypto_0.24.0-1_all.deb ...
Unpacking python-asn1crypto (0.24.0-1) ...
Selecting previously unselected package python-certifi.
Preparing to unpack .../01-python-certifi_2018.8.24-1_all.deb ...
Unpacking python-certifi (2018.8.24-1) ...
Selecting previously unselected package python-cffi-backend.
Preparing to unpack .../02-python-cffi-backend_1.12.2-1_amd64.deb ...
Unpacking python-cffi-backend (1.12.2-1) ...
Selecting previously unselected package python-pkg-resources.
Preparing to unpack .../03-python-pkg-resources_40.8.0-1_all.deb ...
Unpacking python-pkg-resources (40.8.0-1) ...
Selecting previously unselected package python-chardet.
Preparing to unpack .../04-python-chardet_3.0.4-3_all.deb ...
Unpacking python-chardet (3.0.4-3) ...
Selecting previously unselected package python-enum34.
Preparing to unpack .../05-python-enum34_1.1.6-2_all.deb ...
Unpacking python-enum34 (1.1.6-2) ...
Selecting previously unselected package python-ipaddress.
Preparing to unpack .../06-python-ipaddress_1.0.17-1_all.deb ...
Unpacking python-ipaddress (1.0.17-1) ...
Selecting previously unselected package python-six.
Preparing to unpack .../07-python-six_1.12.0-1_all.deb ...
Unpacking python-six (1.12.0-1) ...
Selecting previously unselected package python-cryptography.
Preparing to unpack .../08-python-cryptography_2.6.1-3+deb10u2_amd64.deb ...
Unpacking python-cryptography (2.6.1-3+deb10u2) ...
Selecting previously unselected package python-idna.
Preparing to unpack .../09-python-idna_2.6-1_all.deb ...
Unpacking python-idna (2.6-1) ...
Selecting previously unselected package python-openssl.
Preparing to unpack .../10-python-openssl_19.0.0-1_all.deb ...
Unpacking python-openssl (19.0.0-1) ...
Selecting previously unselected package python-urllib3.
Preparing to unpack .../11-python-urllib3_1.24.1-1_all.deb ...
Unpacking python-urllib3 (1.24.1-1) ...
Selecting previously unselected package python-requests.
Preparing to unpack .../12-python-requests_2.21.0-1_all.deb ...
Unpacking python-requests (2.21.0-1) ...
Setting up python-enum34 (1.1.6-2) ...
Setting up python-pkg-resources (40.8.0-1) ...
Setting up python-asn1crypto (0.24.0-1) ...
Setting up python-certifi (2018.8.24-1) ...
Setting up python-six (1.12.0-1) ...
Setting up python-idna (2.6-1) ...
Setting up python-chardet (3.0.4-3) ...
Setting up python-ipaddress (1.0.17-1) ...
Setting up python-cffi-backend (1.12.2-1) ...
Setting up python-urllib3 (1.24.1-1) ...
Setting up python-cryptography (2.6.1-3+deb10u2) ...
Setting up python-requests (2.21.0-1) ...
Setting up python-openssl (19.0.0-1) ...
Processing triggers for man-db (2.8.5-2) ...
* Check SQL tables, and add missed ones - if there's any
* Clean up.
* iRedAdmin has been successfully upgraded.
* Restarting iredadmin 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/

=====
root@mailgate3:~/iRedAdmin-Pro-SQL-4.4/tools# tail -f /var/log/nginx/error.log
2020/11/03 21:46:23 [error] 647#647: *373 upstream prematurely closed connection while reading response header from upstream, client: 212.x.x.x, server: _, request: "GET /iredadmin/ HTTP/2.0", upstream: "uwsgi://127.0.0.1:7791", host: "mailgate.server.domain"

=====
root@mailgate3:~/iRedAdmin-Pro-SQL-4.4/tools# cd /opt/www/iredadmin/                             
root@mailgate3:/opt/www/iredadmin# python3 iredadmin.py
Traceback (most recent call last):
  File "iredadmin.py", line 8, in <module>
    from libs import iredbase
  File "/opt/www/iRedAdmin-Pro-SQL-4.4/libs/iredbase.py", line 19, in <module>
    import iredutils
ModuleNotFoundError: No module named 'iredutils'

======
I can not download iRedAdmin-Pro-SQL-4.6 because i can not login into iredadmin after upgrading it to PRO version.
Is there a place to put login/password/licence id in iredadmin-Pro ?
Any idea?

----

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

2

Re: 502 Bad Gateway after migrating iRedMail-1.3.2-->iRedAdmin-Pro-SQL-4.4

Download link sent. for iRedAdmin-Pro, you can upgrade to iRedAdmin-Pro-SQL-4.6 directly.

3

Re: 502 Bad Gateway after migrating iRedMail-1.3.2-->iRedAdmin-Pro-SQL-4.4

ZhangHuangbin wrote:

Download link sent. for iRedAdmin-Pro, you can upgrade to iRedAdmin-Pro-SQL-4.6 directly.

Hi Zhang,

After upgrading directly to version iRedAdmin-Pro-SQL-4.6 it worked.

Thank you.
Piotr