pmxcfs: duplicate ‘authorized_keys’

bilalwaheedch

New Member
May 20, 2022
6
1
3
Hello everyone! After a power failure I haven’t been able to access GUI and when trying to do anything on terminal it says ‘connection refused’.

My hosts file matches hostname and ip a, however when I run pmxcfs I get the following error:

Code:
root@sherlock:~# pmxcfs
[database] crit: found entry with duplicate name 'authorized _keys' - A: (inode = 0x0000000000F7D399, parent = 0x0000000000000009,v./mtime = 0xF7D39B/0x1679202318) vS. B: (inode = 0x0000000000F7D901, parent = 0x0000000000000009, v./mtime= 0xF7D903/0x1679214482)
[database] crit: DB load failed
[main crit: memdb_open failed - unable to open database '/var/lib/pve-cluster/config.db'
[main] notice: exit proxmox configuration filesystem (-1)

I’ve searched almost every related post and haven’t been able to resolve the issue.

Please point me in the right direction!

Thank you.
 
This sounds like a weird kind of corruption.
And is there really a space in 'authorized _keys' there or did you add that by accident?

You can use `sqlite3 /var/lib/pve-cluster/config.db` as root to inspect & possibly fix the db directly. (but make a backup of it first...)
On the sqlite3 prompt, check the output of `select inode,parent,mtime from tree where name="authorized_keys"`.
It sounds like you should then see 2 entries with the same parent, which is weird...
You can also read out the contents by including the `data` field in the select statement.
You can use a `delete` sql command to delete one of them (by inode in the 'where' clause) - if they both seem fine I'd delete the older one (lower mtime)...
Or if you don't care about the contents you can just delete both, given that you can still access the machine, that should be something you'll be able to recover from (if you even need to), plus, I did say make a backup of the db at the beginning ;-).
 
You are a genius :)

Not only you saved me a few hours of reinstalling Proxmox, pfSense, home assistant and few other services for which I did have recent backups; but most of all I learnt something new about Proxmox, which was more valuable than spending time rebuilding the machine.

For this knowledge I thank you!

The space was actually added by me copying text using phone’s camera as I had connected to iDRAC from iPad and it doesn’t let me select/copy text.
 

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!