Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure App Service ambiguous network name error on docker-compose deploy

We've created a new AppService and successfully deployed our solution backend through docker-compose (preview), but when we update one (or more) image on the registry and we restart the appservice to get docker-compose to get the new version, we get errors of ambiguous network name like this one

InnerException: Docker.DotNet.DockerApiException, Docker API responded with status code=BadRequest, response={"message":"network my_app_service_multi_nw__0 is ambiguous (94 matches found on name)"}

In our docker-compose.yml we don't have any network name specified (since network is a not-supported option)

At the moment, the only solution we found is to delete entirely the appservice and create a new one (WITH A DIFFERENT NAME, also)

What we're doing wrong? Is it possible to prune all unused networks?

like image 886
Doc Avatar asked Jul 29 '19 15:07

Doc


3 Answers

We've contacted Microsoft for support, they've told us that it's a known bug and a temporary fix could be changing App Service plan.

Apparently, changing from S1 to B1 fixed the issue for us.

like image 152
Doc Avatar answered Nov 12 '22 17:11

Doc


The answer from @Doc is currently not working for us, as scaling up or down the plan does not seem to reset the underling VM. We can't delete the app or change the name, therefore we are currently stuck with this issue...

EDIT: It was not sufficient to change from B2 to S2, but changing from B2 to P1V2 fixed the issue. A hint should be that, when you change the plan, you should see a message at the bottom "Outgoing IP addresses for your app might change", which ensures that your App Service app is actually migrating to a different VM, therefore resetting the Docker configuration.

like image 1
LucaV Avatar answered Nov 12 '22 15:11

LucaV


I got the same issue in local when try to run with Visual Studio and got fixed with following steps.

step 1: List existing networks

docker network ls

Find duplicate network names

Step 2: Remove one network

docker network rm <NETWORK ID>
like image 1
DineshNS Avatar answered Nov 12 '22 15:11

DineshNS