By PanCake
I’m on CoreOS stable (1010.6.0). Whenever I reboot the droplet, I always get this error message:
Failed Units: 1
docker-tcp.socket
Then if I issue:
journalctl -b -u docker-tcp.socket
-- Logs begin at Fri 2016-06-17 18:51:06 UTC, end at Fri 2016-07-08 06:42:55 UTC. --
Jul 08 06:33:24 coreos-512mb-nyc2-01 systemd[1]: docker-tcp.socket: Failed to listen on sockets: Cannot assign requested address
Jul 08 06:33:24 coreos-512mb-nyc2-01 systemd[1]: Failed to listen on Docker Socket for the API.
Jul 08 06:33:24 coreos-512mb-nyc2-01 systemd[1]: docker-tcp.socket: Unit entered failed state.
Jul 08 06:33:24 coreos-512mb-nyc2-01 systemd[1]: docker-tcp.socket: Failed to listen on sockets: Cannot assign requested address
Jul 08 06:33:24 coreos-512mb-nyc2-01 systemd[1]: Failed to listen on Docker Socket for the API.
I followed the procedure to enable the docker-tcp socket here: https://coreos.com/os/docs/latest/customizing-docker.html
For now, if I stop docker.service manually, and start docker-tcp.socket first, then I can start docker.service without any problem. But, I must do this after each reboot, which is not terrible.
I would like to fix this error, so that my droplet boots correctly (and the docker-tcp.socket gets started without any error).
Here’s my docker-tcp.socket:
[Unit]
Description=Docker Socket for the API
Before=docker.service
[Socket]
ListenStream=172.17.0.1:2375
BindIPv6Only=both
Service=docker.service
[Install]
WantedBy=sockets.target
Here’s my docker.service:
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=docker.socket early-docker.target network.target
Requires=docker.socket early-docker.target
[Service]
Environment="DOCKER_CGROUPS=--exec-opt native.cgroupdriver=systemd"
EnvironmentFile=-/run/flannel_docker_opts.env
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
ExecStart=/usr/lib/coreos/dockerd daemon --host=fd:// --insecure-registry 0.0.0.0:5000 $DOCKER_OPTS $DOCKER_CGROUPS $DOCKER_OPT_BIP $DOCKER_OPT_MTU $DOCKER_OPT_IPMASQ
[Install]
WantedBy=multi-user.target
What’s wrong with my setup, and how would I ensure that docker-tcp.service gets loaded before docker.service?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi,
thanks for your quick reply.
I have no cloud-config for now. I’m building everything manually.
docker-tcp.socket is enabled:
systemctl is-enabled docker-tcp.socket
enabled
Even though it is enabled, it’s not working, when I reboot the droplet. That’s why I’m getting the error message (as I said in my earlier post). So, I need to type these commands manually, to have it working:
systemctl stop docker
systemctl start docker-tcp.socket
systemctl start docker
I was wondering if the ONLY way to have it working correctly, was by using a cloud-config file? I can’t believe…
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.