Reconnect on wakeup not working

I updated recently to the latest client 1.3.4066.51, and previously the VPN would keep its connection for several days before needing the pin + 2fa entry.

Since the update, every time the computer wakes from sleep, I have to dig out the Authenticator code and re-enter them.

Here’s the service log since the wakeup (redacted):

[2024-11-06 10:31:21][WARN] :arrow_forward: watch: Wakeup restarting…

[2024-11-06 10:31:21][INFO] :arrow_forward: connection: Stopping reconnect
◆ client_disconnect=false
◆ client_disconnect_waiters=0
◆ client_disconnected=false
◆ client_provider=true
◆ client_startime=3870
◆ data_iface=“”
◆ data_mode=“”
◆ data_remotes=string{“x.x.x.x”}
◆ data_status=“connected”
◆ data_timestamp=1730885110
◆ data_tun_iface=“”
◆ ovpn_auth_failed=false
◆ ovpn_cmd=true
◆ ovpn_connected=true
◆ ovpn_dir=“”
◆ ovpn_last_auth_failed=-1
◆ ovpn_management_pass=false
◆ ovpn_management_port=0
◆ ovpn_path=“/Applications/Pritunl.app/Contents/Resources/pritunl-openvpn”
◆ ovpn_remotes=string{“x.x.x.x(x/udp)”}
◆ ovpn_running=1
◆ ovpn_tap_iface=“”
◆ profile_device_auth=false
◆ profile_disable_dns=false
◆ profile_disable_gateway=false
◆ profile_dynamic_firewall=false
◆ profile_force_connect=false
◆ profile_force_dns=false
◆ profile_geo_sort=false
◆ profile_id=“xxxx”
◆ profile_mode=“ovpn”
◆ profile_reconnect=true
◆ profile_sso_auth=false
◆ profile_system_profile=false
◆ profile_timeout=false
◆ reason=“stop_wait”
◆ state_closed=false
◆ state_closed_waiters=0
◆ state_deadline=false
◆ state_delay=false
◆ state_id=“xxxx”
◆ state_interactive=true
◆ state_no_reconnect=false
◆ state_stop=false
◆ state_system_interactive=false
◆ state_temp_paths=string{“/tmp/pritunl/xxxx”, “/tmp/pritunl/xxxx.auth”, “/tmp/pritunl/xxxx-block.sh”, “/tmp/pritunl/xxxx-up.sh”, “/tmp/pritunl/xxxx-down.sh”}
◆ state_time=time.Date(2024, time.November, 6, 9, 25, 10, 915277000, time.Local)
◆ wg_bash_path=“/Applications/Pritunl.app/Contents/Resources/bash”
◆ wg_conf_path=“”
◆ wg_conf_path2=“”
◆ wg_connected=false
◆ wg_last_handshake=0
◆ wg_path=“/Applications/Pritunl.app/Contents/Resources/wg”
◆ wg_priv_key=false
◆ wg_pub_key=false
◆ wg_quick_path=“/Applications/Pritunl.app/Contents/Resources/wg-quick”
◆ wg_server_pub_key=false
◆ wg_sso_start=time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)
◆ wg_sso_token=false
◆ wg_util_path=“”

[2024-11-06 10:31:21][ERRO] :arrow_forward: connection: Disconnecting
◆ client_disconnect=true
◆ client_disconnect_waiters=0
◆ client_disconnected=false
◆ client_provider=true
◆ client_startime=3870
◆ data_iface=“”
◆ data_mode=“”
◆ data_remotes=string{“x.x.x.x”}
◆ data_status=“connected”
◆ data_timestamp=1730885110
◆ data_tun_iface=“”
◆ ovpn_auth_failed=false
◆ ovpn_cmd=true
◆ ovpn_connected=true
◆ ovpn_dir=“”
◆ ovpn_last_auth_failed=-1
◆ ovpn_management_pass=false
◆ ovpn_management_port=0
◆ ovpn_path=“/Applications/Pritunl.app/Contents/Resources/pritunl-openvpn”
◆ ovpn_remotes=string{“x.x.x.x(x/udp)”}
◆ ovpn_running=1
◆ ovpn_tap_iface=“”
◆ profile_device_auth=false
◆ profile_disable_dns=false
◆ profile_disable_gateway=false
◆ profile_dynamic_firewall=false
◆ profile_force_connect=false
◆ profile_force_dns=false
◆ profile_geo_sort=false
◆ profile_id=“xxxx”
◆ profile_mode=“ovpn”
◆ profile_reconnect=true
◆ profile_sso_auth=false
◆ profile_system_profile=false
◆ profile_timeout=false
◆ state_closed=false
◆ state_closed_waiters=0
◆ state_deadline=false
◆ state_delay=false
◆ state_id=“xxxx”
◆ state_interactive=true
◆ state_no_reconnect=true
◆ state_stop=true
◆ state_system_interactive=false
◆ state_temp_paths=string{“/tmp/pritunl/xxxx”, “/tmp/pritunl/xxxx.auth”, “/tmp/pritunl/xxxx-block.sh”, “/tmp/pritunl/xxxx-up.sh”, “/tmp/pritunl/xxxx-down.sh”}
◆ state_time=time.Date(2024, time.November, 6, 9, 25, 10, 915277000, time.Local)
◆ wg_bash_path=“/Applications/Pritunl.app/Contents/Resources/bash”
◆ wg_conf_path=“”
◆ wg_conf_path2=“”
◆ wg_connected=false
◆ wg_last_handshake=0
◆ wg_path=“/Applications/Pritunl.app/Contents/Resources/wg”
◆ wg_priv_key=false
◆ wg_pub_key=false
◆ wg_quick_path=“/Applications/Pritunl.app/Contents/Resources/wg-quick”
◆ wg_server_pub_key=false
◆ wg_sso_start=time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)
◆ wg_sso_token=false
◆ wg_util_path=“”

[2024-11-06 10:31:21][INFO] :arrow_forward: connection: Stopping reconnect
◆ client_disconnect=false
◆ client_disconnect_waiters=0
◆ client_disconnected=false
◆ client_provider=true
◆ client_startime=3870
◆ data_iface=“”
◆ data_mode=“”
◆ data_remotes=string{“x.x.x.x”}
◆ data_status=“connected”
◆ data_timestamp=1730885110
◆ data_tun_iface=“”
◆ ovpn_auth_failed=false
◆ ovpn_cmd=true
◆ ovpn_connected=true
◆ ovpn_dir=“”
◆ ovpn_last_auth_failed=-1
◆ ovpn_management_pass=false
◆ ovpn_management_port=0
◆ ovpn_path=“/Applications/Pritunl.app/Contents/Resources/pritunl-openvpn”
◆ ovpn_remotes=string{“x.x.x.x(x/udp)”}
◆ ovpn_running=1
◆ ovpn_tap_iface=“”
◆ profile_device_auth=false
◆ profile_disable_dns=false
◆ profile_disable_gateway=false
◆ profile_dynamic_firewall=false
◆ profile_force_connect=false
◆ profile_force_dns=false
◆ profile_geo_sort=false
◆ profile_id=“xxxx”
◆ profile_mode=“ovpn”
◆ profile_reconnect=true
◆ profile_sso_auth=false
◆ profile_system_profile=false
◆ profile_timeout=false
◆ reason=“stop_background”
◆ state_closed=false
◆ state_closed_waiters=0
◆ state_deadline=false
◆ state_delay=false
◆ state_id=“xxxx”
◆ state_interactive=true
◆ state_no_reconnect=false
◆ state_stop=false
◆ state_system_interactive=false
◆ state_temp_paths=string{“/tmp/pritunl/xxxx”, “/tmp/pritunl/xxxx.auth”, “/tmp/pritunl/xxxx-block.sh”, “/tmp/pritunl/xxxx-up.sh”, “/tmp/pritunl/xxxx-down.sh”}
◆ state_time=time.Date(2024, time.November, 6, 9, 25, 10, 915277000, time.Local)
◆ wg_bash_path=“/Applications/Pritunl.app/Contents/Resources/bash”
◆ wg_conf_path=“”
◆ wg_conf_path2=“”
◆ wg_connected=false
◆ wg_last_handshake=0
◆ wg_path=“/Applications/Pritunl.app/Contents/Resources/wg”
◆ wg_priv_key=false
◆ wg_pub_key=false
◆ wg_quick_path=“/Applications/Pritunl.app/Contents/Resources/wg-quick”
◆ wg_server_pub_key=false
◆ wg_sso_start=time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)
◆ wg_sso_token=false
◆ wg_util_path=“”

[2024-11-06 10:31:24][INFO] :arrow_forward: utils: Restore DNS
[2024-11-06 10:31:24][INFO] :arrow_forward: utils: Restore DNS
[2024-11-06 10:31:25][INFO] :arrow_forward: utils: Clearing DNS state

[2024-11-06 10:31:25][INFO] :arrow_forward: profile: Disconnected without restart
◆ client_disconnect=true
◆ client_disconnect_waiters=0
◆ client_disconnected=true
◆ client_provider=true
◆ client_startime=3875
◆ data_iface=“”
◆ data_mode=“”
◆ data_remotes=string{“x.x.x.x”}
◆ data_status=“disconnected”
◆ data_timestamp=0
◆ data_tun_iface=“”
◆ ovpn_auth_failed=false
◆ ovpn_cmd=true
◆ ovpn_connected=true
◆ ovpn_dir=“”
◆ ovpn_last_auth_failed=-1
◆ ovpn_management_pass=false
◆ ovpn_management_port=0
◆ ovpn_path=“/Applications/Pritunl.app/Contents/Resources/pritunl-openvpn”
◆ ovpn_remotes=string{“x.x.x.x(x/udp)”}
◆ ovpn_running=-1
◆ ovpn_tap_iface=“”
◆ profile_device_auth=false
◆ profile_disable_dns=false
◆ profile_disable_gateway=false
◆ profile_dynamic_firewall=false
◆ profile_force_connect=false
◆ profile_force_dns=false
◆ profile_geo_sort=false
◆ profile_id=“xxxx”
◆ profile_mode=“ovpn”
◆ profile_reconnect=true
◆ profile_sso_auth=false
◆ profile_system_profile=false
◆ profile_timeout=false
◆ state_closed=true
◆ state_closed_waiters=0
◆ state_deadline=false
◆ state_delay=false
◆ state_id=“xxxx”
◆ state_interactive=true
◆ state_no_reconnect=true
◆ state_stop=true
◆ state_system_interactive=false
◆ state_temp_paths=string{“/tmp/pritunl/xxxx”, “/tmp/pritunl/xxxx.auth”, “/tmp/pritunl/xxxx-block.sh”, “/tmp/pritunl/xxxx-up.sh”, “/tmp/pritunl/xxxx-down.sh”}
◆ state_time=time.Date(2024, time.November, 6, 9, 25, 10, 915277000, time.Local)
◆ wg_bash_path=“/Applications/Pritunl.app/Contents/Resources/bash”
◆ wg_conf_path=“”
◆ wg_conf_path2=“”
◆ wg_connected=false
◆ wg_last_handshake=0
◆ wg_path=“/Applications/Pritunl.app/Contents/Resources/wg”
◆ wg_priv_key=false
◆ wg_pub_key=false
◆ wg_quick_path=“/Applications/Pritunl.app/Contents/Resources/wg-quick”
◆ wg_server_pub_key=false
◆ wg_sso_start=time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)
◆ wg_sso_token=false
◆ wg_util_path=“”

[2024-11-06 10:31:29][INFO] :arrow_forward: utils: Restore DNS

And here are the logs from when I subsequently reauthenticated, in case it helps:

[2024-11-06 10:59:39][INFO] :arrow_forward: profile: Connecting
◆ device_auth=false
◆ disable_dns=false
◆ disable_gateway=false
◆ dynamic_firewall=false
◆ force_connect=false
◆ force_dns=false
◆ geo_sort=“”
◆ mode=“ovpn”
◆ profile_id=“xxxx”
◆ reconnect=true
◆ sso_auth=false

[2024-11-06 10:59:39][INFO] :arrow_forward: connection: Resolved remotes
◆ public_address=“”
◆ public_address6=“”
◆ remotes=string{“x.x.x.x”}
◆ sort_method=“random”

[2024-11-06 10:59:39][INFO] :arrow_forward: connection: Attempting remotes
◆ client_disconnect=false
◆ client_disconnect_waiters=0
◆ client_disconnected=false
◆ client_provider=true
◆ client_startime=0
◆ data_iface=“”
◆ data_mode=“”
◆ data_remotes=string{“x.x.x.x”}
◆ data_status=“connecting”
◆ data_timestamp=0
◆ data_tun_iface=“”
◆ ovpn_auth_failed=false
◆ ovpn_cmd=false
◆ ovpn_connected=false
◆ ovpn_dir=“”
◆ ovpn_last_auth_failed=-1
◆ ovpn_management_pass=false
◆ ovpn_management_port=0
◆ ovpn_path=“/Applications/Pritunl.app/Contents/Resources/pritunl-openvpn”
◆ ovpn_remotes=string{}
◆ ovpn_running=0
◆ ovpn_tap_iface=“”
◆ profile_device_auth=false
◆ profile_disable_dns=false
◆ profile_disable_gateway=false
◆ profile_dynamic_firewall=false
◆ profile_force_connect=false
◆ profile_force_dns=false
◆ profile_geo_sort=false
◆ profile_id=“xxxx”
◆ profile_mode=“ovpn”
◆ profile_reconnect=true
◆ profile_sso_auth=false
◆ profile_system_profile=false
◆ profile_timeout=false
◆ remotes=string{“x.x.x.x”}
◆ state_closed=false
◆ state_closed_waiters=0
◆ state_deadline=false
◆ state_delay=false
◆ state_id=“3a2113561ec56xxxx7c7”
◆ state_interactive=true
◆ state_no_reconnect=false
◆ state_stop=false
◆ state_system_interactive=false
◆ state_temp_paths=string{}
◆ state_time=time.Date(2024, time.November, 6, 10, 59, 39, 17325000, time.Local)
◆ wg_bash_path=“/Applications/Pritunl.app/Contents/Resources/bash”
◆ wg_conf_path=“”
◆ wg_conf_path2=“”
◆ wg_connected=false
◆ wg_last_handshake=0
◆ wg_path=“/Applications/Pritunl.app/Contents/Resources/wg”
◆ wg_priv_key=false
◆ wg_pub_key=false
◆ wg_quick_path=“/Applications/Pritunl.app/Contents/Resources/wg-quick”
◆ wg_server_pub_key=false
◆ wg_sso_start=time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)
◆ wg_sso_token=false
◆ wg_util_path=“”

This has been fixed in the repository and will be included in the release this week.

Amazing! Thank you.

Hi Zach, using 1.3.4083, still dropping the connection every time my Mac sleeps. What can I do to diagnose?

Verify that Pritunl Client Authentication Cache is enabled in the top right settings on the server web console. Then reimport the profile to the client. The OpenVPN Authentication Cache option will no longer be attempted with the newer client.

I’ll try it. Many thanks.