Unable to reconnect, stuck at ''connecting''

Got a problem with Viscosity or need help? Ask here!

kivawolf

Posts: 2
Joined: Wed Mar 26, 2014 11:44 pm

Post by kivawolf » Thu Mar 27, 2014 12:01 am
Hi,

The software works great, but I am having 2 problems.

1) when it disconnected after 24h of connection, it tried to reconnect but stuck at ''connecting...''
I have to manually disconnect and reconnect and then it works again.

2) when it disconnect the script of disconnection does not run. it run only when I manually disconnect VPN.

I am still in period of trial.
Thank you very much.

Eric

User avatar
Posts: 1146
Joined: Sun Jan 03, 2010 3:27 am

Post by Eric » Thu Mar 27, 2014 12:05 pm
Hi kivawolf,

The first thing to try that usually resolve your first issue to remove persist-tun from your connection. To do this, edit your connection and go to the Options tab. Untick any Persist Options that are selected, Save the connection and then reconnect.

The disconnect script is only run when a complete disconnection takes place. In the case of a reconnect attempt or dropout like you experienced, the script is not run to prevent potential problems as OpenVPN would normally reconnect to the server. If you do not want this to happen, you can force OpenVPN to disconnect when a dropout occurs instead of trying to reconnect, which will ensure that any disconnect scripts you have will run. To do this, edit your connection and go to the Advanced Tab. On a new line in the advanced commands section, add:

remap-usr1 sigterm

Save your connection and then reconnect.

Regards,

Eric
Eric Thorpe
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs

kivawolf

Posts: 2
Joined: Wed Mar 26, 2014 11:44 pm

Post by kivawolf » Fri Mar 28, 2014 9:14 am
Hi

thank you very much for reply
the solutions you suggested do not work.

1) when i added ''remap-usr1 sigterm'' at the end of advanced commands section, it refuse to connect to VPN. when I removed it, it works again.

2) I do not have any persist-tun selected.

Thank a lot.

Eric

User avatar
Posts: 1146
Joined: Sun Jan 03, 2010 3:27 am

Post by Eric » Fri Mar 28, 2014 11:44 am
Hi Kivawolf,

Please try:

remap-usr1 SIGTERM

SIGTERM needs to be in caps, my apologies.

If you have no Persist options, this makes the problem a bit more tricky. If you decide to use remap-usr1 SIGTERM, the reconnect won't attempt to happen at all. If you would still like to give it a go, could you please post a copy of your entire OpenVPN Log, and also a copy of your config as exported from Viscosity. Please keep in mind this is a public forum, so you may want to email this information, or remove any sensitive addresses from the config/logs.
https://www.sparklabs.com/support/#contact

Regards,

Eric
Eric Thorpe
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs

MethodActor

Posts: 1
Joined: Wed May 07, 2014 3:37 pm

Post by MethodActor » Wed May 07, 2014 3:48 pm
What does "persist tun" do? Is there a list of all these commands and abbreviations that explains what they mean?

Eric

User avatar
Posts: 1146
Joined: Sun Jan 03, 2010 3:27 am

Post by Eric » Wed May 07, 2014 4:43 pm
Hi MethodActor,

Specifically, the persist-tun option prevents the network interface that the connection is using from being 'reset' when a reconnection takes place, i.e. a dropout occurs, not a disconnect, preserving the current configuration of the interface. This has certain benefits like the adapter does not have to be setup again after a reconnect. On Windows specifically connecting to most VPN Providers though, it has pretty much no benefits and often prevents a reconnection occurring, as most VPN Provider will not assign a static dhcp set (i.e. IP address, subnet, DNS etc) to each of their users, rather one is dynamically assigned each connection.

When you go to reconnect, if a new IP address is assigned, or your VPN Providers DNS returns a different server to connect to (The connection address in your configuration will generally point to a large cluster of different servers), the connection will simply fail with the persist-tun option on.

The issue is unticking the persist-tun option will occasionally have no effect because some VPN Providers push the option when you connect, meaning it is enabled regardless. This is why we generally recommend users query their VPN Provider about dropout issues first, as often the best way to prevent problems during a reconnect is to prevent a reconnection being needed at all.

You can find a complete list of OpenVPN commands here - https://community.openvpn.net/openvpn/w ... n23ManPage

Regards,

Eric
Eric Thorpe
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
6 posts Page 1 of 1