Server and client time is out of sync

Hello comrades, I have tried to login to my account from mobile app, but can not.
Here is my time settings:

johnDoe@Terramont-staging:~$ timedatectl 
               Local time: Mon 2023-11-06 17:47:14 MSK
           Universal time: Mon 2023-11-06 14:47:14 UTC
                 RTC time: Mon 2023-11-06 14:47:48
                Time zone: Europe/Moscow (MSK, +0300)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no
johnDoe@Terramont-staging:~$

I have Moscow time on my phone.

I have installed chrony:

johnDoe@Terramont-staging:~$ sudo systemctl status chrony
â—Ź chrony.service - chrony, an NTP client/server
     Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-11-06 17:47:07 MSK; 3min 58s ago
       Docs: man:chronyd(8)
             man:chronyc(1)
             man:chrony.conf(5)
    Process: 763460 ExecStart=/usr/lib/systemd/scripts/chronyd-starter.sh $DAEMON_OPTS (code=exited, status=0/SUCCESS)
   Main PID: 763469 (chronyd)
      Tasks: 2 (limit: 4647)
     Memory: 1.3M
        CPU: 131ms
     CGroup: /system.slice/chrony.service
             ├─763469 /usr/sbin/chronyd -F 1
             └─763470 /usr/sbin/chronyd -F 1

Nov 06 17:47:07 Terramont-staging systemd[1]: Starting chrony, an NTP client/server...
Nov 06 17:47:07 Terramont-staging chronyd[763469]: chronyd version 4.2 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGN>
Nov 06 17:47:07 Terramont-staging chronyd[763469]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/chrony.drift
Nov 06 17:47:07 Terramont-staging chronyd[763469]: Using right/UTC timezone to obtain leap second data
Nov 06 17:47:07 Terramont-staging chronyd[763469]: Loaded seccomp filter (level 1)
Nov 06 17:47:07 Terramont-staging systemd[1]: Started chrony, an NTP client/server.
Nov 06 17:49:33 Terramont-staging chronyd[763469]: Source 81.169.204.195 replaced with 164.68.124.74 (0.ubuntu.pool.ntp.org)

Please help me. How to synchronize time on phone and server ?

hey @vardidze-rostom welcome to the forum!

What distribution did you install on initially?

For your phone do you have it set to automatic time or did you manually adjust the time?

Also, are you 100% sure that the time sync is the issue with connecting your mobile to your instance?

My distribution is Ubuntu 22.04 and I have installed Passbolt via docker.
On my phone I have configured automatic time.

I don’t sure 100% that the time sync is the issue, but I can connect to another Passbolt account on my other server, that located in Moscow, although time on that server is not like Moscow:

user@wi-second:~$ timedatectl status
               Local time: Mon 2023-11-06 16:12:57 UTC
           Universal time: Mon 2023-11-06 16:12:57 UTC
                 RTC time: Mon 2023-11-06 16:12:56
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: no
              NTP service: n/a
          RTC in local TZ: no
user@wi-second:~$
user@wi-second:~$ docker ps | grep password_manager_passbolt_1
9592145188fe   passbolt/passbolt:latest-ce     "/usr/bin/wait-for.s…"   22 hours ago   Up 22 hours           443/tcp, 0.0.0.0:35543->80/tcp, :::35543->80/tcp                  password_manager_passbolt_1
user@wi-second:~$ 

I have fount the solution. The issue was because I didn’t open 123 UDP port for NTP on Firewall.

1 Like