API key error multinode

My multinode terminal shows API secret errors.
Is there a way to display the actual API secret of a node without creating a new one?

Run directly in the node directory
sudo storagenode info --config-dir "/PATH/TO/NODE" --identity-dir "/PATH/TO/NODE/identity/"
It should display the secret for the node

I think in the past even this command created a new API key instead of displaying the existing one. So I am reluctant to run it.
I remember it from my post here:

I don’t know if this maybe was a bug and has been changed since then?

I just checked… yes it created new secret, I don’t know how to display the old one.

I don’t know if it is even possible. In the database it is only stored as binary.
Mayba @Alexey has an idea.

But if I delete the node on multidashboard and readd it with new API secret, it has the same statistics, nothing really changed. So why u can’t use the new API key?

API Keys are like keys to the same door, so I think it doesn’t matter if u change it or not, as long as they belong to the same entity


Yes, that’s correct. However currently I have an error showing for a node in the multinode dashboard. I would like to check if this is due to an incorrect API key. So I don’t want to generate a new one if it is possible to see the old one first

You are correct, it will generate a new one.

then likely one of the nodes has changed its port with another one. If you could swap them back, the error likely will be solved. However, you may just re-add them instead: remove the currently broken from the dashboard and add it back with a new API key, do the same for all such nodes.
I usually generate a json file with the array and use it to re-import.

storagenode info --config-dir "/PATH/TO/NODE" --identity-dir "/PATH/TO/NODE/identity/" --json > node1.json

do the same for all nodes, then join them to an array:

$ jq '.' -s node1.json node2.json node3.json > nodes.json
$ ./multinode add nodes.json

likely yes. It may also mirror this message from the monitored node(s), so you may check logs of your nodes, maybe someone has corrupted identity or you wrongly forwarded ports (like 28967 to 28967 of the node, but it has advertised on 28968, and you also has a correctly working node behind 28968 port forwarded as 28968 too and has the external address with 28968 too - so two nodes listening their own ports but advertises the same port and address as an external).

And there is no way to display the currently API secret from the node again?

Only way is to generate a new one?

Yes and this is the simplest one.

Seriously, in the time you and others spent in this thread you could have added 100 nodes to your MND. Just give it a rest…

1 Like

I guess I could have done many other things too. But that was not the point I was looking for.
I wanted to know if there was a way to display the currently valid API secret for the node to track down an error.

Unfortunately there is no known easy way. The easiest is to re-add the node.

1 Like