You are not logged in.

#1 2020-11-29 00:22:34

hazote
Member
Registered: 2013-07-24
Posts: 46

time problem [solved]

Hello,

timedatectl 
Failed to query server: Unit dbus-org.freedesktop.timedate1.service is masked.
sudo systemctl unmask dbus-org.freedesktop.timedate1.service
sudo systemctl enable dbus-org.freedesktop.timedate1.service
Failed to enable unit: Unit file /etc/systemd/system/systemd-timedated.service is masked.
sudo  hwclock --show
2020-11-29 01:17:04.390059+00:00

maked then 

hwclock --systohc 

now my clock is on good hour, but I can't get time from net and this return me error for some application that can't synchronize.

any way to fix this ?

Last edited by hazote (2020-11-29 09:59:31)

Offline

#2 2020-11-29 00:41:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: time problem [solved]

What all is masked, and why?

find /etc/systemd/ -samefile /dev/null

EDIT: sorry, this was the wrong command - this will find hardlinks only, not symbolic links.  This should have been:

find -L /etc/systemd/ -samefile /dev/null

Last edited by Trilby (2020-11-29 15:25:21)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2020-11-29 08:09:52

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: time problem [solved]

Trilby wrote:

What all is masked, and why?

find /etc/systemd/ -samefile /dev/null

return nothing

Offline

#4 2020-11-29 08:36:14

seth
Member
Registered: 2012-09-03
Posts: 50,957

Re: time problem [solved]

stat /etc/systemd/system/systemd-timedated.service

Offline

#5 2020-11-29 09:19:50

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: time problem [solved]

seth wrote:
stat /etc/systemd/system/systemd-timedated.service

stat /etc/systemd/system/systemd-timedated.service
  Fichier : /etc/systemd/system/systemd-timedated.service -> /dev/null
   Taille : 9         	Blocs : 0          Blocs d'E/S : 4096   lien symbolique
Périphérique : 802h/2050d	Inœud : 10094075    Liens : 1
Accès : (0777/lrwxrwxrwx)  UID : (    0/    root)   GID : (    0/    root)
 Accès : 2020-11-29 00:54:24.830683158 +0000
Modif. : 2019-11-10 21:28:51.554314844 +0000
Changt : 2019-11-10 21:28:51.554314844 +0000
  Créé : 2019-11-10 21:28:51.554314844 +0000

Offline

#6 2020-11-29 09:24:10

seth
Member
Registered: 2012-09-03
Posts: 50,957

Re: time problem [solved]

find /etc/systemd -type l -exec test ! -f {} \; -print

Offline

#7 2020-11-29 09:35:25

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: time problem [solved]

seth wrote:
find /etc/systemd -type l -exec test ! -f {} \; -print

find /etc/systemd -type l -exec test ! -f {} \; -print
/etc/systemd/system/systemd-timedated.service

Last edited by hazote (2020-11-29 09:36:10)

Offline

#8 2020-11-29 09:43:36

seth
Member
Registered: 2012-09-03
Posts: 50,957

Re: time problem [solved]

So that's the only masked service (left)
While we still have no answer on "why", I'd suggest to unmask it.

Offline

#9 2020-11-29 09:59:15

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: time problem [solved]

sudo systemctl unmask systemd-timedated.service
sudo systemctl start systemd-timedated.service
timedatectl | grep local

return me to +1
make

tzselect

then to sync system

hwclock --systohc

all is fine now
but,I don't know why rslsync on the http://localhost:8888/gui/ always saying me "invalid time" and I can't sync to download/upload my files

timedatectl
               Local time: dim. 2020-11-29 11:10:22 UTC
           Universal time: dim. 2020-11-29 11:10:22 UTC
                 RTC time: dim. 2020-11-29 11:10:21    
                Time zone: n/a (UTC, +0000)            
System clock synchronized: no                          
              NTP service: inactive                    
          RTC in local TZ: no       

edit:

installed
ntp package

timedatectl set-ntp true
timedatectl status
               Local time: dim. 2020-11-29 10:19:05 UTC
           Universal time: dim. 2020-11-29 10:19:05 UTC
                 RTC time: dim. 2020-11-29 10:19:05    
                Time zone: n/a (UTC, +0000)            
System clock synchronized: yes                         
              NTP service: active                      
          RTC in local TZ: no       

Now I get sync,
and  I can use rslsync

Last edited by hazote (2020-11-29 10:21:44)

Offline

#10 2020-11-29 13:37:58

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: time problem [solved]

You didn't have to install ntp if you wanted to use systemd-timesyncd, I hope you don't have 2 timesync services running now ?


man timedatectl wrote:

       set-ntp [BOOL]
           Takes a boolean argument. Controls whether network time synchronization is active and enabled (if available). If the argument is
           true, this enables and starts the first existing network synchronization service. If the argument is false, then this disables
           and stops the known network synchronization services. The way that the list of services is built is described below.

There's no description of 'the way that the list of services is built' in the rest of the manpage .

My experience though is that systemd-timesyncd is always 'the first existing network synchronization service' found .


example from my system

$ systemctl status systemd-timesyncd.service 
● systemd-timesyncd.service - Network Time Synchronization
     Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:systemd-timesyncd.service(8)
[panoramix@silverbolt ~]$ systemctl status ntpd.service 
● ntpd.service - Network Time Service
     Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
     Active: active (running) since Sun 2020-11-29 12:26:22 CET; 2h 3min ago
    Process: 717 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
   Main PID: 721 (ntpd)
      Tasks: 2 (limit: 19002)
     Memory: 3.6M
     CGroup: /system.slice/ntpd.service
             └─721 /usr/bin/ntpd -g -u ntp:ntp
<redacted>
$ timedatectl
               Local time: zo 2020-11-29 14:30:25 CET   
           Universal time: zo 2020-11-29 13:30:25 UTC   
                 RTC time: zo 2020-11-29 13:30:26       
                Time zone: Europe/Amsterdam (CET, +0100)
System clock synchronized: yes                          
              NTP service: inactive                     
          RTC in local TZ: no                           
$ 

My system time is perfectly synchronized by ntp, but timedatectl thinks I don't have a ntp service running.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB