top of page
  • Writer's pictureGowtham

level=warning network was found but has incorrect label com.docker.compose.network set to ""

Updated: Oct 3, 2023

I ran into an error while trying to install a Sitecore Docker instance using the Sitecore Getting Started Template and if the error is related to "network nat is ambiguous". This happened recently.

level=warning msg="a network with name tac_default exists but was not created by compose.\nSet `external: true` to use an existing 
network"
network tac_default was found but has incorrect label com.docker.compose.network set to ""d
No connection could be made because the target machine actively refused it
No connection could be made because the target machine actively refused it

I couldn't find a straightforward answer online to fix the problem, so I decided to investigate it myself. You might run into a similar issue when you use the up.ps1 script to start a container, and then you get an error when you try to use "docker compose down" followed by "docker compose up." This problem probably happens because the network interface created by up.ps1 isn't working correctly when you run "docker compose up."


To solve this issue, do the following:

  1. Type "docker network ls" to see all the networks available.

  2. Enter "docker network prune" to remove all the networks. Note: This command deletes any unused networks on your system.

  3. If you need to remove a specific network, use "docker network rm <network Id>" followed by the network Id to remove the problematic one.

  4. Once the network cleanup is done, use "docker compose up -d" to start the containers.

After following these steps, the problem should be fixed, and "docker compose up" should work without any issues.


Reference

239 views0 comments

Related Posts

See All
bottom of page