June 3Jun 3 I've had an issue rrecently where one single docker (out of all of the ones I need its PiHole which runs most of my things) for some reason wont start when its assigned a specific IP following a recent rebootdocker: Error response from daemon: failed to set up container networking: Address already in useWhen I change the IP it boots just fine and has no issues but for some reason I cant allocate it the same IP its had for years now,I have tried,Turning off Docker and turning it OnAll other containers are stopped and nothing is using that IPNo ping response from the network showing if something else has taken the IP within the networkdocker network inspect -v br0.101 shows nothing else is using the IP's runningThe container has been working fine until a recent reboot to update my server and now just this one container wont start on the custom port. All other dockers appear to be working fine,When I change it to another random IP it comes online however I have alot of things mapped to this IP so I would rather fix the issue than just change the port as something is taking this port or blocking docker from starting using this IP. Is there a way to force it to start knowing the IP is available?Edit more testingSo did some testing and it seems no docker wants to use the address which I have allocated to Pihole on the network, so something is blocking any container using the specific IP. What would be blocking one specific IP from being used? Edited June 3Jun 3 by brent3000
June 3Jun 3 Author I did some more digging and I found this suggestion that it may be a stale address or something just stuck in the system and wont release the IP, the comments seem to be related 'due to a stale IP allocation in Docker's network database.'/etc/rc.d/rc.docker stop cp /var/lib/docker/network/files/local-kv.db \ /var/lib/docker/network/files/local-kv.db.bak rm /var/lib/docker/network/files/local-kv.db /etc/rc.d/rc.docker startI had to also re-create my docker networks following this,This ended up resolving my issue but I wanted to know what may have been the cause of this or what would be the issue which would have prevented one single container from reloading post reboot but also what would be a good way to avoid this in the future? Edited June 3Jun 3 by brent3000
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.