user118967
user118967

Reputation: 5742

Docker error: Cannot start service ...: network 7808732465bd529e6f20e4071115218b2826f198f8cb10c3899de527c3b637e6 not found

When starting a docker container (not developed by me), docker says a network has not been found.

Does this mean the problem is within the container itself (so only the developer can fix it), or is it possible to change some network configuration to fix this?

Upvotes: 121

Views: 77306

Answers (8)

vovan
vovan

Reputation: 1540

Find the name of the network in the NetworkSettings/Networks section

docker inspect container_name

Create a new network

docker network create network_name

Connect the network to the container

docker network connect network_name container_name

Upvotes: 0

Aaron San-yuo
Aaron San-yuo

Reputation: 374

This can be caused by some old service that has not been killed, first add --remove-orphans flag when bringing down your container to remove any undead services running, then bring the container back up

docker-compose down --remove-orphans

docker-compose up

Upvotes: 23

pablo.bueti
pablo.bueti

Reputation: 151

This is based in this answer.

In my case the steps that produced the error where:

  1. Server restart, containers from a docker-compose stack remained stopped.
  2. Network prune ran, so the network associated with stack containers where deleted.
  3. Running docker-compose --project-name "my-project" up -d failed with the error described in this topic.

Solved simply adding force-recreate, in this way:

docker-compose --project-name "my-project" up -d --force-recreate

This possibly works because with this containers are recreated linked with the also recreated network (previously pruned as described in the pre conditions).

Upvotes: 10

Jet Set Willy
Jet Set Willy

Reputation: 876

Amongst other things docker system prune will remove 'all networks not used by at least one container' allowing them to be recreated next docker-compose up

More precisely docker network prune can also be used.

Upvotes: 5

John V
John V

Reputation: 1227

shutdown properly first, then restart

docker-compose down
docker-compose up

Upvotes: 121

Drazen Urch
Drazen Urch

Reputation: 2901

I'm assuming you're using docker-compose and seeing this error. I'd recommend

docker-compose up --force-recreate <name>

That should recreate the containers as well as supporting services such as the network in question (it will likely create a new network).

Upvotes: 177

Deeksha Sharma
Deeksha Sharma

Reputation: 3359

I was facing this similar issue and this worked for me :

Try running this - docker container ls -a and remove the container id by docker container rm ca877071ac10 (this is the container id ).

The problem was there were some old container instances which were not removed. Once all the old terminated instances get removed, you can start the container with docker-compose file

Upvotes: 15

user118967
user118967

Reputation: 5742

Apparently VPN was causing this. Turning off VPN and resetting Docker to factory settings has solved the problem in two computers in our company. A third, personal computer that did not have VPN never showed the problem.

Upvotes: 6

Related Questions