sync error after certificate update

lhaden

New Member
Jun 23, 2022
4
0
1
I have updated the ssl certificate in both servers and have restarted the servers. Both are in cluster and after the update, the master node has the following error in the syslog
pmg1 pmgmirror[35030]: database sync 'pmg2' failed - DBD:g::st execute failed: ERROR: duplicate key value violates unique constraint "cmailstore_pkey"#012DETAIL: Key (cid, rid)=(2, 4810) already exists. at /usr/share/perl5/PMG/DBTools.pm line 1093.


NAME(CID)--------------IPADDRESS----ROLE-STATE---------UPTIME---LOAD----MEM---DISK
pmg2(2) x.x.x.122 node A 3 days 02:33 0.01 34% 12%
pmg1(1) x.x.x.121 master S 20:55 0.00 32% 12%

is there anything m missing out to check ?

thanks
 
pmg1 pmgmirror[35030]: database sync 'pmg2' failed - DBD:g::st execute failed: ERROR: duplicate key value violates unique constraint "cmailstore_pkey"#012DETAIL: Key (cid, rid)=(2, 4810) already exists. at /usr/share/perl5/PMG/DBTools.pm line 1093.
how did you create the cluster - and did you at some point remove the /etc/pmg/cluster.conf?

else - please post the /etc/pmg/cluster.conf from both nodes (remove the key-parts - keep the fingerprints)
 
how did you create the cluster - and did you at some point remove the /etc/pmg/cluster.conf?

else - please post the /etc/pmg/cluster.conf from both nodes (remove the key-parts - keep the fingerprints)
I created the cluster following this guide: https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#chapter_pmgcm

So when i changed the certificate the fingerprint in /etc/pmg/cluster.conf was not updated to the new one. so i renamed the file and created the cluster.

server 1
master: 1
fingerprint A1:E0:CD:AF:E4:C6:31C:28:E3:45:0B:93:9F:29:70:B1:A6:EB:51:8C:BC6:8A:EF:56:63:1A:53:36:C4:A2
ip x.x.x.121
maxcid 2
name pmg1
node: 2
fingerprint A1:E0:CD:AF:E4:C6:31C:28:E3:45:0B:93:9F:29:70:B1:A6:EB:51:8C:BC6:8A:EF:56:63:1A:53:36:C4:A2
ip x.x.x.122
name pmg2


server 2
master: 1
fingerprint A1:E0:CD:AF:E4:C6:31C:28:E3:45:0B:93:9F:29:70:B1:A6:EB:51:8C:BC6:8A:EF:56:63:1A:53:36:C4:A2
ip x.x.x.121
maxcid 2
name pmg1
node: 2
fingerprint A1:E0:CD:AF:E4:C6:31C:28:E3:45:0B:93:9F:29:70:B1:A6:EB:51:8C:BC6:8A:EF:56:63:1A:53:36:C4:A2
ip x.x.x.122
name pmg2

Reply
 
Last edited:
So when i changed the certificate the fingerprint in /etc/pmg/cluster.conf was not updated to the new one
For this you can and should use `pmgcm update-fingerprints`

. so i renamed the file and created the cluster.
This is where the problem is rooted - it could work to:
re-use the old version of the cluster config and adapt the fingerprint manually
(afterwards restart pmgmirror and pmgtunnel)

removing the cluster.conf breaks the association of cluster-node ids that is present in the spooldir (for quarantine) and the database (where the errormessage you posted originates)

I hope this helps!
 
For this you can and should use `pmgcm update-fingerprints`


This is where the problem is rooted - it could work to:
re-use the old version of the cluster config and adapt the fingerprint manually
(afterwards restart pmgmirror and pmgtunnel)

removing the cluster.conf breaks the association of cluster-node ids that is present in the spooldir (for quarantine) and the database (where the errormessage you posted originates)

I hope this helps!
its the same issue. I have change to old file and updated with new fingerprint but the error message in master node remain same.
 
its the same issue. I have change to old file and updated with new fingerprint but the error message in master node remain same.
hm - ok - I think the easiest would be to:
freshly setup the second node

on the master-node:
increase maxcid to 4

join the new node to the cluster

don't remove the cluster-config without deleting the nodes in the future
 
hm - ok - I think the easiest would be to:
freshly setup the second node

on the master-node:
increase maxcid to 4

join the new node to the cluster

don't remove the cluster-config without deleting the nodes in the future
Will try this one.

Thank you for your support
 

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!