This error can be found with some results but I’ve found just one similar question here
I’m not so sure if the solution there is working. It’s ridiculous that the required update for Windows 10 is from 2017, it’s too old and actually my Windows 10 always gets up-to-date.
Here I describe the detailed issue again. It just relates to the command
docker service create.
It becomes an issue when I provide options
-p 80:80 for the command. The service can be created but somehow cannot be run with an error saying HNS failed with error : the parameter is incorrect
Actually it’s looped and switched between states of “Assigned, Preparing, Error …” and I have to use
docker service rm to end that loop.
Here is the whole command: docker service create --name myService -p 80:80 myImage
Exactly similar to the question from the link above, if I use the detailed syntax for
-p with mode, target and published explicitly specified, the command can run OK. But after that I cannot use docker service scale. It simply cannot scale, only one task occupies the published port and prevents all others from running.
I ask this again here and hope that this has some new solution.