PMG 7 to 8 | DBI connect failed

Xela

Well-Known Member
Oct 12, 2017
98
2
48
Dear forum, a cluster with two nodes was upgraded according to (https://www.linkedin.com/pulse/proxmox-mail-gateway-7-8-upgrade-aynur-yilmaz).

After that upgrade DBI connection fails:

Code:
Mar 11 17:13:17 pmg pmgmirror[633]: starting cluster synchronization
Mar 11 17:13:17 pmg pmgmirror[633]: sync error: DBI connect('dbname=Proxmox_ruledb;host=/var/run/postgresql;port=5432','root',...) failed: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
    Is the server running locally and accepting connections on that socket? at /usr/share/perl5/PMG/DBTools.pm line 78.
Mar 11 17:13:21 pmg pmg-smtp-filter[954]: DBI connect('dbname=Proxmox_ruledb;host=/var/run/postgresql;port=5432','root',...) failed: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
    Is the server running locally and accepting connections on that socket? at /usr/share/perl5/PMG/DBTools.pm line 78.
Mar 11 17:13:21 pmg pmg-smtp-filter[955]: DBI connect('dbname=Proxmox_ruledb;host=/var/run/postgresql;port=5432','root',...) failed: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
    Is the server running locally and accepting connections on that socket? at /usr/share/perl5/PMG/DBTools.pm line 78.

Code:
root@pmg:~# service postgresql status
● postgresql.service - PostgreSQL RDBMS
     Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; preset: enabled)
     Active: active (exited) since Mon 2024-03-11 17:11:14 CET; 19min ago
    Process: 413 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
   Main PID: 413 (code=exited, status=0/SUCCESS)
        CPU: 786us

Mar 11 17:11:14 pmg systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
Mar 11 17:11:14 pmg systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.

root@pmg:~# ps auxfw |grep postgres
root         938  0.0  0.2  14164  8320 ?        S    17:12   0:00  \_ /usr/bin/ssh -N -o BatchMode=yes -o HostKeyAlias=pmg2 -L /run/pmgtunnel/.s.PGSQL.2:/var/run/postgresql/.s.PGSQL.5432 192.168.1.144
root        1677  0.0  0.0   6332  2176 pts/0    S+   17:32   0:00                      \_ grep postgres

root@pmg:~# psql Proxmox_ruledb
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
        Is the server running locally and accepting connections on that socket?
 
Solution: Setting the locales with 'dpkg-reconfigure locales' before upgrading solved it.