ntpd service in a docker container is dead, cannot restart

819 views Asked by At

I'm trying to mount a local hadoop cluster using docker and ambari, the problem im having is that ambari install check shows NTP is not running, and it is needed to know if the services installed with ambari are working. I checked ntpd in the containers and tried to launch them but it failed

[root@97ea7075ca78 ~]# service ntpd start
Starting ntpd:                                             [  OK  ]
[root@97ea7075ca78 ~]# service ntpd status
ntpd dead but pid file exists

Is there a way to start ntp daemon in those containers?

1

There are 1 answers

0
Tarun Lalwani On

In docker you don't use the service command as there is no init system. Just run the ntpd command and it should work

ntpd by default goes to background. If that was not the case you would need to use ntpd &