nerves-time / nerves_time

Keep time in sync on Nerves devices
Other
23 stars 13 forks source link

Problem with application start `Genser Nerves.Time.Ntpd terminating` #28

Closed Victoria91 closed 5 years ago

Victoria91 commented 5 years ago

Hi| I'm trying to use your library for time syncing, however it doesn't work for me. The whole application fails to start with

Genser Nerves.Time.Ntpd terminating
ntpd exited with code: 1!
Last message: {#Port<0.81>, {:exit_status, 1}}

I was advised to edit /etc/services to allow port 123 for udp and tcp, I did https://github.com/IT-CTI/custom_rpi3/commit/ddd52f80649fa4aac14ee78d367506cf29f19a3e, however it didn't work.

Is there something else to be done to make the nerves_time work?

fhunleth commented 5 years ago

nerves_time only knows how to work with Busybox ntpd.

One option is to remove these lines: https://github.com/IT-CTI/custom_rpi3/blob/master/nerves_defconfig#L81-L90 from your nerves_defconfig. You'll need to rebuild the Nerves system so that the Busybox ntpd isn't overwritten by the ntp.org daemon.

Another option would be to modify nerves_time to work with the ntp.org NTP daemon. I'm guessing that the issue is something like the Busybox implementation's commandline options are different or config files need more information. I'm not sure.

JohnBat26 commented 5 years ago

@fhunleth We have removed aforementioned lines: https://github.com/IT-CTI/custom_rpi3/commit/b108ebea737fae4905f41f411daab4dc94323415 But the problem remains. @fhunleth Are there any approach with start ntpd without nerves_time before started Erlang VM on RPI 3 ?

fhunleth commented 5 years ago

Could you reproduce the issue with an official Nerves system?

JohnBat26 commented 5 years ago

@fhunleth I'll try to do it.

JohnBat26 commented 5 years ago

@fhunleth ntp works now ! :slightly_smiling_face: but I have next problem:

 :tzdata_release_updater terminating read_only file system
JohnBat26 commented 5 years ago

resolved with: config :tzdata, :data_dir, "/root/storage" Thanks ;)