1

Topic: Upgrade to Ubuntu 18.04 - Roundcube 502 Bad Gateway

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8 PGSQL Edition
- Deployed with iRedMail Easy or the downloadable installer? iRedMail Easy
- Linux/BSD distribution name and version: Linux Ubuntu 18.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- 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.
====

From Nginx Error Log:

2020/03/27 23:06:41 [crit] 17190#17190: *8 connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 98.247.186.101, server: _, request: "GET /mail/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7.2-fpm.sock:", host: "mail.longlookconsulting.com", referrer: "https://mail.longlookconsulting.com/"

When I try to access my Roundcube webmail site I get a 502 - Bad Gateway error. In my Nginx logs I am seeing the error above which appears to be looking for my sock file in unix:/var/run/php7.2-fpm.sock, but there is another nested folder that should be reflected in there (unix:/var/run/php/php7.2-fpm.sock). I have been messing with this all morning and I just cannot find what configuration file is being used to direct to that address above.

My /etc/php.7.2/fpm/pool.d/www.conf file has the following listen line which I thought would be used:

listen = /run/php/php7.2-fpm.sock

But it's clearly not doing the driving here, so I'm lost as to where this needs to be changed, and where I presume it was broken when I updated my server to Ubuntu 18.04.

----

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

2

Re: Upgrade to Ubuntu 18.04 - Roundcube 502 Bad Gateway

matt.harrop wrote:

listen = /run/php/php7.2-fpm.sock

Make sure it's same as the one used in Nginx.

3

Re: Upgrade to Ubuntu 18.04 - Roundcube 502 Bad Gateway

As far as I can tell this is the file that should be used - my sock file is just nested within an extra directory and I can't find where the server is configured to use /var/run/php7.2-fpm.sock rather than /var/run/php/php7.2-fpm.sock.

Is it not this file: /etc/php.7.2/fpm/pool.d/www.conf ?

4

Re: Upgrade to Ubuntu 18.04 - Roundcube 502 Bad Gateway

matt.harrop wrote:

Is it not this file: /etc/php.7.2/fpm/pool.d/www.conf ?

it's /etc/php/7.2/fpm/pool.d/www.conf. (slash instead of dot).

iRedMail configures php-fpm to listen on 127.0.0.1:9999 by default, not a local socket file. Please also update Nginx config file /etc/nginx/conf-enabled/php_fpm.conf to use this address.