1

Topic: New Install iRedAdmin and NGINX - 502 Bad Gateway

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

[root@mail ~]# service iredadmin status
Redirecting to /bin/systemctl status iredadmin.service
● iredadmin.service - iRedAdmin daemon service
   Loaded: loaded (/usr/lib/systemd/system/iredadmin.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 三 2020-10-28 23:46:17 CST; 11min ago
  Process: 13646 ExecStopPost=/usr/bin/rm -rf /var/run/iredadmin (code=exited, status=0/SUCCESS)
  Process: 13643 ExecStart=/usr/sbin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/iredadmin/iredadmin.pid (code=exited, status=1/FAILURE)
  Process: 13640 ExecStartPre=/usr/bin/chmod 0755 /var/run/iredadmin (code=exited, status=0/SUCCESS)
  Process: 13637 ExecStartPre=/usr/bin/chown iredadmin:iredadmin /var/run/iredadmin (code=exited, status=0/SUCCESS)
  Process: 13635 ExecStartPre=/usr/bin/mkdir /var/run/iredadmin (code=exited, status=0/SUCCESS)
Main PID: 13643 (code=exited, status=1/FAILURE)

10月 28 23:46:17 mail.* systemd[1]: Starting iRedAdmin daemon service...
10月 28 23:46:17 mail.* systemd[1]: Started iRedAdmin daemon service.
10月 28 23:46:17 mail.* uwsgi[13643]: realpath() of /opt/www/iredadmin/rc_scripts/uwsgi/rhel.ini failed: No such file or directory [core/utils.c line 3654]
10月 28 23:46:17 mail.* systemd[1]: iredadmin.service: main process exited, code=exited, status=1/FAILURE
10月 28 23:46:17 mail.* systemd[1]: Unit iredadmin.service entered failed state.
10月 28 23:46:17 mail.* systemd[1]: iredadmin.service failed.

Please assist troubleshooting. Here is the NGINX error log:
2020/10/28 23:35:03 [error] 12079#0: *375 connect() failed (111: Connection refused) while connecting to upstream, client: *, server: _, request: "GET /iredadmin HTTP/2.0", upstream: "uwsgi://127.0.0.1:7791", host: "mail.*"
2020/10/28 23:35:04 [error] 12079#0: *375 connect() failed (111: Connection refused) while connecting to upstream, client: *, server: _, request: "GET /iredadmin HTTP/2.0", upstream: "uwsgi://127.0.0.1:7791", host: "mail.*"
2020/10/28 23:35:04 [error] 12079#0: *375 connect() failed (111: Connection refused) while connecting to upstream, client: *, server: _, request: "GET /iredadmin HTTP/2.0", upstream: "uwsgi://127.0.0.1:7791", host: "mail.*"
2020/10/28 23:35:04 [error] 12079#0: *375 connect() failed (111: Connection refused) while connecting to upstream, client: *, server: _, request: "GET /iredadmin HTTP/2.0", upstream: "uwsgi://127.0.0.1:7791", host: "mail.*"
2020/10/28 23:35:04 [error] 12079#0: *375 connect() failed (111: Connection refused) while connecting to upstream, client: *, server: _, request: "GET /iredadmin HTTP/2.0", upstream: "uwsgi://127.0.0.1:7791", host: "mail.*"
2020/10/28 23:35:04 [error] 12079#0: *375 connect() failed (111: Connection refused) while connecting to upstream, client: *, server: _, request: "GET /iredadmin HTTP/2.0", upstream: "uwsgi://127.0.0.1:7791", host: "mail.*"

----

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

2

Re: New Install iRedAdmin and NGINX - 502 Bad Gateway

This is a new installation, there will be this error after the installation is complete, only iredadmin has an error, webmail everything is normal, you can send and receive mail

Please help me solve it, thank you

3

Re: New Install iRedAdmin and NGINX - 502 Bad Gateway

You can re-download iRedAdmin and upgrade to fix this issue, it's caused by the (iRedAdmin) upgrade script.
https://docs.iredmail.org/migrate.or.up … admin.html