Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fail to start tasks/services in Docker Swarm: hnsCall failed in Win32: The parameter is incorrect

I am trying the Docker Get Started tutorial, Part 3 (Services). So the part where I need to init a swarm and deploy a stack, all my service status is rejected:

enter image description here

The full error (using --no-trunc) is:

hnsCall failed in Win32: The parameter is incorrect. (0x57)

Here are the steps I am doing:

  • Ensure my image is correct (the docker run works well, I accessed localhost:4000 successfully). Then I stopped the container to make sure it does not interfere.

  • When I init the swarm, it says I have multiple addresses, so I chose a random one (I tried with either of them, same result) using --advertise-addr.

  • docker stack deploy works, but when I check the status with docker service ps, none of them are up. localhost:4000 has no listener.

  • Note: I switched Docker to a Windows container.

I am new to Docker and this is beyond me. Can anyone please suggest a solution/debug way?

like image 304
Luke Vo Avatar asked Dec 05 '18 17:12

Luke Vo


1 Answers

I tried everything but cannot get it to run on a Windows container so I switched to Linux container. The Get Started part 3 runs well.

like image 126
Luke Vo Avatar answered Oct 16 '22 14:10

Luke Vo