<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
		<link>https://forum.iredmail.org/topic17897-solved-after-roundcube-update-502-bad-gateway-error.html</link>
		<atom:link href="https://forum.iredmail.org/feed-rss-topic17897.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Solved: After Roundcube Update "502 Bad Gateway" error..]]></description>
		<lastBuildDate>Sun, 14 Mar 2021 11:21:51 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post79076.html#p79076</link>
			<description><![CDATA[<div class="quotebox"><cite>mike175de wrote:</cite><blockquote><p>Hey there,</p><p>I can confirm that the latest php-update within Buster overwrites the /etc/php/7.3/fpm/pool.d/www.conf</p><p>To get Roundcube running again, just rename the dpk-backup of the file to <a href="http://www.conf">www.conf</a>, restart fpm and nginx and everything is working again.</p><p>Greets mike</p></blockquote></div><p>Thanks, Mike and Zhang! That did the trick! Save me from setting up a new virtual machine.</p>]]></description>
			<author><![CDATA[null@example.com (kiil)]]></author>
			<pubDate>Sun, 14 Mar 2021 11:21:51 +0000</pubDate>
			<guid>https://forum.iredmail.org/post79076.html#p79076</guid>
		</item>
		<item>
			<title><![CDATA[Re: Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post79011.html#p79011</link>
			<description><![CDATA[<p>Hey there,</p><p>I can confirm that the latest php-update within Buster overwrites the /etc/php/7.3/fpm/pool.d/www.conf</p><p>To get Roundcube running again, just rename the dpk-backup of the file to <a href="http://www.conf">www.conf</a>, restart fpm and nginx and everything is working again.</p><p>Here the specific entries of /etc/php/7.3/fpm/pool.d/www.conf:<br /></p><div class="codebox"><pre><code>[inet]
user = www-data
group = www-data

listen = 127.0.0.1:9999
listen.owner = www-data
listen.group = www-data
listen.mode = 0660

; IP addresses must be separated by comma, and no space between comma and ip.
listen.allowed_clients = 127.0.0.1

pm = dynamic
pm.max_children = 100
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 10
pm.max_requests = 100

pm.status_path = /status
ping.path = /ping

request_terminate_timeout = 60s
request_slowlog_timeout = 10s

;
; Log files
;
access.log = /var/log/php-fpm/php-fpm.log
slowlog = /var/log/php-fpm/slow.log</code></pre></div><p>Greets mike</p>]]></description>
			<author><![CDATA[null@example.com (mike175de)]]></author>
			<pubDate>Wed, 03 Mar 2021 14:08:59 +0000</pubDate>
			<guid>https://forum.iredmail.org/post79011.html#p79011</guid>
		</item>
		<item>
			<title><![CDATA[Re: Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post78955.html#p78955</link>
			<description><![CDATA[<p>This is not caused by upgrading Roundcube, i guess you upgraded Debian OS from 9 to 10?</p><p>Do you have file /etc/php/7.1/fpm/pool.d/www.conf which was generated by iRedMail installer? If yes, simply copy it to /etc/php7.3/fpm/pool.d/www.conf and restart php7.3-fpm service will fix your issue.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Sat, 27 Feb 2021 03:35:45 +0000</pubDate>
			<guid>https://forum.iredmail.org/post78955.html#p78955</guid>
		</item>
		<item>
			<title><![CDATA[Re: Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post78940.html#p78940</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>Check file /etc/php/7.3/fpm/pool.d/www.conf, is it listening on port 9999 or a different one?</p></blockquote></div><p>It is not assigned to a specific port. Here is the entire Listen portion:</p><div class="codebox"><pre><code>; The address on which to accept FastCGI requests.
; Valid syntaxes are:
;   &#039;ip.add.re.ss:port&#039;    - to listen on a TCP socket to a specific IPv4 address on
;                            a specific port;
;   &#039;[ip:6:addr:ess]:port&#039; - to listen on a TCP socket to a specific IPv6 address on
;                            a specific port;
;   &#039;port&#039;                 - to listen on a TCP socket to all addresses
;                            (IPv6 and IPv4-mapped) on a specific port;
;   &#039;/path/to/unix/socket&#039; - to listen on a unix socket.
; Note: This value is mandatory.
listen = /run/php/php7.3-fpm.sock
;listen = 9000
; Set listen(2) backlog.
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
;listen.backlog = 511

; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many
; BSD-derived systems allow connections regardless of permissions. The owner
; and group can be specified either by name or by their numeric IDs.
; Default Values: user and group are set as the running user
;                 mode is set to 0660
listen.owner = www-data
listen.group = www-data
;listen.mode = 0660
; When POSIX Access Control Lists are supported you can set them using
; these options, value is a comma separated list of user/group names.
; When set, listen.owner and listen.group are ignored
;listen.acl_users =
;listen.acl_groups =

; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
; must be separated by a comma. If this value is left blank, connections will be
; accepted from any ip address.
; Default Value: any
;listen.allowed_clients = 127.0.0.1</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kiil)]]></author>
			<pubDate>Fri, 26 Feb 2021 07:09:08 +0000</pubDate>
			<guid>https://forum.iredmail.org/post78940.html#p78940</guid>
		</item>
		<item>
			<title><![CDATA[Re: Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post78939.html#p78939</link>
			<description><![CDATA[<p>Check file /etc/php/7.3/fpm/pool.d/www.conf, is it listening on port 9999 or a different one?</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Fri, 26 Feb 2021 04:36:30 +0000</pubDate>
			<guid>https://forum.iredmail.org/post78939.html#p78939</guid>
		</item>
		<item>
			<title><![CDATA[Re: Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post78918.html#p78918</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><div class="quotebox"><cite>kiil wrote:</cite><blockquote><p>2021/02/25 07:16:23 [error] 7262#7262: *2119 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: _, request: &quot;GET /mail/ HTTP/2.0&quot;, upstream: &quot;fastcgi://127.0.0.1:9999&quot;, host: &quot;xx.xx.xx&quot;</p></blockquote></div><p>it says &quot;connection refused&quot; which means php-fpm service is not running.</p></blockquote></div><p>As above:<br /></p><div class="codebox"><pre><code>root@kiil-xx:~# service php7.3-fpm status
● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2021-02-21 16:37:33 CET; 15h ago
     Docs: man:php-fpm7.3(8)
 Main PID: 7265 (php-fpm7.3)
   Status: &quot;Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec&quot;
    Tasks: 3 (limit: 4915)
   Memory: 16.0M
   CGroup: /system.slice/php7.3-fpm.service
           ├─7265 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
           ├─7266 php-fpm: pool www
           └─7267 php-fpm: pool www

Feb 21 16:37:33 kiil-xx systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Feb 21 16:37:33 kiil-xx php-fpm[7265]: [NOTICE] fpm is running, pid 7265
Feb 21 16:37:33 kiil-xx php-fpm[7265]: [NOTICE] ready to handle connections
Feb 21 16:37:33 kiil-xx systemd[1]: Started The PHP 7.3 FastCGI Process Manager.
Feb 21 16:37:33 kiil-xx php-fpm[7265]: [NOTICE] systemd monitor interval set to 10000ms</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kiil)]]></author>
			<pubDate>Thu, 25 Feb 2021 10:47:39 +0000</pubDate>
			<guid>https://forum.iredmail.org/post78918.html#p78918</guid>
		</item>
		<item>
			<title><![CDATA[Re: Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post78917.html#p78917</link>
			<description><![CDATA[<div class="quotebox"><cite>kiil wrote:</cite><blockquote><p>2021/02/25 07:16:23 [error] 7262#7262: *2119 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: _, request: &quot;GET /mail/ HTTP/2.0&quot;, upstream: &quot;fastcgi://127.0.0.1:9999&quot;, host: &quot;xx.xx.xx&quot;</p></blockquote></div><p>it says &quot;connection refused&quot; which means php-fpm service is not running.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Thu, 25 Feb 2021 10:31:13 +0000</pubDate>
			<guid>https://forum.iredmail.org/post78917.html#p78917</guid>
		</item>
		<item>
			<title><![CDATA[Re: Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post78912.html#p78912</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>Any related error in Nginx log file (/var/log/nginx/error.log)? and php-fpm log files?</p></blockquote></div><p>I had listed&nbsp; nginx error and access logs above. Here there are again in addition to php-fpm.log:</p><p>/var/log/nginx/error.log:<br /></p><div class="codebox"><pre><code>2021/02/25 07:16:23 [error] 7262#7262: *2119 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: _, request: &quot;GET /mail/ HTTP/2.0&quot;, upstream: &quot;fastcgi://127.0.0.1:9999&quot;, host: &quot;xx.xx.xx&quot;</code></pre></div><p>/var/log/nginx/access.log:<br /></p><div class="codebox"><pre><code>xx.xx.xx.xx- - [25/Feb/2021:07:16:23 +0100] &quot;GET /mail/ HTTP/2.0&quot; 502 166 &quot;-&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 11.2; rv:78.0) Gecko/20100101 Firefox/78.0 Waterfox/78.8.0&quot;</code></pre></div><p>/var/log/php-fpm/php-fpm.log:<br /></p><div class="codebox"><pre><code>Feb 25 07:16:13 kiil-xx php-fpm[7265]: [NOTICE] Terminating ...
Feb 25 07:16:13 kiil-xx php-fpm[7265]: [NOTICE] exiting, bye-bye!</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kiil)]]></author>
			<pubDate>Thu, 25 Feb 2021 06:24:25 +0000</pubDate>
			<guid>https://forum.iredmail.org/post78912.html#p78912</guid>
		</item>
		<item>
			<title><![CDATA[Re: Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post78902.html#p78902</link>
			<description><![CDATA[<p>Any related error in Nginx log file (/var/log/nginx/error.log)? and php-fpm log files?</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Thu, 25 Feb 2021 05:05:26 +0000</pubDate>
			<guid>https://forum.iredmail.org/post78902.html#p78902</guid>
		</item>
		<item>
			<title><![CDATA[Re: Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post78873.html#p78873</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>Is php-fpm service running?</p></blockquote></div><p>Yes:</p><div class="codebox"><pre><code>root@kiil-xx:~# service php7.3-fpm status
● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2021-02-21 16:37:33 CET; 15h ago
     Docs: man:php-fpm7.3(8)
 Main PID: 7265 (php-fpm7.3)
   Status: &quot;Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec&quot;
    Tasks: 3 (limit: 4915)
   Memory: 16.0M
   CGroup: /system.slice/php7.3-fpm.service
           ├─7265 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
           ├─7266 php-fpm: pool www
           └─7267 php-fpm: pool www

Feb 21 16:37:33 kiil-xx systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Feb 21 16:37:33 kiil-xx php-fpm[7265]: [NOTICE] fpm is running, pid 7265
Feb 21 16:37:33 kiil-xx php-fpm[7265]: [NOTICE] ready to handle connections
Feb 21 16:37:33 kiil-xx systemd[1]: Started The PHP 7.3 FastCGI Process Manager.
Feb 21 16:37:33 kiil-xx php-fpm[7265]: [NOTICE] systemd monitor interval set to 10000ms</code></pre></div><p>When I try with curl on <a href="https://mydomainname.com">https://mydomainname.com</a> I get a code 200</p><div class="codebox"><pre><code>root@kiil-xx:~# curl -i https://mydomainname.com/
HTTP/2 200
server: nginx
date: Mon, 22 Feb 2021 06:58:56 GMT
content-type: text/html
content-length: 78
last-modified: Sun, 08 Nov 2020 11:17:51 GMT
etag: &quot;5fa7d3df-4e&quot;
x-frame-options: sameorigin
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-download-options: noopen
x-permitted-cross-domain-policies: none
content-security-policy: default-src https: data: &#039;unsafe-inline&#039; &#039;unsafe-eval&#039;
referrer-policy: strict-origin
accept-ranges: bytes

&lt;html&gt;&lt;head&gt;&lt;meta HTTP-EQUIV=&quot;REFRESH&quot; content=&quot;0; url=/mail/&quot;&gt;&lt;/head&gt;&lt;/html&gt;</code></pre></div><p>But with <a href="https://mydomainname.com/mail">https://mydomainname.com/mail</a>&nbsp; I get an 301 code</p><div class="codebox"><pre><code>root@kiil-xx:~# curl -i https://mydomainname.com/mail
HTTP/2 301
server: nginx
date: Sun, 21 Feb 2021 18:26:52 GMT
content-type: text/html
content-length: 178
location: https://mydomainname.com/mail/
x-frame-options: sameorigin
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-download-options: noopen
x-permitted-cross-domain-policies: none
content-security-policy: default-src https: data: &#039;unsafe-inline&#039; &#039;unsafe-eval&#039;
referrer-policy: strict-origin

&lt;html&gt;
&lt;head&gt;&lt;title&gt;301 Moved Permanently&lt;/title&gt;&lt;/head&gt;
&lt;body bgcolor=&quot;white&quot;&gt;
&lt;center&gt;&lt;h1&gt;301 Moved Permanently&lt;/h1&gt;&lt;/center&gt;
&lt;hr&gt;&lt;center&gt;nginx&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre></div><p>While <a href="https://mydomainname.com/adminer">https://mydomainname.com/adminer</a> results in an error 502.</p><div class="codebox"><pre><code>root@kiil-xx:~# curl -i https://mydomainname.com/adminer
HTTP/2 502
server: nginx
date: Mon, 22 Feb 2021 07:05:23 GMT
content-type: text/html
content-length: 166

&lt;html&gt;
&lt;head&gt;&lt;title&gt;502 Bad Gateway&lt;/title&gt;&lt;/head&gt;
&lt;body bgcolor=&quot;white&quot;&gt;
&lt;center&gt;&lt;h1&gt;502 Bad Gateway&lt;/h1&gt;&lt;/center&gt;
&lt;hr&gt;&lt;center&gt;nginx&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kiil)]]></author>
			<pubDate>Mon, 22 Feb 2021 07:18:08 +0000</pubDate>
			<guid>https://forum.iredmail.org/post78873.html#p78873</guid>
		</item>
		<item>
			<title><![CDATA[Re: Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post78835.html#p78835</link>
			<description><![CDATA[<p>Is php-fpm service running?</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 22 Feb 2021 03:15:59 +0000</pubDate>
			<guid>https://forum.iredmail.org/post78835.html#p78835</guid>
		</item>
		<item>
			<title><![CDATA[Solved: After Roundcube Update "502 Bad Gateway" error.]]></title>
			<link>https://forum.iredmail.org/post78828.html#p78828</link>
			<description><![CDATA[<p>==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====<br />- iRedMail version (check /etc/iredmail-release): 1.3.2<br />- Deployed with iRedMail Easy or the downloadable installer?&nbsp; Installer<br />- Linux/BSD distribution name and version: Debian 10.8<br />- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP<br />- Web server (Apache or Nginx):&nbsp; Nginx<br />- Manage mail accounts with iRedAdmin-Pro?&nbsp; With iRedAdmin-Pro 4.8<br />- [IMPORTANT] Related original log or error message is required if you&#039;re experiencing an issue.<br />====</p><p>After updating Roundcube from 1.4.10 to 1.4.11 when trying to access <a href="https://mydomainname.com/mail">https://mydomainname.com/mail</a> as well as <a href="https://mydomainname.com/adminer">https://mydomainname.com/adminer</a> or even just <a href="https://mydomainname.com">https://mydomainname.com</a> I get an &quot;502 Bad Gateway&quot; error.</p><p>I am able to access <a href="https://mydomainname.com/iredadmin,">https://mydomainname.com/iredadmin,</a> <a href="https://mydomainname.com/SOGo">https://mydomainname.com/SOGo</a> and even <a href="https://mydomainname.com/netdata.">https://mydomainname.com/netdata.</a></p><p>Here are the relevant error log entry for Nginx for Roundcube as well as adminer.</p><p>Roundcube: </p><p>2021/02/21 07:49:57 [error] 17607#17607: *9226 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: _, request: &quot;GET /mail/ HTTP/2.0&quot;, upstream: &quot;fastcgi://127.0.0.1:9999&quot;, host: &quot;mydomainname.com&quot;</p><p>Adminer:</p><p>2021/02/21 07:51:39 [error] 17607#17607: *9226 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: _, request: &quot;GET /adminer?server=localhost HTTP/2.0&quot;, upstream: &quot;fastcgi://127.0.0.1:9999&quot;, host: &quot;mydomainname.com&quot;</p><p>Nginx access log entries: </p><p>xx.xx.xx.xx - - [21/Feb/2021:07:49:57 +0100] &quot;GET /mail/ HTTP/2.0&quot; 502 166 &quot;-&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 11.2; rv:78.0) Gecko/20100101 Firefox/78.0 Waterfox/78.6.0&quot;</p><p>xx.xx.xx.xx - - [21/Feb/2021:07:51:39 +0100] &quot;GET /adminer?server=localhost HTTP/2.0&quot; 502 166 &quot;-&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 11.2; rv:78.0) Gecko/20100101 Firefox/78.0 Waterfox/78.6.0&quot;</p><p>Any help would be greatly appreciated.</p>]]></description>
			<author><![CDATA[null@example.com (kiil)]]></author>
			<pubDate>Sun, 21 Feb 2021 08:04:55 +0000</pubDate>
			<guid>https://forum.iredmail.org/post78828.html#p78828</guid>
		</item>
	</channel>
</rss>
