After updated the portal.conf file with the direct credentials:
PORTAL_DATABASE_USERNAME=USER01
PORTAL_DATABASE_PASSWORD=P@ssword
However, when trying to start the application, the following error is showed :
Error response from daemon: rpc error: code = InvalidArgument desc = secret 'DATABASE_USERNAME'
is in use by the following services: temp-secret-reader, portal_db-upgrade-rbac, portal_db-upgrade
- Portal service do not start
CA Developer Portal 5.3.2
Debian 11 Bullseye
- The service temp-secret-reader is not a native component of the APIM Portal stack.
- Because this service exists outside of the standard Portal lifecycle, it did not shut down when the Portal was stopped. This created a 'Secret Lock' that prevented the system from updating your database credentials, leading to the conflict observed.
1.. Stop the API Portal (stop portal services) :
docker stack rm portal
2. run command : docker service ls
if the command "docker service ls" response contains "temp-secret-reader" service, then try
option #1
docker service rm temp-secret-reader
wait for 30 seconds for the cluster to sync
docker secret rm DATABASE_USERNAME DATABASE_PASSWORD
OR
option#2
docker service update --secret-rm DATABASE_USERNAME --secret-rm DATABASE_PASSWORD temp-secret-reader
3. To Start again the API Portal with the script from the appropriate folder as such:
sudo ./portal.sh