HA Cluster Warning at Creation

Feb 6, 2023
4
1
3
Hi,

We used to have this error (warning?) in PMG v6 and was hoping to fix it after we upgraded to v7. Unfortunately, this error comes along to v7. This error shows up when I created a cluster in our MX1.

DBD::pg::db do failed: ERROR: duplicate key value violates unique constraint "localstat_pkey" DETAIL: Key ("time", cid)=(1591347600, 1) already exists. at /usr/share/perl5/PMG/DBTools.pm line 918.

I think the reason for this is we somehow edited or cleared /etc/pmg/cluster.conf before. I think there's something to do with the local Postgresql database. How can I fix it?

Thanks
 
please post - the anonymized version (anonymize fingerprints and keys!) of /etc/pmg/cluster.conf and `ls -la /var/spool/pmg/cluster`
 
Code:
root@mx1:~# cat /etc/pmg/cluster.conf
master: 1
        fingerprint **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**
        hostrsapubkey **************************************************+************************************************************+*****************/***************+*****************************/*********************************/**********+******************+******************************************************************************************/**********************************************************/*************************************+*******************************++*****************************************************/****************************=
        ip 1.2.3.115
        maxcid 2
        name mx1
        rootrsapubkey ********************************************************/*************************************************************************************************************************+********+******************************************+***********************************/*************************+******+*****************************/******************************************

node: 2
        fingerprint **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**
        hostrsapubkey **************************************************+************************************************************+*****************/***************+*****************************/*********************************/**********+******************+******************************************************************************************/**********************************************************/*************************************+*******************************++*****************************************************/****************************=
        ip 1.2.3.116
        name mx2
        rootrsapubkey ********************************************************/*************************************************************************************************************************+********+******************************************+***********************************/*************************+******+*****************************/******************************************

Code:
root@mx2:~# cat /etc/pmg/cluster.conf
master: 1
        fingerprint **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**
        hostrsapubkey **************************************************+************************************************************+*****************/***************+*****************************/*********************************/**********+******************+******************************************************************************************/**********************************************************/*************************************+*******************************++*****************************************************/****************************=
        ip 1.2.3.115
        maxcid 2
        name mx1
        rootrsapubkey ********************************************************/*************************************************************************************************************************+********+******************************************+***********************************/*************************+******+*****************************/******************************************

node: 2
        fingerprint **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**
        hostrsapubkey ******************************************+******/*****************************************************************************************+***/***+**********************************+********************+****************************************/*****************************************************+*****+*+*****************+********************+****************************************++***********************************/*****/************************************+**************************+******************/******************************=
        ip 1.2.3.116
        name mx2
        rootrsapubkey ************************************************************************+**************/*****/*****************+*+**************+**************+******************************************************************+***************************************************************/***********************************/+*****************/*+****************+***********************

Code:
root@mx1:~# ls -la /var/spool/pmg/cluster
total 16
drwxr-xr-x 4 root root 4096 Feb  6 10:35 .
drwxr-xr-x 7 root root 4096 Feb  6 10:33 ..
drwxr-xr-x 5 root root 4096 Feb  6 10:33 1
drwxr-xr-x 5 root root 4096 Feb  6 10:35 2

Thanks
 
I would try to remove the node and add a fresh one to the cluster (the config and rulesystem should get synced) - unless you have very much custom config on the system it might be the cleanest solution:
* make backups of everything (always necessary)
* on mx1 run pmgcm delete 2
* setup mx2 freshly
* afterwards add it again to the cluster with the output of pmgcm join-cmd

I hope this helps!
 

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!