Hello,
I’m trying to redeploy a stack, and getting this error:
Preparing to redeploy…
dbbox: Inspecting mongo:latest image in the registry
dbbox: Image up to date in our database
app: Inspecting myrepo/myimage:develop image in the registry
ERROR: Service ‘app’: Cannot authenticate with registry-1.docker.io: 401 Client Error: Unauthorized for url: https://registry-1.docker.io/v2/myrepo/myimage/manifests/develop
ERROR: Stack Redeploy action on ‘Staging’ has failed
Trying to start the stack gives this error:
ERROR: Service ‘app’: Service cannot be started in current state Not running
ERROR: Stack Start action on ‘Staging’ has failed
We have two clusters, and another stack called Production (which uses the same image but the “latest” tag) which runs.
“myrepo/myimage” is a private repo, and we’re using paid plans.
Here are the Stackfiles for the 2 stacks:
Production
app:
environment:
- NODE_ENV=production
image: 'myrepo/myimage:latest'
links:
- dbbox
ports:
- '80:3000'
dbbox:
image: 'mongo:latest'
volumes:
- /data/db
Staging
app:
environment:
- NODE_ENV=production
image: 'myrepo/myimage:develop'
links:
- dbbox
ports:
- '3000'
dbbox:
image: 'mongo:latest'
volumes:
- /data/db
(the fact that NODE_ENV=production
for Staging isn’t important right now, and it merely makes the app use one configuration over another)
Is this just a case of the wrong error code/message being reported? If so, what could be the problem here?
Could it be that services with the same name is troublesome?