Ratul
Ratul

Reputation: 451

Restart docker in windows server 2016 fails by Jenkins

I've configured CI/CD using Jenkins for .NET Framework. Jenkins is running on windows server 2016. When jenkins tried to restart the docker container using Execute Windows Batch Command then it threw an error.

docker: Error response from daemon: failed to create endpoint ***** on network nat: HNS failed with error : Unspecified error.

How can I resolve this issue?

Upvotes: 0

Views: 385

Answers (1)

chintan thakar
chintan thakar

Reputation: 1500

docker: Error response from daemon: failed to create endpoint ***** on network nat: HNS failed with error : Unspecified error.

This is very generic error on docker with windows. I have faced similar error and spent few hours. but somehow windows is not giving you proper error messages.

This error is related to port already in use because jobs with which you are trying to stop container is still occupied the name and port or may be some other service has already occupied this port. So you have to remove the older container first or start with different name/port.

just do

docker stop <your-container-name>/<container-id>
docker rm -v <your-container-name>/<container-id>

Than try to spin new container. It will definitely start.

Hope this will help.

Thank you!

Upvotes: 1

Related Questions