Chatops cannot authenticate #5385
Unanswered
nathanherrmann
asked this question in
ChatOps
Replies: 1 comment 1 reply
-
When you imported the keys did you follow the procedure at https://docs.stackstorm.com/authentication.html#api-key-migration? In particular the show-secrets? When you tried to create a new key were you logged in as admin user? After you created the new key, is the unauthorized from when you put it in st2chatops.env? It might be worth testing the apikey manually with curl, e.g. as per https://docs.stackstorm.com/authentication.html#api-key-usage. Just thinking that it's worth checking the key manually, before getting chatops involved... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Somehow one of our StackStorm servers lost it's configuration. The st2chatops.service couldn't start, and I found that the st2chatops.env file appeared to have been overwritten with a default file with nothing configured. I was able to copy the st2chatops.env file from another server that should have the same api keys. When I type "! help", "help" is the only command returned. When I look in the error logs, I see
ERROR Failed to retrieve commands from "https://localhost/api": Unauthorized - ApiKey with key_hash={my key hash} not found
I exported the keys to a yaml file from the other server, and when I try to import them on the current server, I also get aERROR: 401 Client Error: Unauthorized MESSAGE: Unauthorized - ApiKey with key_hash=...
. I have tried creating a new key withst2 apikey create -k -m '{"used_by": "hubot"}'
, and I still get the same error. Any advice?Beta Was this translation helpful? Give feedback.
All reactions