1

Topic: Iredadmin upgrade now shows gateway error

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

Hello

I followed the guide posted on the iredmail website to upgrade the iredadmin panel from 1.2 to 1.8.1 but now the panel returns "502 Bad Gateway"

I am in no way a Linux expert and learning along the way but this has me stumped as google results bring up mixed results, I can post any information from any commands ran

Thank you for any help that is offered

Kind regards,

----

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

2

Re: Iredadmin upgrade now shows gateway error

- which iRedMail release are you running? Please show us full content of file /etc/iredmail-release.
- any related error in /var/log/syslog when visit iredadmin?

3 (edited by NovaWuff 2022-10-08 16:43:43)

Re: Iredadmin upgrade now shows gateway error

ZhangHuangbin wrote:

- which iRedMail release are you running? Please show us full content of file /etc/iredmail-release.
- any related error in /var/log/syslog when visit iredadmin?

Hi Zhang,

It is running "1.2 MariaDB edition"

I have attached the files directly from the VPS for your reference, it is in a zip folder with no password; the syslog last entries should be from when I tried to visit iredadmin. Like I said, everything was working fine until I ran "bash upgrade_iredadmin.sh" as per the guides instructions, if needed I can run it again and paste the output into here?

Kind regards,

Post's attachments

mail server.zip 44.48 kb, 2 downloads since 2022-10-08 

You don't have the permssions to download the attachments of this post.

4

Re: Iredadmin upgrade now shows gateway error

There's an error (not related to iRedAdmin) in log file and you should fix it first:

Oct  8 10:02:03 mail postfix/local[11220]: fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit

I didn't find iRedAdmin related log in attached file.
What's the output of command "service iredadmin status"?

5

Re: Iredadmin upgrade now shows gateway error

Good morning Zhang,

Pasting that command in

root@mail:~# service iredadmin status
● iredadmin.service - iRedAdmin daemon service
   Loaded: loaded (/lib/systemd/system/iredadmin.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2022-10-08 10:37:45 CEST; 41min ago
  Process: 500 ExecStartPre=/bin/chmod 0755 /var/run/iredadmin (code=exited, status=0/SUCCESS)
  Process: 495 ExecStartPre=/bin/chown iredadmin:iredadmin /var/run/iredadmin (code=exited, status=0/SUCCESS)
  Process: 459 ExecStartPre=/bin/mkdir -p /var/run/iredadmin (code=exited, status=0/SUCCESS)
 Main PID: 515 (uwsgi)
    Tasks: 6 (limit: 4680)
   CGroup: /system.slice/iredadmin.service
           ├─515 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pi
           ├─560 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pi
           ├─561 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pi
           ├─566 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pi
           ├─567 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pi
           └─568 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pi

Oct 08 10:37:45 mail.novaserve.co.uk iredadmin[515]: you may need to install the package for your language of choice, or simpl
Oct 08 10:37:45 mail.novaserve.co.uk iredadmin[515]: !!!!!!!!!!! END OF WARNING !!!!!!!!!!
Oct 08 10:37:45 mail.novaserve.co.uk iredadmin[515]: spawned uWSGI master process (pid: 515)
Oct 08 10:37:45 mail.novaserve.co.uk iredadmin[515]: spawned uWSGI worker 1 (pid: 560, cores: 1)
Oct 08 10:37:45 mail.novaserve.co.uk iredadmin[515]: spawned uWSGI worker 2 (pid: 561, cores: 1)
Oct 08 10:37:45 mail.novaserve.co.uk iredadmin[515]: spawned uWSGI worker 3 (pid: 566, cores: 1)
Oct 08 10:37:45 mail.novaserve.co.uk iredadmin[515]: spawned uWSGI worker 4 (pid: 567, cores: 1)
Oct 08 10:37:45 mail.novaserve.co.uk iredadmin[515]: spawned uWSGI worker 5 (pid: 568, cores: 1)
Oct 08 10:38:22 mail.novaserve.co.uk iredadmin[515]: -- unavailable modifier requested: 0 --
Oct 08 10:46:19 mail.novaserve.co.uk iredadmin[515]: -- unavailable modifier requested: 0 --

If you want any other files uploaded please let me know as I can grab them off the server no problem

Kind regards,

6

Re: Iredadmin upgrade now shows gateway error

- What's the full content of /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini?
- Any error on console if you run commands below?

cd /opt/www/iredadmin/
python3 iredadmin.py

7

Re: Iredadmin upgrade now shows gateway error

Good morning Zhang,

There are two folders for /www/iredadmin/ one being iredadmin-1.0 and the other iredadmin-1.8.1, I have attached both for your reference

Running the python command in 1.0 gives a syntax error

root@mail:/opt/www/iRedAdmin-1.0# python3 iredadmin.py
Traceback (most recent call last):
  File "iredadmin.py", line 9, in <module>
    from libs import iredbase
  File "/opt/www/iRedAdmin-1.0/libs/iredbase.py", line 202
    except Exception, e:
SyntaxError: invalid syntax

running it in the 1.8.1 folder gives a different error

root@mail:/opt/www/iRedAdmin-1.8.1# python3 iredadmin.py
Traceback (most recent call last):
  File "iredadmin.py", line 8, in <module>
    from libs import iredbase
  File "/opt/www/iRedAdmin-1.8.1/libs/iredbase.py", line 5, in <module>
    import web
ModuleNotFoundError: No module named 'web'

8

Re: Iredadmin upgrade now shows gateway error

Please try these commands:

pip3 install web.py
cd /opt/www/iRedAdmin-1.8.1/
python3 iredadmin.py

9

Re: Iredadmin upgrade now shows gateway error

Good morning Zhang,

Sorry in the delay getting back to you, I didn't get a notification to say you had responded (Computers are winding me up now!)

Running pip3 required an apt update, all that was sorted and seemed to have installed fine and claims everything was successful. running puthon3 iredadmin.py returned this:

root@mail:/opt/www/iRedAdmin-1.8.1# python3 iredadmin.py
Traceback (most recent call last):
  File "iredadmin.py", line 8, in <module>
    from libs import iredbase
  File "/opt/www/iRedAdmin-1.8.1/libs/iredbase.py", line 6, in <module>
    from jinja2 import Environment, FileSystemLoader
ModuleNotFoundError: No module named 'jinja2'
root@mail:/opt/www/iRedAdmin-1.8.1#

Should I try and re download the folder again to see if anything is missing?

Look forward to hearing from you,

Kind regards,

10

Re: Iredadmin upgrade now shows gateway error

- Did you upgrade server OS?
- Please re-download iRedAdmin-1.8.1 and run the upgrade script again, so that it can install required packages or python modules: https://docs.iredmail.org/migrate.or.up … admin.html

11

Re: Iredadmin upgrade now shows gateway error

Good morning Zhang,

Thank you for your help. The server OS was never upgraded so I disregarded that for now, followed the download instructions again and it worked, so something along the line seemed to add up!

Thank you ever so much for your help, running on 1.8.1 now!

Best of health to you smile

Kind regards,