I have created a overlay network and trying to create containers on this network.
But creating the container fails with below error.
Is there anyway to enable debugs and find the exact reason of the failure ?
docker run -d --network overlay --name node-exporter-s101-swarm node-exporter:23.2.0-release
8c10985817b67c35823f3e1ac515bf72f58a1298ba3b2e631fcd06fb176cb750
docker: Error response from daemon: attaching to network failed, make sure your network options are correct and check manager logs: context deadline exceeded.
I’m not sure it helps, but dockerd and the docker commands both have the -D or --debug flag and you can check system logs.
sudo journalctl -e -u docker
Since your error message says you should check the manager logs and network options, you should start with that. Maybe there is something wrong with the vxlanid list. How did you create the overlay network?
Jun 05 03:31:18 an-master dockerd[1102]: time=“2024-06-05T03:31:18.107398595Z” level=info msg="initialized VXLAN UDP port to 4789 "
Jun 05 03:31:18 an-master dockerd[1102]: time=“2024-06-05T03:31:18.323174426Z” level=error msg=“fatal task error” error=“Pool overlaps with other one on this address space” module=node/agent/taskmanager node.id=nktdgxxowvjwrzcbuglvzdrl9 service.id= task.id=bydfo78axydpl8031n8yfjfmz
Jun 05 03:31:18 an-master dockerd[1102]: time=“2024-06-05T03:31:18.393248858Z” level=info msg="initialized VXLAN UDP port to 4789 "
with docker daemon debugs enabled, I get these logs
un 05 03:38:13 an-master dockerd[1065]: time=“2024-06-05T03:38:13.685242673Z” level=debug msg=“FIXME: Got an API for which error does not match any expected type!!!: attaching to network failed, make sure your network options are correct and check manager logs: context deadline exceeded” error_type=“*errors.errorString” module=api
Jun 05 03:38:13 an-master dockerd[1065]: time=“2024-06-05T03:38:13.685281004Z” level=error msg=“Handler for POST /v1.41/networks/overlay/connect returned error: attaching to network failed, make sure your network options are correct and check manager logs: context deadline exceeded”
Jun 05 03:38:13 an-master dockerd[1065]: time=“2024-06-05T03:38:13.685299504Z” level=debug msg=“FIXME: Got an API for which error does not match any expected type!!!: attaching to network failed, make sure your network options are correct and check manager logs: context deadline exceeded” error_type=“*errors.errorString” module=api
I edited your first post for a reason. I see you changed it back.
Please, format your posts according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.
Example code block:
```
echo "I am a code."
echo "An athletic one, and I wanna run."
```