All I did was try to update the KES key as I have done many times before. Followed the instructions and rebooted. Then I started getting the following after running the journalctl -e -f -u cardano-node
The KES key provided at: “/home/trusted/cardano-my-node/poolkeys/kes.skey” does not match the KES key specified in the operational certificate at: “/home/trusted/cardano-my-node/poolkeys/node.cert”
Then I tried to go through the forums with recommendations but no fix. Then tried to issue a new operational cert but now running the first step to determine the counter, I get the following.
cardano-cli: Network.Socket.connect: <socket: 11>: does not exist (Connection refused)
The KES key provided at: “/home/trusted/cardano-my-node/poolkeys/kes.skey” does not match the KES key specified in the operational certificate at: “/home/trusted/cardano-my-node/poolkeys/node.cert”
Most likely your node is not running. You can check that with the status from your node service.
You can get the current KES period from one of your relays as well.
Somehow you messed up between KES keys and node.cert. Did the same mistake on the weekend. Easiest way to get back to normal: generate new KES keys and new node.cert. Be sure to have the counter reset to the correct number.
I think I fixed it. Thanks for the advice on getting the KES period off the relay. Once I got the KES period, I could then retry. I always struggle with this due to different configurations and how the installs change over time. Specifically, how keys are in different folders with different names depending on when I did the installs. An exmple below that may help someone else struggling.
Understand $NODE_HOME and $HOME in your scripts. Also, paying close attention where you you your keys.vkey and where each of the issue-op cert files are located. One of my servers have a cold-keys folder in $HOME and the other has a poolkeys folder in $NODE_HOME.
Blockquote
Be sure to have the counter reset to the correct number.
As I somehow goofed things up rotating the KES keys yesterday, I thought I could simply reset the counter value in the node.counter file by editing the file directly. After doing an edit and re-issuing a node.cert file, my BP node server started up and everything seemed happy. However, when backing up my cold-keys directory, I noticed the counter value was one too many, so I learned you can’t reset the counter by hand-editing the file.
Instead, I needed to use cardano-cli node new-counter... command that will generate a new node.counter file with empty description property. Then, when you run the command to issue a new operational certificate, it will fill out the description property in the node.counter file with proper value.
Have a look at the CoinCashew instructions for setting the counter value. https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node/part-iv-administration/issuing-new-opcert#setting-the-counter-value