NTP service allways changes to inactive

I am not too experienced eitheršŸ˜‚
There are probably other and better ways to deactivate services and make sure they are never being loaded again.
For me it was easier to simply delete these files.

Yes, because dbus-org.freedesktop.timedate1.service is an alias to systemd-timesyncd.

I meant deleting any files or directories related to dbus.

If you do not want to delete them you can move them into your home directory

Please double-validate that first!
Is there really another instance running?
Use systemctl list-units to display all services and systemctl list-units --state failed to see those that failed.
Watch for more processes with sync in their name (note that if you donā€™t spot any they can be stopped at times and started in intervals so keep repeating checking).
I just checked a fresh openHABian install, there is no dbus timesync or other second time daemon there but systemd-timesyncd is also reported to have stopped as failed. I was able to start it again and it has been running since but itā€™s not long enough to tell if thatā€™s permanent.

NEVER DELETE ANY DIRECTORIES. You can delete (better: rename) FILES in either /etc/systemd/system/ or /lib/systemd/system and issue systemctl daemon-daemon to uninstall a (stopped and disabled !) service but the proper way is to use systemctl mask.
systemctl will create/remove the right links for you.
You must not intervene manually or you have a high risk of trashing your system !
You can disable services with systemctl disable --now service and avoid permanently that it could indirectly or accidently be re-enabled by using systemctl mask service.
To check it worked try systemctl enable service after masking, it should refuse to.

1 Like

Yes, of course. I was sharing a rebuttal hypothesis as I try to work through this problem. I appreciate your advice. I only see one instance running:

openhabian@openhab-midway:~ $ systemctl list-units | grep sync
  ifupdown-pre.service                                                                                                                                          loaded active exited    Helper to synchronize boot up for ifupdown
  systemd-timesyncd.service                                                                                                                                     loaded active running   Network Time Synchronization
  time-sync.target                                                                                                                                              loaded active active    System Time Synchronized
  sdrsync.timer                                                                                                                                                 loaded active waiting   Run SD rsync daily except semiannually (when a raw dump is made)

I look forward to hearing how your experiment works out!

Thanks. I will give this a try.

I donā€™t have any news but the problem might be that there has been some change inside Raspi OS in the past and itā€™s now firing up another instance of timesyncd or a competing demon or whatever.

As youā€™re apparently really willing to help with development, you can create your own openHABian image to experiment with adding or removing parts of its configuration, hereā€™s how.
Itā€™s really simple, just a little time consuming (net time then again isnā€™t much, just compilation times).

Just clone the sources from Github, edit your local copy then push it back to Github. It will respond with that you donā€™t have write access etc pp and tell you a link to create a PR (pull request), enter that one.
When you upload, itā€™ll build an image that you can download and flash to your local (test) box.

Thereā€™s a function setup_ntp() in functions/system.bash Iā€™d start with.
Try to omit installation of timesyncd for a first attempt. Insert some status outputting code (/bin/date or ps -ef|grep -i ntp or whatever) instead to see NTP/date status of the box.
Maybe thatā€™s providing us some more insight.
Good luck.

Thanks for the ideas. I will give it a try and report back. It will be awhile, as we are going to be traveling most of the next month, and the spare Pi that I have is currently on loan to a friend, so I will need to get it back and give it a try.

Hi all,

I am experiencing also NTP binding issues together with some other as you can read here

I read this thread thouroughly. Acutally my system time was still up2date even though the NTP was not. So maybe that is a little different issue.

Thanks for sharing your experience. The more people who report a problem, the more interest there will be in fixing it. Or perhaps better said, the better the chance that someone with the needed background and skills will take it on.

As the OP on this thread, I hoping to explore the ideas that were suggested above. I should be getting my spare Pi back the end of the month. The suggestions are way beyond me, but Iā€™m happy to learn.

1 Like

I finally got my test machine back and Iā€™m ready to give this a try.
I cloned from GitHub, downloaded with Github Desktop, edited with VSCode (commented out the NTP section, added one of the lines you suggested), Pushed it back to GitHub.
I have my fork GitHub - BigGeorgeTx/openhabian: openHABian - empowering the smart home, for Raspberry Pi and Debian systems

Iā€™m not sure how to proceed. You said

I donā€™t see where I get the file to flash to an SD card from GitHub. Can you please tell me how to do this?

Hmm, your clone repo seems to be missing actions. I though they would be cloned, too.
Theyā€™re at openhabian/.github/workflows at main Ā· openhab/openhabian Ā· GitHub .
Add build.yml to your repo and see if you get a build action.

When I look in my clone repo, the actions are there: openhabian/.github/workflows at main Ā· BigGeorgeTx/openhabian Ā· GitHub

But your comment about Actions gave me an idea of where to look. I clicked on Actions and got this message: ā€œWorkflows arenā€™t being run on this forked repository
Because this repository contained workflow files when it was forked, we have disabled them from running on this fork. Make sure you understand the configured workflows and their expected usage before enabling Actions on this repository.ā€ Once I accepted this, I clicked Actions again and under Workflows ran the build action, which queued and than ran, with errors: Build Ā· BigGeorgeTx/openhabian@9c28990 Ā· GitHub

Do I need to sync the fork before building?
Not having heard anything, I decided to try it. It took several days for the fork sync to complete running, but once it did, when I ran the workflow for the build action, it completed successfully, with 45 minutes elapsed time.
Now I need to download and flash to my text box.
On the GitHub code page for my fork, I clicked on CODE then Download ZIP.
Created the image on the SD card using Raspberry Piā€™s imager.
Put in Pi and booted. The ethernet connection shows lots of activity, but I canā€™t connect to it via SSH.
Turns out the SD card was bad. Will try again with a new card and report back

I thinking I missing something to create the SD card image from the GitHub code. I tried downloading is as a zip file, but when I write that to the SD card using Rasperry Pi Imager, it doesnā€™t create a bootable SD card. Iā€™m not sure how to the create the .img file it appears to be looing for. Help, please.

George
try the Rasberry imager

That is what I am using. I have it write the downloaded zip file, but something is wrong. It doesnā€™t look like a boot disk

Not sure if you have downloaded the correct file. Reading ā€œdownloaded zip fileā€ either you downloaded the wrong file or just used the wrong term in your statement.
The image is not a zip ( .zip ) file but xz-compressed ( .xz ).

That is probably the problem, but I canā€™t figure out where to get that file on GitHub GitHub - BigGeorgeTx/openhabian: openHABian - empowering the smart home, for Raspberry Pi and Debian systems

Would you like to use the prebuild image ? Then you need to download it from Releases Ā· openhab/openhabian Ā· GitHub .
In case you would like to apply some fixes then you most probably do not want to download the prebuild image but would like to create your own image ?

I appreciate the suggestion. Iā€™m trying to follow @mstormi 's guidance to troubleshoot the issue I and others have with NTP service, and Iā€™m stuck at this point. It is a bit beyond my current knowledge, but Iā€™m happy to learn.

Itā€™s a .xz file (although sometimes shown as .zip) that in turn has another .xz pack of the image inside.
So open the download with WinRAR or whatever and unpack it.
That .xz the Raspi imager should be able to read.
Guess I should modify the openhabian build process to eliminate that inner compression.

Thanks, but Iā€™m not sure I understand. Or perhaps Iā€™m working with the wrong file.

On the mail GitHub page GitHub - BigGeorgeTx/openhabian: openHABian - empowering the smart home, for Raspberry Pi and Debian systems
I click on Code, then Download ZIP


This doesnā€™t appear to be a .xy file, so Iā€™m probably in the wrong place.

The right one is under Actions - Build - Artifacts.