Docker Community Forums

Share and learn in the Docker community.

HNS service does not exist


#1

Good Day

I recently installed docker e.e. 18.09.2 on windows server 2016. The installation was working for the first few day until I ran into an error messages involving the HNS service. I read somewhere that I should reinstall docker in order to remove this issue, but since I’m quite a newbie to docker after uninstalling it I removed the HNS service as I thought that it would be reinstalled with docker. I did this by running the command “sc delete hns” from command prompt. Once docker was reinstalled it was unable to start, as the service would go from starting to stopped almost immediately.

When checking Event Viewer the following error message is shown

Error starting daemon: a required service is not installed, ensure the Containers feature is installed: failed to open service hns: The specified service does not exist as an installed service.

I have tried to reinstall the containers feature from server manager but without success as the hns service did not return .Is there any other way to re-add hns as a service?

Kind Regards
Matt

Expected behavior

When starting docker service from task manger, docker should start

Actual behavior

docker service goes from starting to stopped after less than a second

Information

output of docker version
Client:

  • Version: 18.09.2*
  • API version: 1.39*
  • Go version: go1.10.6*
  • Git commit: 1ac774dfdd*
  • Built: unknown-buildtime*
  • OS/Arch: windows/amd64*
  • Experimental: false*
    error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.39/version: open //./pipe/docker_engine: The system c
    annot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to
  • connect. This error may also indicate that the docker daemon is not running.*

Steps to reproduce the behavior

  1. install docker
  2. uninstall docker
  3. remove hns service
  4. reinstall docker
  5. start docker

(Artisticcheese) #2

This is installed with container feature in Windows I beleive. So reinstall that feature instead.


#3

Thanks for the reply, Unfortunately even after performing the reinstall of the container featuer the hns service didn’t reappear. Is there any way to manually add the hns as a service from with the command line by pointing to its exe or something similar ?


(Artisticcheese) #4

I would suggest start completely over. Windows containers are so finicky about everything that this sort of hackery will lead to even more unexplanined behavior later.