Secret Manager SaaS - Edge container exiting with 401 error after upgrade
Symptom
Edge container stops with the "Exited" Status after upgrading to new version. Errors in the container logs :
Info rotation/key_rotation.go:48 Rotating Edge credentials
error rotation/key_rotation.go:59 API key rotation skipped: expected HTTP status 200 but received 401
info utils/utils.go:32 Retry attempt #5 of key rotation failed. Error message: "Failed to rotate Edge credentials. Error message: \"API key rotation skipped: expected HTTP status 200 but received 401\""
error cmd/main.go:109 Retry exhausted after 5 attempts. Error message: "Failed to rotate Edge credentials. Error message: \"API key rotation skipped: expected HTTP status 200 but received 401\""
error cmd/main.go:112 Invalid Edge credentials. Uninstall Edge and reinstall - see Edge documentation
Environment
N/A;1.5;1.6 Conjur Cloud Services
Edge Container
Cause
"401" error in this case is occurring due to the information/config files in the persistent folder created by the previous container. Re-creating the information/config files with the new container will resolve the issue.
For more information:
Resolution
- Remove/Rename the Edge container.
- eg: docker rename edge edge_old or docker rm edge
- Rename the persistent folder.
- eg: mv edge edge_old
- Create a new persistent folder.
- eg: mkdir edge
- Regenerate script from Secrets Manager SaaS UI.
- Run the new script to create the Edge Container.