1

Topic: NEW INSTALL 502 Bad Gateway (nginx)

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

from error log:
[error] 567#567: *23 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.9, server: xxxx.xxxxx.xxx, request: "GET /iredadmin/ HTTP/1.1", upstream: "uwsgi://127.0.0.1:7791", host: "xxxx.xxxxx.xxx"

I've tried everything posible but can't make it works..
any ideas will be really appreciated.
thank you!!

----

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 502 Bad Gateway (nginx)

"uwsgi://127.0.0.1:7791" is the iredadmin process, which according to your logs indicate that it is not running.
Check the status by running

/etc/init.d/uwsgi status

3

Re: NEW INSTALL 502 Bad Gateway (nginx)

I ignore why but It wasn't installed. I managed to install it and now this is the status
uwsgi.service - LSB: Start/stop uWSGI server instance(s)
   Loaded: loaded (/etc/init.d/uwsgi; generated)
   Active: active (exited) since Fri 2020-05-08 09:46:15 CEST; 7min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 7003 ExecStart=/etc/init.d/uwsgi start (code=exited, status=0/SUCCESS)

May 08 09:46:15 mail systemd[1]: Starting LSB: Start/stop uWSGI server instance(s)...
May 08 09:46:15 mail uwsgi[7003]: Starting app server(s): uwsgi (omitted; missing conffile(s) in /etc/uwsgi/apps-enabled).
May 08 09:46:15 mail systemd[1]: Started LSB: Start/stop uWSGI server instance(s).


502 Bad gateway still on /ireadmin and /netdata


I got this from error.log

error] 31832#31832: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.x.x,server: xxxx.xxxxx.xxx, request: "GET /netdata/ HTTP/1.1", upstream: "http://127.0.0.1:19999/", host: "xxxx.xxxx.xxx"

4

Re: NEW INSTALL 502 Bad Gateway (nginx)

I finally got /iredadmin/ working,
but /netdata/ sill on 502

5

Re: NEW INSTALL 502 Bad Gateway (nginx)

I finally got everything working.
I had to re-install Netdata and works fine.
thank you