You are not logged in.

#1 2022-03-11 15:19:15

golam71
Member
Registered: 2022-03-11
Posts: 10

[SOLVED] cant get arch to sync time ( timedatecl to sync)

This is the output of timedatectl


[root@Arch ~]# timedatectl
                Local time: Fri 2022-03-11 20:42:55 +06
                Universal time: Fri 2022-03-11 14:42:55 UTC
                RTC time: Fri 2022-03-11 14:42:56
                Time zone: Asia/Dhaka (+06, +0600)
                System clock synchronized: no
                NTP service: active
                RTC in local TZ: no

i wanted to set " System clock synchronized: no" to " System clock synchronized: yes"
no matter what i try the clock does not sync

i tried the following

    hwclock --systohc
    timedatectl set-ntp true
    systemctl restart systemd-timesyncd

how ami suppsed to sync time with arch?

Last edited by golam71 (2022-03-15 06:55:01)

Offline

#2 2022-03-11 15:44:07

golam71
Member
Registered: 2022-03-11
Posts: 10

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

golam@Arch ~> systemctl status systemd-timesyncd.service
● systemd-timesyncd.service - Network Time Synchronization
     Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-03-11 21:30:19 +06; 10min ago
       Docs: man:systemd-timesyncd.service(8)
   Main PID: 1415 (systemd-timesyn)
     Status: "Idle."
      Tasks: 2 (limit: 2209)
     Memory: 1.7M
        CPU: 231ms
     CGroup: /system.slice/systemd-timesyncd.service
             └─1415 /usr/lib/systemd/systemd-timesyncd

Mar 11 21:38:35 Arch systemd-timesyncd[1415]: Timed out waiting for reply from 182.16.156.5:123 (1.arch.pool.ntp.org).
Mar 11 21:38:46 Arch systemd-timesyncd[1415]: Timed out waiting for reply from 202.4.96.234:123 (1.arch.pool.ntp.org).
Mar 11 21:38:56 Arch systemd-timesyncd[1415]: Timed out waiting for reply from 182.16.156.5:123 (2.arch.pool.ntp.org).
Mar 11 21:39:06 Arch systemd-timesyncd[1415]: Timed out waiting for reply from 103.110.112.14:123 (2.arch.pool.ntp.org).
Mar 11 21:39:16 Arch systemd-timesyncd[1415]: Timed out waiting for reply from 182.16.156.246:123 (2.arch.pool.ntp.org).
Mar 11 21:39:27 Arch systemd-timesyncd[1415]: Timed out waiting for reply from 202.4.96.234:123 (2.arch.pool.ntp.org).
Mar 11 21:39:37 Arch systemd-timesyncd[1415]: Timed out waiting for reply from 202.4.96.234:123 (3.arch.pool.ntp.org).
Mar 11 21:39:47 Arch systemd-timesyncd[1415]: Timed out waiting for reply from 182.16.156.246:123 (3.arch.pool.ntp.org).
Mar 11 21:39:57 Arch systemd-timesyncd[1415]: Timed out waiting for reply from 182.16.156.5:123 (3.arch.pool.ntp.org).
Mar 11 21:40:08 Arch systemd-timesyncd[1415]: Timed out waiting for reply from 103.110.112.14:123 (3.arch.pool.ntp.org).

Last edited by golam71 (2022-03-14 07:18:56)

Offline

#3 2022-03-11 15:46:33

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

So the problem would seem to be that you don't have a connection.

And please use code tags when posting things like this.

Offline

#4 2022-03-11 15:54:19

golam71
Member
Registered: 2022-03-11
Posts: 10

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

[root@Arch golam]# cat /etc/systemd/timesyncd.conf
[Time]
NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org
[root@Arch golam]# ping 0.arch.pool.ntp.org
PING 0.arch.pool.ntp.org (202.4.96.234) 56(84) bytes of data.
64 bytes from 202.4.96.234 (202.4.96.234): icmp_seq=1 ttl=53 time=14.4 ms
64 bytes from 202.4.96.234 (202.4.96.234): icmp_seq=2 ttl=53 time=129 ms
^C
--- 0.arch.pool.ntp.org ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 14.439/71.953/129.468/57.514 ms
[root@Arch golam]# timedatectl show-timesync --all
LinkNTPServers=
SystemNTPServers=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
FallbackNTPServers=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org
ServerName=3.arch.pool.ntp.org
ServerAddress=202.4.96.234
RootDistanceMaxUSec=5s
PollIntervalMinUSec=32s
PollIntervalMaxUSec=34min 8s
PollIntervalUSec=8min 32s
Frequency=0
[root@Arch golam]# timedatectl timesync-status
       Server: 202.4.96.234 (3.arch.pool.ntp.org)
Poll interval: 8min 32s (min: 32s; max 34min 8s)
 Packet count: 0

Last edited by golam71 (2022-03-14 07:20:02)

Offline

#5 2022-03-11 15:55:50

golam71
Member
Registered: 2022-03-11
Posts: 10

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

Scimmia wrote:

So the problem would seem to be that you don't have a connection.

And please use code tags when posting things like this.

i have internet  i can ping those ntp.org servers

Offline

#6 2022-03-11 15:57:52

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

That doesn't mean something else isn't blocked, such as the port being used.

Offline

#7 2022-03-11 15:59:45

GeorgeJP
Member
From: Czech Republic
Registered: 2020-01-28
Posts: 190

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

Do you use some firewall (iptables, nft ...) ?

Offline

#8 2022-03-11 16:25:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,734

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

Scimmia wrote:

And please use code tags when posting things like this.

Does restarting systemd-timesyncd or systemd-networkd sync the time?

Offline

#9 2022-03-12 08:42:45

golam71
Member
Registered: 2022-03-11
Posts: 10

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

seth wrote:
Scimmia wrote:

And please use code tags when posting things like this.

Does restarting systemd-timesyncd or systemd-networkd sync the time?


nope dude already tried that

Offline

#10 2022-03-12 08:55:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,734

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

Please post the complete system journal (sudo journalctl -b) and the output of "find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f"

Offline

#11 2022-03-12 13:56:59

golam71
Member
Registered: 2022-03-11
Posts: 10

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

seth wrote:

Please post the complete system journal (sudo journalctl -b) and the output of "find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f"



[root@Arch golam]# sudo journalctl -b
Mar 12 01:23:39 Arch kernel: microcode: microcode updated early to revision 0x838, date = 2019-04-22
Mar 12 01:23:39 Arch kernel: Linux version 5.16.13-arch1-1 (linux@archlinux) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.38>
Mar 12 01:23:39 Arch kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=d76a7904-a0f6-4bdd-bcbb-f86dea980d26 rw roo>
Mar 12 01:23:39 Arch kernel: x86/fpu: x87 FPU will use FXSAVE
Mar 12 01:23:39 Arch kernel: signal: max sigframe size: 1440
Mar 12 01:23:39 Arch kernel: BIOS-provided physical RAM map:
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009e7ff] usable
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x000000000009e800-0x000000000009ffff] reserved
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x0000000000100000-0x000000001effffff] usable
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x000000001f000000-0x000000001f0fffff] reserved
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x000000001f100000-0x000000001fffffff] usable
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x0000000020000000-0x00000000200fffff] reserved
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x0000000020100000-0x00000000781acfff] usable
[root@Arch golam]# sudo journalctl -b
Mar 12 01:23:39 Arch kernel: microcode: microcode updated early to revision 0x838, date = 2019-04-22
Mar 12 01:23:39 Arch kernel: Linux version 5.16.13-arch1-1 (linux@archlinux) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.38>
Mar 12 01:23:39 Arch kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=d76a7904-a0f6-4bdd-bcbb-f86dea980d26 rw roo>
Mar 12 01:23:39 Arch kernel: x86/fpu: x87 FPU will use FXSAVE
Mar 12 01:23:39 Arch kernel: signal: max sigframe size: 1440
Mar 12 01:23:39 Arch kernel: BIOS-provided physical RAM map:
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009e7ff] usable
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x000000000009e800-0x000000000009ffff] reserved
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x0000000000100000-0x000000001effffff] usable
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x000000001f000000-0x000000001f0fffff] reserved
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x000000001f100000-0x000000001fffffff] usable
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x0000000020000000-0x00000000200fffff] reserved
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x0000000020100000-0x00000000781acfff] usable
Mar 12 01:23:39 Arch kernel: BIOS-e820: [mem 0x00000000781ad000-0x00000000787acfff] reserved




and then

[root@Arch golam]# "find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f"
bash: find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf (%-40s: No such file or directory
bash: NF-0: command not found
bash: NF-1: command not found
bash: %sn, , ) }' | sort -f: command not found



ooooops sorry here


[root@Arch golam]# find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
dbus-org.freedesktop.network1.service    | system
dbus-org.freedesktop.nm-dispatcher.service | system
dbus-org.freedesktop.resolve1.service    | system
dbus-org.freedesktop.timesync1.service   | system
dirmngr.socket                           | sockets.target.wants
display-manager.service                  | system
gcr-ssh-agent.socket                     | sockets.target.wants
getty@tty1.service                       | getty.target.wants
gpg-agent-browser.socket                 | sockets.target.wants
gpg-agent-extra.socket                   | sockets.target.wants
gpg-agent.socket                         | sockets.target.wants
gpg-agent-ssh.socket                     | sockets.target.wants
iwd.service                              | multi-user.target.wants
NetworkManager.service                   | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
ntpdate.service                          | multi-user.target.wants
ntpd.service                             | multi-user.target.wants
p11-kit-server.socket                    | sockets.target.wants
pipewire.socket                          | sockets.target.wants
pulseaudio.socket                        | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
systemd-networkd.service                 | multi-user.target.wants
systemd-networkd.socket                  | sockets.target.wants
systemd-networkd-wait-online.service     | network-online.target.wants
systemd-network-generator.service        | sysinit.target.wants
systemd-resolved.service                 | multi-user.target.wants
systemd-timesyncd.service                | sysinit.target.wants
systemd-time-wait-sync.service           | sysinit.target.wants

Last edited by golam71 (2022-03-12 14:11:40)

Offline

#12 2022-03-12 14:22:07

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

Scimmia wrote:

And please use code tags when posting things like this.

https://wiki.archlinux.org/title/Genera … s_and_code
https://bbs.archlinux.org/help.php#bbcode

Offline

#13 2022-03-12 14:53:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

You have three conflicting networking services and three conflicting NTP services enabled. Decide which of the network services you want to use, if NetworkManager disable systemd-networkd(... and -networkd-wait-online)  and iwd, if the others disable at least NetworkManager and disable ntp and ntpdate if you intend this to be handled by systemd-timesyncd.

Also that isn't anything useful of the journal, rerun the command and paste the output somewhere: https://wiki.archlinux.org/title/List_o … n_services

Offline

#14 2022-03-12 15:20:47

golam71
Member
Registered: 2022-03-11
Posts: 10

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

V1del wrote:

You have three conflicting networking services and three conflicting NTP services enabled. Decide which of the network services you want to use, if NetworkManager disable systemd-networkd(... and -networkd-wait-online)  and iwd, if the others disable at least NetworkManager and disable ntp and ntpdate if you intend this to be handled by systemd-timesyncd.

Also that isn't anything useful of the journal, rerun the command and paste the output somewhere: https://wiki.archlinux.org/title/List_o … n_services


Hey thanks for pointing it out can u tell what i should do now to stop the 3 conflicting network services and NTP services so that we can close this post ?
thanks for the help
Also this would be helpful if u write the commands here

Also i think this is why its not working

Mar 12 14:57:02 Arch systemd-timesyncd[4728]: Timed out waiting for reply from 182.16.156.246:123 (1.arch.pool.ntp.org).
Mar 12 14:57:13 Arch systemd-timesyncd[4728]: Timed out waiting for reply from 103.110.112.14:123 (1.arch.pool.ntp.org).
Mar 12 14:57:23 Arch systemd-timesyncd[4728]: Timed out waiting for reply from 182.16.156.246:123 (2.arch.pool.ntp.org).
Mar 12 14:57:33 Arch systemd-timesyncd[4728]: Timed out waiting for reply from 182.16.156.5:123 (2.arch.pool.ntp.org).
Mar 12 14:57:43 Arch systemd-timesyncd[4728]: Timed out waiting for reply from 202.4.96.234:123 (2.arch.pool.ntp.org).
Mar 12 14:57:54 Arch systemd-timesyncd[4728]: Timed out waiting for reply from 103.110.112.14:123 (2.arch.pool.ntp.org).
Mar 12 14:58:04 Arch systemd-timesyncd[4728]: Timed out waiting for reply from 182.16.156.246:123 (3.arch.pool.ntp.org).
Mar 12 14:58:14 Arch systemd-timesyncd[4728]: Timed out waiting for reply from 182.16.156.5:123 (3.arch.pool.ntp.org).
Mar 12 14:58:24 Arch systemd-timesyncd[4728]: Timed out waiting for reply from 103.110.112.14:123 (3.arch.pool.ntp.org).
Mar 12 14:58:35 Arch systemd-timesyncd[4728]: Timed out waiting for reply from 202.4.96.234:123 (3.arch.pool.ntp.org).
root@Arch ~#

Last edited by golam71 (2022-03-14 07:57:20)

Offline

#15 2022-03-12 15:44:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,734

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

2ManyDogs wrote:
Scimmia wrote:

And please use code tags when posting things like this.

https://wiki.archlinux.org/title/Genera … s_and_code
https://bbs.archlinux.org/help.php#bbcode

Offline

#16 2022-03-12 16:24:19

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,592
Website

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

Please consider the above to be your last warning about using code tags. Fix your posts before you post again.

Mod note: moving to NC.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#17 2022-03-14 07:07:56

golam71
Member
Registered: 2022-03-11
Posts: 10

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

WorMzy wrote:

Please consider the above to be your last warning about using code tags. Fix your posts before you post again.

Mod note: moving to NC.


hi um i did solve the problem i had to disable the other 3 network manager services and the ntp services but i dont get the code tags part i did read the wiki it didint say anything about code tags it just said about bold yellow and crossed

maybe like this

 test 

yeah now i get it close the post and i will add code tags to all of my previous messages and i am really sorry for this mess
hope u don't mind have a good day   smile

Last edited by golam71 (2022-03-14 07:58:44)

Offline

#18 2022-03-14 08:15:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

Please mark it as [SOLVED] by editing the title in your first post: https://wiki.archlinux.org/title/Genera … ow_to_post

Offline

#19 2022-03-15 06:52:52

golam71
Member
Registered: 2022-03-11
Posts: 10

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

ok so heres what i did in whole

firstly i pasted the following

  find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f  

it showed me what services where working so i disabled all other network manager and ntp services
i had 3 running as someone said before
i stopped all of them and kept only these 2


 NetworkManager.service                   | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants

and for ntp service i had

 systemd-timesyncd.service

and then it was working but currently my isp has blocked the ntp service ip's or thats what i think so now
i disabled systemd-timesyncd.service . it was not working anyways and got a new ntp service
this time

 
sudo pacman -S ntp
sudo systemctl disable systemd-timesyncd.service
sudo systemctl enable ntpdate.service
 

hope this helps
thank you for your help  smile <3

Last edited by golam71 (2022-03-15 07:03:23)

Offline

#20 2022-03-15 06:56:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,734

Re: [SOLVED] cant get arch to sync time ( timedatecl to sync)

Mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Edit: apparently you figured it …

Last edited by seth (2022-03-15 06:56:38)

Offline

Board footer

Powered by FluxBB