Openconnect restarts permanently

Support requests about VPN Client Pro
Post Reply
rorus
Posts: 4
Joined: Thu Mar 04, 2021 8:38 pm

Openconnect restarts permanently

Post by rorus »

Hello,
I found a weird issue of the Openconnect block in the app.
On the server Haproxy serves openconnect backends (which are on different locations). When I connect to it via the app everything looks OK. However my device Xiaomi after sleep and awakened restarts the app's Openconnect and I see another IP4 and IP6. The option "Autorestart" has been checked both, in the device "Battery saving options" the "VPN Client Pro" is not restricted at all. I wonder what is wrong? At the same time Openvpn block works properly and does't restart after device's sleep/awaiking.
Thank you/
admin
Site Admin
Posts: 714
Joined: Fri Feb 15, 2019 4:04 pm
Contact:

Re: Openconnect restarts permanently

Post by admin »

Hello,

please, can you post the VPN log?

Here the steps to get the log:
  • tap on VPN profile name
  • tap on LOG tab
  • tap on top right icon with 3 dots
  • tap on "Export log"
admin
Site Admin
Posts: 714
Joined: Fri Feb 15, 2019 4:04 pm
Contact:

Re: Openconnect restarts permanently

Post by admin »

From the log you sent me, it appears that the connection is closed on the server side.
Most likely you are using the ocserv server. This server by default closes VPN connections if they are idle for 300 seconds.
If so, the problem can be solved by changing the idle-timeout option in the server configuration
rorus
Posts: 4
Joined: Thu Mar 04, 2021 8:38 pm

Re: Openconnect restarts permanently

Post by rorus »

Yes, thank you very much.
In the ocserv.conf config it's necessary to add options:
idle-timeout = 86400
mobile-idle-timeout = 86400
Post Reply