[SOLVED] Database Sync Error

Mihai

Renowned Member
Dec 22, 2015
104
8
83
40
This is a pretty new cluster 3-host cluster:

version 7.1-1

pmg01 (master)
pmg02 (node)
pmg03 (node).

I am am seeing the following message in the syslogs for pmg01 and pmg03:

Code:
<27>1 2021-12-30T08:49:16.624941-06:00 pmg01 pmgmirror 926 - -  database sync 'pmg02' failed - DBI connect('dbname=Proxmox_ruledb;host=/run/pmgtunnel;port=2;','root',...) failed: could not connect to server: No such file or directory#012#011Is the server running locally and accepting#012#011connections on Unix domain socket "/run/pmgtunnel/.s.PGSQL.2"? at /usr/share/perl5/PMG/DBTools.pm line 66.

I don't know what this error is. I can connect just fine with ssh via root from:
pmg01 -> pmg02
pmg03 -> pmg02

Thank you.

edit: not sure if this has something to do with it but the pmg02 sylogs show this:

Code:
Authentication refused: bad ownership or modes for directory /root/.ssh

Here's the ownership for /root.ssh:

Code:
root@pmg02:~/.ssh# ls -lah
total 20K
drwx------ 2  700 root 4.0K Dec 31 14:23 .
drwx------ 6 root root 4.0K Dec 17 04:35 ..
-rw------- 1 root root 1.6K Dec 31 14:23 authorized_keys
-rw------- 1 root root 1.8K Dec 17 04:35 id_rsa
-rw-r--r-- 1 root root  392 Dec 17 04:35 id_rsa.pub
 
Last edited:
Here's the ownership for /root.ssh:
the .ssh directory belongs to the user-id 700 - this is wrong (and likely the cause of the issue)

`chown root:root /root/.ssh` should fix this

I hope this helps!
 
Oh wow, I originally suspected it was a permissions issue but I missed that small detail about user 700!

Thanks so much for the help, it has resolved the problem.
 
  • Like
Reactions: Stoiko Ivanov