Topic: netdata connection refused after upgrade to iredmail 1.6.3
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.1
- Deployed with iRedMail Easy or the downloadable installer? not sure, just ran upgrade
- Linux/BSD distribution name and version: Debian 12.6 bookworm
- 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.
====
I followed the tutorial to upgrade from 1.6.1 to 1.6.3. The only error I saw during the upgrade related to iRedAdmin, however iRedAdmin is working. I upgraded to the latest available versions of netdata and Roundcube because the versions listed in the tutorial were not available.
Now when I attempt to load https://mail.my.domain I get an error 502 Bad Gateway. The nginx error.log shows this:
2024/08/02 11:56:15 [error] 701#701: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: mail.my.domain, request: "GET /status?full&json HTTP/1.1", upstream: "fastcgi://127.0.0.1:9999", host: "127.0.0.1"
2024/08/02 11:57:00 [error] 701#701: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 104.37.148.71, server: mail.my.domain, request: "GET /mail/?_task=mail&_mbox=INBOX HTTP/2.0", upstream: "fastcgi://127.0.0.1:9999", host: "mail.my.domain", referrer: "[url]https://mail.my.domain/mail/?_task=mail&_mbox=INBOX[/url]"
2024/08/02 11:59:03 [error] 701#701: *11 connect() failed (111: Connection refused) while connecting to upstream, client: 104.37.148.71, server: mail.my.domain, request: "GET /mail/ HTTP/2.0", upstream: "fastcgi://127.0.0.1:9999", host: "mail.my.domain"
It looks to me like netdata is refusing connections on port 9999, however netstat shows otherwise:
# netstat -lntp|grep 9999
tcp 0 0 127.0.0.1:19999 0.0.0.0:* LISTEN 580/netdata
/opt/netdata/etc/netdata.conf looks like this:
# Get config from [url]http://127.0.0.1[/url]:<netdata_port>/netdata.conf
[registry]
# Disable public central registry and become registry locally
enabled = yes
# Register to internal server instead
registry to announce = [url]http://127.0.0.1:19999[/url]
[global]
# The number of entries the netdata daemon will by default keep in memory
# for each chart dimension. This setting can also be configured per chart.
history = 172800
# memory mode
# - `save` is the default mode, data are maintained in memory and saved to
# disk when netdata exits.
# - `ram` data are exclusively on memory and never saved on disk.
# - `map` like swap, files are mapped to memory on demand.
#
# WARNING: We suggest not to use this mode on nodes that run other
# applications.
#
# - `none` no local database (used when data are streamed to a remote netdata).
# - `dbengine`: data are in database files.
# The Database Engine works like a traditional database.
memory mode = dbengine
#
# dbengine.
#
# determines the amount of RAM in MiB that is dedicated to caching netdata
# metric values themselves.
page cache size = 32
# determines the amount of disk space in MiB that is dedicated to storing
# netdata metric values and all related metadata describing them.
dbengine disk space = 256
# Bind to 127.0.0.1 by default.
bind to = 127.0.0.1
# Bind to all available network interfaces, but allow access from specified
# IP addresses or networks.
#bind to = *
#allow connections from =
run as user = netdata
default port = 19999
# The frequency in seconds, for data collection.
update every = 3
# Log files
# Nginx logs access log, netdata no need to log it again.
access log = none
#error log = syslog
#debug log = syslog
[plugin:proc]
# Disable IPVS check since iRedMail doesn't use ipvs by default
/proc/net/ip_vs/stats = no
# inbound packets dropped
/proc/net/dev = no
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.