Using username "root".
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
[ OK ] Root access verified.
βββββββββββββββββββββββββββββββββββββββ
DietPi | 08:49 | Sat 03/03/18
βββββββββββββββββββββββββββββββββββββββ
v6.2 | RPi 3 Model B (armv7l)
βββββββββββββββββββββββββββββββββββββββ
IP eth0 | 192.168.0.3
βββββββββββββββββββββββββββββββββββββββ
[ INFO ] DietPi-Drive_Manager | Checking RootFS R/W access. Please wait...
[ OK ] DietPi-Drive_Manager | RootFS R/W access.
[ INFO ] DietPi-Software | Initializing database, please wait...
[ INFO ] DietPi-Software | Reading database, please wait...
βββββββββββββββββββββββββββββββββββββββ
DietPi | 08:49 | Sat 03/03/18
βββββββββββββββββββββββββββββββββββββββ
v6.2 | RPi 3 Model B (armv7l)
βββββββββββββββββββββββββββββββββββββββ
IP eth0 | 192.168.0.3
βββββββββββββββββββββββββββββββββββββββ
Welcome to DietPi-Software
Failed to create bus connection: No such file or directory
[ INFO ] DietPi-Run_ntpd | NTPD: Waiting for completion of systemd-timesyncd (1/30)
Failed to create bus connection: No such file or directory
[ INFO ] DietPi-Run_ntpd | NTPD: Waiting for completion of systemd-timesyncd (2/30)
Failed to create bus connection: No such file or directory
[ INFO ] DietPi-Run_ntpd | NTPD: Waiting for completion of systemd-timesyncd (3/30)
Failed to create bus connection: No such file or directory
[ INFO ] DietPi-Run_ntpd | NTPD: Waiting for completion of systemd-timesyncd (4/30)
Failed to create bus connection: No such file or directory
[ INFO ] DietPi-Run_ntpd | NTPD: Waiting for completion of systemd-timesyncd (5/30)
cat /DietPi/dietpi/.version
? 6.2uname -a
? StretchI experienced the same problem and waiting for about 2-3 min solved the problem for the first boot. After that i got this error some times moore before i figured out to adjust the timeserver in dietpi-config and it worked fine.
Still fix this bug for first time installation pls.
I ran the command but: -bash: dietpi-config: command not found
@juliocoliveira
I ran the command but: -bash: dietpi-config: command not found
/DietPi/dietpi/dietpi-config
Networking Options: NAS/MISC > NTP mirror
Once completed, to resume setup
/DietPi/dietpi/dietpi-software
notes:
dietpi-config
as an option to change NTP mirror?Failed to create bus connection: No such file or directory
Changed the mirror but still the Dbus error
@juliocoliveira
Changed the mirror but still the Dbus error
Thanks, we'll check that.
NTPD Mirror now functional?
you mean the NTP mirror selector? it removed the ntp package and emptied the /etc/ntp.conf
And tried to install and configure the NTP manually and got this:
root@DietPi:~# ntpd -q -g
3 Mar 11:15:36 ntpd[6709]: ntpd [email protected] Sat Oct 7 14:29:08 UTC 2017 (1): Starting
3 Mar 11:15:36 ntpd[6709]: Command line: ntpd -q -g
3 Mar 11:15:36 ntpd[6709]: proto: precision = 1.458 usec (-19)
restrict default: KOD does nothing without LIMITED.
3 Mar 11:15:36 ntpd[6709]: restrict default: KOD does nothing without LIMITED.
restrict ::: KOD does nothing without LIMITED.
3 Mar 11:15:36 ntpd[6709]: restrict ::: KOD does nothing without LIMITED.
3 Mar 11:15:36 ntpd[6709]: format error frequency file /etc/ntp.drift
3 Mar 11:15:36 ntpd[6709]: unable to bind to wildcard address :: - another process may be running - EXITING
@juliocoliveira
you mean the NTP mirror selector?
Yep.
it removed the ntp package and emptied the /etc/ntp.conf
Upon selecting the following option, ntp is installed:
Only when selecting the following (+option 4) "Advanced options" > "Time sync mode", will NTP be removed:
Please can you verify "Time sync mode" current setting.
i can't fix it, i disabled the ntp.
@juliocoliveira
i can't fix it, i disabled the ntp.
Ok π
We'll improve the error handling for v6.3, give the user more options to resolve NTPD issues on their network when it occurs:
@Fourdee
Override : (NOT RECOMMENDED) ....
hmm .. what does thies mean? Hard reset as synced and disable forever?
This should really be the last chance ...
Can it be a option, user can set date
once manually via whiptail
dialog?
date 030317492018
?
So installation or inital setup can move forward?
BTW:~
Don't believe, most user will know difference between NTPD
and Systemd-timesyncd
(first boot up). Or will NTPD Mode :
change will forward to Time Sync (NTP)
dialog?
Ahh ... got it! π /DietPi/dietpi/dietpi-config 3 1
π
@Fourdee
I just tested to switch to timesyncd as well:
Failed to create bus connection: No such file or directory
after every of the 30 attempts.timedatectl set-ntp true
when choosing mode 4 via dietpi-config, there also on manual execution the error occurs: https://github.com/Fourdee/DietPi/blob/testing/dietpi/func/dietpi-set_software#L238-L257root@VM-Stretch:~# systemctl enable systemd-timesyncd
Created symlink /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service β /lib/systemd/system/systemd-timesyncd.service.
root@VM-Stretch:~# systemctl start systemd-timesyncd
root@VM-Stretch:~# systemctl status systemd-timesyncd
β systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
ββdisable-with-time-daemon.conf
Active: inactive (dead)
Condition: start condition failed at Sat 2018-03-03 19:59:51 CET; 10s ago
ββ ConditionFileIsExecutable=!/usr/sbin/ntpd was not met
Docs: man:systemd-timesyncd.service(8)
root@VM-Stretch:~# apt purge ntp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libbsd0 libedit2 libopts25
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
ntp*
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 1,847 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 18264 files and directories currently installed.)
Removing ntp (1:4.2.8p10+dfsg-3+deb9u1) ...
(Reading database ... 18212 files and directories currently installed.)
Purging configuration files for ntp (1:4.2.8p10+dfsg-3+deb9u1) ...
Processing triggers for systemd (232-25+deb9u1) ...
root@VM-Stretch:~# systemctl start systemd-timesyncd
root@VM-Stretch:~# systemctl status systemd-timesyncd
β systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
ββdisable-with-time-daemon.conf
Active: active (running) since Sat 2018-03-03 20:01:04 CET; 2s ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 3844 (systemd-timesyn)
Status: "Synchronized to time server 185.207.104.70:123 (0.de.pool.ntp.org)."
Tasks: 2 (limit: 4915)
CGroup: /system.slice/systemd-timesyncd.service
ββ3844 /lib/systemd/systemd-timesyncd
Mar 03 20:01:04 VM-Stretch systemd[1]: Starting Network Time Synchronization...
Mar 03 20:01:04 VM-Stretch systemd[1]: Started Network Time Synchronization.
Mar 03 20:01:04 VM-Stretch systemd-timesyncd[3844]: Synchronized to time server 185.207.104.70:123 (0.de.pool.ntp.org).
So procedure on activating mode 4:
dietpi-software uninstall 106
systemctl daemon-reload
should not be necessary, as we adjust timesyncd config and not it's service file._systemctl enable systemd-timesyncd
systemctl start systemd-timesyncd
I see now uninstallation should have been done actually, but as you can see it somehow was not: https://github.com/Fourdee/DietPi/blob/testing/dietpi/func/dietpi-set_software#L222-L236
I see also we use timedatectl status --no-pager
which creates the same "bus missing" error message. What works instead is systemctl status systemd-timesyncd | grep 'Status: "Synchronized to time server'
e.g.
Jep confirmed timedatectl
need dbus
, but systemctl status/is-active systemd-timesyncd
can be used instead to verify status.
Actually we could even run timesyncd on demand via cron job:
@k-plan
hmm .. what does thies mean? Hard reset as synced and disable forever?
This should really be the last chance ...
Yep, last resort. Basically allows the system to run with DietPi scripts, and, without updating the time.
Can it be a option, user can set date once manually via whiptail dialog?
date 030317492018 ?
π
Yep, we could replace override
with this option.
@MichaIng
So procedure on activating mode 4:
dietpi-software uninstall 106
add timesyncd config
systemctl daemon-reload should not be necessary, as we adjust timesyncd config and not it's service file.
systemctl enable systemd-timesyncd
systemctl start systemd-timesyncd
I see now uninstallation should have been done actually, but as you can see it somehow was not: https://github.com/Fourdee/DietPi/blob/testing/dietpi/func/dietpi-set_software#L222-L236
Nice π I'll take a look.
@MichaIng
Had to change the detection of completion of timesync:
systemctl status systemd-timesyncd -l | grep -ci -m1 'Synchronized to time server'
The downside is, if the log entries truncate in systemd, our check for successful sync, will fail.
We need a better way of detecting its completion. as timedatectl status
cannot be used without dbus
.
We may need to install dbus
along side systemd-timesyncd
Setting high, to prevent me getting side tracked with other tickets :)
@Fourdee
We may need to install
dbus
along sidesystemd-timesyncd
Jep thought the same. Actually everything _could_ be managed without dbus
:
timedatectl set-ntp true
does nothing more than:systemctl enable systemd-timesyncd && systemctl start systemd-timesyncd
timedatectl status
can be replaced as you mentioned.systemctl status systemd-timesyncd | grep -q 'Status: "Synchronized to time server'
which will high likely not be truncated as it is not part of log but left aligned service info. But service must be started (running) for this to show up. Actually is there any truncate possible, if output is not done to terminal, but into variable or file?But if already systemd-timesyncd
is used, then users might expect timedatectl
to work, which does not without dbus
and would lead to bug reports. Thus jep: We should install dbus
along with NTP mode 4 (timesyncd).
To reduce mess with NTP, we could find a reliable way to use timesyncd as oneshot as well to replace NTP completely. I was playing around a bid and there are some possibilities:
systemd-networkd
, but this is another topic and on my VM I did not manage yet to get it run with it's internal DHCP client enabled π.@MichaIng
We should install dbus along with NTP mode 4 (timesyncd).
Agree π
To reduce mess with NTP, we could find a reliable way to use timesyncd as oneshot as well to replace NTP completely.
Yep, would be nice to remove NTP, however, I remember a while back systemd-timesync took nearly 2/3X longer to sync than NTP in my tests. May be a configuration issue (the old one), but yep, I'll look at removing NTP and switching to systemd-timesync if its viable.
But then, dbus
installed by default, larger image (1MB, not too bad)
π΄ 30-60 seconds to sync on RPi with systemd
π―οΈ 8 seconds ntpd
π΄ Spawns another BG process systemd-timedated
, which if stopped after systemd-timesyncd
, resets timedatectl status
.
π΄ Dbus additional pre-req
@MichaIng
Ok, will leave NTP in for now (due to https://github.com/Fourdee/DietPi/issues/1580#issuecomment-370569005), i did make all the changes in a new branch to test:
https://github.com/Fourdee/DietPi/commit/29e7f53443ed0337301582cf31626dc19d7aafa9
Worth mentioning softwares like OpenMediaVault depends on NTP, No NTP, no OMV
I fightinhg right now to keep OMV & NTP, but it fails because it waits for timesyncd completion..frustrating.
@ShinobiWPS
No big problem, just set dietpi-config > Advanced Options > Time sync mode > 0 Custom
and DietPi will work flawlessly with NTP. It does not check successful time sync state though, but expects NTP to do it's job successfully.
Most helpful comment
@Fourdee
I just tested to switch to timesyncd as well:
Failed to create bus connection: No such file or directory
after every of the 30 attempts.timedatectl set-ntp true
when choosing mode 4 via dietpi-config, there also on manual execution the error occurs: https://github.com/Fourdee/DietPi/blob/testing/dietpi/func/dietpi-set_software#L238-L257So procedure on activating mode 4:
dietpi-software uninstall 106
systemctl daemon-reload
should not be necessary, as we adjust timesyncd config and not it's service file._systemctl enable systemd-timesyncd
systemctl start systemd-timesyncd
I see now uninstallation should have been done actually, but as you can see it somehow was not: https://github.com/Fourdee/DietPi/blob/testing/dietpi/func/dietpi-set_software#L222-L236
I see also we use
timedatectl status --no-pager
which creates the same "bus missing" error message. What works instead issystemctl status systemd-timesyncd | grep 'Status: "Synchronized to time server'
e.g.Jep confirmed
timedatectl
needdbus
, butsystemctl status/is-active systemd-timesyncd
can be used instead to verify status.Actually we could even run timesyncd on demand via cron job: