Docker Community Forums

Share and learn in the Docker community.

How to get detailed error information from Swarm

Hi Experts,
I have deployed an application using swarm but I see an error message when I check
docker stack --orchestrator swarm ps autopwaapi
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
pr5390jtm7hm autopwaapi_autodb.1 postgres:latest docker4 Running Running 23 hours ago
mjs2o19r4lqq _ autopwaapi_autodb.1 postgres:latest docker4 Shutdown Rejected 23 hours ago “invalid mount config for type…”
vyfif7siq0pf _ autopwaapi_autodb.1 postgres:latest docker4 Shutdown Rejected 23 hours ago “invalid mount config for type…”
pbg8w8sa8hg7 _ autopwaapi_autodb.1 postgres:latest docker4 Shutdown Rejected 23 hours ago “invalid mount config for type…”
ze46hsvb99rl _ autopwaapi_autodb.1 postgres:latest docker4 Shutdown Rejected 23 hours ago “invalid mount config for type…”
tpl39vghj8my autopwaapi_db-migrator.1 goodfy/autoapiweb:beta3 docker4 Shutdown Failed 23 hours ago “task: non-zero exit (1)”
2tt7nt1zh72k _ autopwaapi_db-migrator.1 goodfy/autoapiweb:beta3 docker4 Shutdown Failed 23 hours ago “task: non-zero exit (1)”
1rbink4vgdb7 autopwaapi_redis.1 redis:latest docker4 Running Running 23 hours ago
5ajus47nt12e autopwaapi_web.1 goodfy/autoapiweb:beta3 docker4 Running Running 23 hours ago
75tvfvmx6p91 _ autopwaapi_web.1 goodfy/autoapiweb:beta3 docker4 Shutdown Shutdown 23 hours ago
I would like to get details about “invalid mount config for type…” …
How can I do that so I can figure out what is going wrong ?
Thanks in advance

try and append –no-trunc to your docker stack … command

1 Like

You can also do:

docker service logs SERVICENAME

Where SERVICENAME will be the STACKNAME_serviceNameInYaml

to get the logs of an individual service. These seem to not be truncated by default.

I dont think that will display the swarm error, but if the service container is crashing then yes, that will work.

OP asks for help getting the “invalid mount config for type…” which appears to only occur in autopwaapi_autodb service based on the provided logs. If the container is having a problem mounting, then service logs will show this.