PMG 7 to 8 | DBI connect failed

Xela

Well-Known Member
Oct 12, 2017
92
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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!