The KES key provided does not match the KES key specified / Network.Socket.connect: <socket: 11>: does not exist (Connection refused)

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)

cardano-node 1.35.3 - linux-x86_64 - ghc-8.10

Hi,

You must export the socket path

export CARDANO_NODE_SOCKET_PATH=~/cardano-node/db/node.socket

ran export, same issue. This is what I have in my startBlockProducingNode.sh

DB_PATH=${DIRECTORY}/db
SOCKET_PATH=${DIRECTORY}/db/socket

Also should it be cardano-my-node.
export CARDANO_NODE_SOCKET_PATH=~/cardano-my-node/db/socket

Tried both, no change.

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”

I am still also getting the when trying to get the KES start period.

cardano-cli: Network.Socket.connect: <socket: 11>: does not exist (Connection refused)-bash: / 129600: syntax error: operand expected (error token is “/ 129600”)
startKesPeriod:

export -p shows the following for socket path.

declare -x CARDANO_NODE_SOCKET_PATH=“/home/trusted/cardano-my-node/db/socket”

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.

2 Likes

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

I am having the same error Network.Socket.connect: <socket: 11>: does not exist (Connection refused) after some wrong steps I took renewing KES keys. The keys have been renewed before successfully and the BP node minted blocks consistently. However, this time while trying to correct my mistake I hit this <socket: 11> error anytime I try to do something with cardano-cli.

image

When running journalctl --unit=cardano-node --follow I encounter the error The KES key provided at: “/home/cardano/cardano-my-node/kes.skey” does not match the KES key specified in the operational certificate at: “/home/cardano/cardano-my-node/node.cert” which is the first issue I am trying to solve.

Could a solution be to delete the keys from startCardanoNode.sh and start over as a relay?

export the socket and everything should work fine

Hi Alex, I did this again as I’ve had this issue before and fortunately found your answers on others’ posts. This time, although I rechecked the changes, I still get the error. (I did not tweaked anything socket_path related prior to this moment)


I was trying to solve the node counter for the KES keys to then get a node cert. I believe my mistake was creating a few additional keys before realizing my error.