# Auth timestamp expired - client fails to reconnect

**URL:** <https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512>\
**Category:** Pritunl VPN\
**Tags:** pritunl-client\
**Created:** [November 2, 2022, 3:43pm UTC](https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512 "2022-11-02T15:43:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anekos](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@anekos](https://forum.pritunl.com/u/anekos)\
**Post date:** [November 2, 2022, 3:43pm UTC](https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512/1 "2022-11-02T15:43:25Z")

</div>

We have been getting issues on a monthly base where some of our (linux) clients fail to reconnect / sync the profile due to temporary network failure (according to the logs). Our monitoring system didn’t report any network related issues for that period.

The clients are installed with `pritunl-client` (not electron)  
`pritunl-client: Installed: 1.3.3300.95-0ubuntu1~jammy`

The connection works again when we (re)start the profile with `pritunl-client start {profile}`  
Is there a way to configure infinite connection retries for the client?

* * *

 ![Screenshot from 2022-11-02 16-39-36](https://forum-static.pritunl.com/original/1X/cb011f5d6cec34d6c58d3060f461fd635f13b7d2.png)

```auto
[2022-08-29 11:14:54][INFO] ▶ profile: Profile exit, reconnecting ◆ profile_id="rc3vyuccpkidn3lpr22lu8b4prep2wmm"
[2022-08-29 11:14:54][INFO] ▶ profile: Disconnecting ◆ profile_id="rc3vyuccpkidn3lpr22lu8b4prep2wmm"
[2022-08-29 11:14:55][INFO] ▶ profile: Disconnected ◆ profile_id="rc3vyuccpkidn3lpr22lu8b4prep2wmm"
[2022-09-21 13:10:25][INFO] ▶ main: Service starting ◆ version="1.2.3236.80"
[2022-09-21 13:10:28][INFO] ▶ profile: Connecting ◆ dynamic_firewall=false ◆ mode="ovpn" ◆ profile_id="rc3vyuccpkidn3lpr22lu8b4prep2wmm"
[2022-09-21 13:10:28][ERRO] ▶ profile: Failed to sync system profile ◆ profile_id="rc3vyuccpkidn3lpr22lu8b4prep2wmm"
sprofile: Sync profile connection error
Get "https://xxx.xxx.xxx.xxx/key/sync/6287960c0efea7bf09ad8097/6287960d0efea7bf09ad80b3/622a1492027d7399eebee5f1/b81dfbced5a8d9c6b588767cc98c5519": dial tcp xxx.xxx.xxx.xxx:443: connect: network is unreachable
ORIGINAL STACK TRACE:
github.com/pritunl/pritunl-client-electron/service/sprofile.(*Sprofile).syncProfile
	/go/src/github.com/pritunl/pritunl-client-electron/service/sprofile/sprofile.go:436 +0x8ee4ec
github.com/pritunl/pritunl-client-electron/service/sprofile.(*Sprofile).Sync
	/go/src/github.com/pritunl/pritunl-client-electron/service/sprofile/sprofile.go:491 +0x902bf9
github.com/pritunl/pritunl-client-electron/service/profile.(*Profile).Start
	/go/src/github.com/pritunl/pritunl-client-electron/service/profile/profile.go:1244 +0x902a00
github.com/pritunl/pritunl-client-electron/service/profile.SyncSystemProfiles.func1
	/go/src/github.com/pritunl/pritunl-client-electron/service/profile/utils.go:391 +0x91454c
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1571 +0x465ee0
[2022-09-21 13:10:38][INFO] ▶ profile: Connecting ◆ dynamic_firewall=false ◆ mode="ovpn" ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-21 13:10:47][INFO] ▶ profile: Disconnecting ◆ profile_id="rc3vyuccpkidn3lpr22lu8b4prep2wmm"
[2022-09-21 13:10:48][INFO] ▶ profile: Disconnected ◆ profile_id="rc3vyuccpkidn3lpr22lu8b4prep2wmm"
[2022-09-21 13:34:08][INFO] ▶ profile: Profile exit, reconnecting ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-21 13:34:08][INFO] ▶ profile: Disconnecting ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-21 13:34:09][INFO] ▶ profile: Disconnected ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-21 13:34:12][INFO] ▶ main: Service starting ◆ version="1.3.3290.45"
[2022-09-21 13:34:15][INFO] ▶ profile: Connecting ◆ dynamic_firewall=false ◆ mode="ovpn" ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-26 15:03:28][INFO] ▶ profile: Profile exit, reconnecting ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-26 15:03:28][INFO] ▶ profile: Disconnecting ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-26 15:03:28][INFO] ▶ profile: Disconnected ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-26 17:03:31][INFO] ▶ main: Service starting ◆ version="1.3.3300.95"
[2022-09-26 17:03:34][INFO] ▶ profile: Connecting ◆ dynamic_firewall=false ◆ mode="ovpn" ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-26 22:02:55][INFO] ▶ profile: Profile exit, reconnecting ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-26 22:02:55][INFO] ▶ profile: Disconnecting ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-26 22:02:55][INFO] ▶ profile: Disconnected ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-26 22:03:03][INFO] ▶ profile: Connecting ◆ dynamic_firewall=false ◆ mode="ovpn" ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-09-26 22:03:06][ERRO] ▶ profile: Failed to sync system profile ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
sprofile: Sync profile connection error
Get "https://52.174.60.222/key/sync/61f93cb4caee1b0e01524c42/6226406503c32cce1705b6e7/61f944c1caee1b0e0152594b/a17d8a00c6b3ec08a36ae2cd1c7caa72": dial tcp 52.174.60.222:443: connect: no route to host
ORIGINAL STACK TRACE:
github.com/pritunl/pritunl-client-electron/service/sprofile.(*Sprofile).syncProfile
	/go/src/github.com/pritunl/pritunl-client-electron/service/sprofile/sprofile.go:441 +0x8f07cc
github.com/pritunl/pritunl-client-electron/service/sprofile.(*Sprofile).Sync
	/go/src/github.com/pritunl/pritunl-client-electron/service/sprofile/sprofile.go:496 +0x90431e
github.com/pritunl/pritunl-client-electron/service/profile.(*Profile).Start
	/go/src/github.com/pritunl/pritunl-client-electron/service/profile/profile.go:1159 +0x904100
github.com/pritunl/pritunl-client-electron/service/profile.SyncSystemProfiles.func1
	/go/src/github.com/pritunl/pritunl-client-electron/service/profile/utils.go:386 +0x9162ac
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1571 +0x465ee0
[2022-10-26 22:06:09][ERRO] ▶ profile: Stopping system profile due to authentication errors ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-10-26 22:06:09][INFO] ▶ profile: Disconnecting ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"
[2022-10-26 22:06:09][INFO] ▶ profile: Disconnected ◆ profile_id="a1qwx8m828morsmylahkjx46ltj5qqny"

```

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [November 2, 2022, 9:38pm UTC](https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512/2 "2022-11-02T21:38:26Z")

</div>

This should only occur if the profile receives authentication errors which typically don’t resolve on retries. Does this profile have authentication configured?

---

<div class="post-metadata">

**Author:** ![anekos](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@anekos](https://forum.pritunl.com/u/anekos)\
**Post date:** [November 3, 2022, 8:17am UTC](https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512/3 "2022-11-03T08:17:06Z")

</div>

Hi Zach,

Do you mean 2fa authentication?  
These clients are set to bypass secondary authentication.  
We use pritunl on our production (headless) linux servers, so 2fa authentication is not an option.

The issues mostly appear every 30 days when the client tries to re-authenticate / reconnect?

On the profile audit we see the following error message:  
`User connection to "prod-vpn" denied. Auth timestamp expired`

From the audit log below only the last connection (Nov 2 16:18) was done manually, the rest were done by the system.  
Both the clients and server are set to UTC.

 ![Screenshot from 2022-11-03 09-14-01](https://forum-static.pritunl.com/original/1X/3d127b9e09f681c7ae79daffbc9491a94bf660f8.png)

Edit:  
I just saw that a similar question is asked here:

> [@Auth\_time\_window](https://forum.pritunl.com/t/auth-time-window/459):
>
> Hi, One of my users is having an issue with the auth time window. They’re audit logs show the User connection to “%s” denied. Auth timestamp expired error. Wondering how to increase the settings.app.auth\_time\_window value? [pritunl/authorizer.py at master · pritunl/pritunl (github.com)](https://github.com/pritunl/pritunl/blob/master/pritunl/authorizer/authorizer.py#L352)

Our server has the default value for the setting, which is 12 hours:

```auto
$ sudo pritunl get app.auth_time_window
app.auth_time_window = 43200

```

Regards,  
Anestis

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [November 3, 2022, 4:45pm UTC](https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512/4 "2022-11-03T16:45:06Z")

</div>

I need more information about the configuration of the server.

Is either _Pritunl Authentication Cache_ or _OpenVPN Authentication Cache_ enabled in the top right settings?

In the advanced settings of the user having the issue what is the _Type_ set to?  
Is either the _PIN_ or _YubiKey ID_ set on the user?

---

<div class="post-metadata">

**Author:** ![anekos](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@anekos](https://forum.pritunl.com/u/anekos)\
**Post date:** [November 3, 2022, 7:47pm UTC](https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512/5 "2022-11-03T19:47:41Z")

</div>

Below are the user settings. All servers have the same settings.  
Type is `local`  
No pin or YubikeyID is used.

 ![user-settings](https://forum-static.pritunl.com/original/1X/604f97e8e5f106c6a966a967a13eb8e9b097083d.png)

Below are the general settings.  
We use Azure SSO, but this is only for normal (human) users’ accounts.  
Openvpn and pritunl authentication cache is disabled.

 ![server-settings](https://forum-static.pritunl.com/original/1X/da86263cd903771452ef1987f4464867b1195394.png)

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [November 3, 2022, 9:18pm UTC](https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512/6 "2022-11-03T21:18:09Z")

</div>

I have found the cause of this issue, it will be fixed in the next release.

---

<div class="post-metadata">

**Author:** ![anekos](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@anekos](https://forum.pritunl.com/u/anekos)\
**Post date:** [November 4, 2022, 7:59am UTC](https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512/7 "2022-11-04T07:59:43Z")

</div>

Hi Zach,

Thanks so much for looking into this issue.

The fix will be on the next client release?  
Can you advise when this is planned for?

Anestis

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [November 7, 2022, 12:39pm UTC](https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512/8 "2022-11-07T12:39:59Z")

</div>

This release is now available.

---

<div class="post-metadata">

**Author:** ![anekos](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@anekos](https://forum.pritunl.com/u/anekos)\
**Post date:** [November 7, 2022, 2:45pm UTC](https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512/9 "2022-11-07T14:45:26Z")

</div>

Hi Zach,

Is the fix in client version `1.3.3343.50`?  
Or is it on the server?

We are using the `pritunl-client` (no gui) version. I can see a new version on `pritunl-client-electron` only, the `pritunl-client` package doesn’t seem to have been updated with the latest release.

- pritunl-client-electron: got version `1.3.3343.50` on github, but apt-cache reports `1.3.3329.81-0ubuntu1~jammy` as latest.
- pritunl-client has not been updated since July…

Can you advise?

Thanks,  
Anestis

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [November 7, 2022, 8:47pm UTC](https://forum.pritunl.com/t/auth-timestamp-expired-client-fails-to-reconnect/512/10 "2022-11-07T20:47:45Z")

</div>

The Linux builds are now available on the repository.
