timedatectl set-time freeze

General support questions
Post Reply
privalal
Posts: 3
Joined: 2023/04/24 10:25:46

timedatectl set-time freeze

Post by privalal » 2023/04/24 10:39:39

Hi!
I'm using /usr/bin/timedatectl from the bash script.
In general it works fine, but the enduser has detected the one-time script hang during execution of the command:
/usr/bin/timedatectl set-time '2023-04-14 07:40:00'

The only found issue is in the daemon.log:
Apr 14 08:38:46 celab dbus[737]: [system] Connection has not authenticated soon enough, closing it (auth_timeout=30000ms, elapsed: 30009ms)
Apr 14 08:38:56 celab systemd[1]: Time has been changed
Apr 14 08:39:26 celab dbus[737]: [system] Connection has not authenticated soon enough, closing it (auth_timeout=30000ms, elapsed: 30009ms)
Apr 14 07:40:00 celab systemd[1]: Time has been changed
Apr 14 07:40:30 celab dbus[737]: [system] Connection has not authenticated soon enough, closing it (auth_timeout=30000ms, elapsed: 30014ms)
Apr 14 08:40:21 celab systemd[1]: Time has been changed

What can be a root cause of this?

Thanks!!

PS
CentOS 7.9

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: timedatectl set-time freeze

Post by jlehtone » 2023/04/24 12:59:11

Why do you set the time explicitly?

One could use system role https://access.redhat.com/documentation ... n-rhel-7.9 to set up time sync service (chrony by default) and then the service takes you to "current time".

privalal
Posts: 3
Joined: 2023/04/24 10:25:46

Re: timedatectl set-time freeze

Post by privalal » 2023/04/24 15:47:42

jlehtone wrote:
2023/04/24 12:59:11
Why do you set the time explicitly?
Machine works in the isolated network segment, no NTP servers available nearby.
User can change time through script (with gui fronted of course)..

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: timedatectl set-time freeze

Post by TrevorH » 2023/04/24 18:13:19

Is it being run with root privileges? They will be required for timedatectl to do anything.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

privalal
Posts: 3
Joined: 2023/04/24 10:25:46

Re: timedatectl set-time freeze

Post by privalal » 2023/04/25 09:50:21

TrevorH wrote:
2023/04/24 18:13:19
Is it being run with root privileges?
sure!
The stack:
User script -->
Application with suid bit (Access: (6775/-rwsrwsr-x) Uid: ( 0/root) Gid: ( 0/ root) -->
timedatectl.
It has executed ~100 times but 101 was fail. strange.

Post Reply