0

I'm try to start the ntp service on Docker, but not working:

Configuring NTP daemon (ntpd)
  [1/4]: stopping ntpd
  [error] CalledProcessError: Command '/bin/systemctl stop ntpd.service' returned non-zero exit status 1
ipa.ipapython.install.cli.install_tool(CompatServerMasterInstall): ERROR    Command '/bin/systemctl stop ntpd.service' returned non-zero exit status 1
ipa.ipapython.install.cli.install_tool(CompatServerMasterInstall): ERROR    The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information

I have no idea how to resolve this, please help me.

stenioc1
  • 25
  • 1
  • 9

1 Answers1

0

The systemctl tool on CentOS 7 and later will not do anything itself, it will simply talk to the systemd daemon on PID 1, asking it to perform some action. As there is no such daemon in a docker container, the stop-command can not work, just as any other systemctl command.

If you want to need to maintain compatibility with installation instructions for a real system then you could als replace systemctl by a tool that works without a systemd daemon, e.g. the docker-systemctl-replacement, which one also put as CMD to serve as the init-daemon that runs all enabled services in correct order. Sometimes using initscripts can help as well but I am not sure about this case.

Guido U. Draheim
  • 2,688
  • 1
  • 17
  • 16