Reconnect on wake - not working (1.7b1 & 1.7b2 & 1.7b3)

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

StuartM

Posts: 16
Joined: Sun Feb 05, 2017 10:07 pm

Post by StuartM » Thu May 04, 2017 7:31 am
1.7b1 app dated 1 May 2017
Nothing changed in any preferences and the "Reconnect on Wake" still checked enabled yet on wake Viscosity is making no effort to reconnect. And I've been online fr hours several times before I've noticed.

Ideas? Previous version did the reconnect fine, seems to have just started with this update.

And additional info you need ? (logs from the Details ... display don't show anything as it's not trying to reconnect so the last entry is "State changed to Disconnected" from when the laptop was "closed (went to sleep).

(serious issue - unless there is some magic fix, how to I revert to previous version because no VPN after wake makes ...)
Last edited by StuartM on Fri May 05, 2017 8:21 am, edited 2 times in total.

StuartM

Posts: 16
Joined: Sun Feb 05, 2017 10:07 pm

Post by StuartM » Thu May 04, 2017 7:37 pm
1.7b2 is doing the same (i.e. not reconnecting on wake from sleep.

If you quit and re-run Viscosity the automatically connects to the so configured connection.

I've tried unchecking the "Reconnect on Wake" and restarting Viscosity (still does nothing so not that the setting is the "wrong way round") and resetting the option and restarting Viscosity and still does nothing on wake from sleep.

James

User avatar
Posts: 2313
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Tue May 09, 2017 7:13 pm
Hi StuartM,

We've tested this one and I'm afraid we're unable to see similar behaviour. Connections re-connect attempts appear to be correctly triggered upon wake on our test installs.

Looking at prior forum posts it appears you may be using a custom ConnectOnWakeDelay value or reconnect script. If you're using a custom value please ensure that it is (inclusively) between 1 and 60 (seconds). Values outside of this range will be ignored and the default value used. If you are using any custom scripts you may like to try temporarily disabling/removing them and see if the same issue persists.

I would also recommend checking the Connection Log for the connection/s active when you put your computer to sleep, as it's possible that Viscosity may be triggering a connection attempt, but it may be aborting or failing quickly (e.g. the connection may not be reachable):
http://www.sparklabs.com/support/kb/art ... envpn-log/

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs

StuartM

Posts: 16
Joined: Sun Feb 05, 2017 10:07 pm

Post by StuartM » Wed May 10, 2017 1:16 am
James wrote:
Hi StuartM,

We've tested this one and I'm afraid we're unable to see similar behaviour. Connections re-connect attempts appear to be correctly triggered upon wake on our test installs.

Looking at prior forum posts it appears you may be using a custom ConnectOnWakeDelay value or reconnect script. If you're using a custom value please ensure that it is (inclusively) between 1 and 60 (seconds). Values outside of this range will be ignored and the default value used. If you are using any custom scripts you may like to try temporarily disabling/removing them and see if the same issue persists.

I would also recommend checking the Connection Log for the connection/s active when you put your computer to sleep, as it's possible that Viscosity may be triggering a connection attempt, but it may be aborting or failing quickly (e.g. the connection may not be reachable):
http://www.sparklabs.com/support/kb/art ... envpn-log/

Cheers,
James
Never went for the ConnectOnWakeDelay is it all went rather weird (from memory). Below is the .ovpn without the certificate. In the end I had to remove the (non-config) "Automatically reconnect if disconnected" for all connections in the preferences. I tried enabling this for the connection being used and it makes no difference.

You have to leave the Mac in sleep for a reasonable time (couple of minutes) without mains power often a brief sleep and wake and it will have remained connected. I close the laptop to enter sleep so maybe for brief periods it does not sleep (I have "Powernap" enabled whilst on mains power).

When waking from sleep the log for the connection that should re-establish shows
Code: Select all
2017-05-09 15:57:02: Viscosity OpenVPN Engine Started
2017-05-09 15:57:02: Running on macOS 10.12.4
2017-05-09 15:57:02: ---------
2017-05-09 15:57:02: State changed to Disconnected
2017-05-09 15:57:03: State changed to Disconnected
(the disconnected time corresponding to the time the laptop was closed and power removed). So nothing logged after the entering sleep. If you need info from other logs then please let me know (I had a hunt through using Console and could not find anything).

It is an every time thing (not intermittent, provided left in sleep without mains for a few minutes).

If I notice it's not connected (or on testing) and I immediately manually reconnect the connection then it connects fine.

I reverted to version 1.6.8 (1370) and the reconnect on wake works perfectly 100% every time, identical configs, only change being the different Viscosity.app (and helper tool re-installed). Back to 1.7b3 and no reconnect on wake from sleep atall (again no config changes, just the “Check of updates … Install and relaunch”).

If you need any more info, config details, logs, etc. then let me know but it's definitely something in the 1.7 betas and not in the 1.6.8 release versions and it's an every time thing (not intermittent).
Code: Select all
client
dev tun
proto udp
remote-random
remote 80.84.49.4 443      # alegedi
remote 88.150.240.7 443    # bellatrix
remote 94.229.74.90 443    # carinae
#remote 82.145.37.202 443   # dabih
remote 84.39.117.56 443    # naos
remote 84.39.116.179 443   # nashira
#remote 78.129.153.40 443   # nuki
remote 185.103.96.132 443   # alathfar
remote 185.103.96.134 443   # betelguese
remote 185.103.96.133 443   # deneboa
remote 185.103.96.131 443   # kitel
remote 185.103.96.130 443   # minkar 
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
comp-lzo no
verb 3
explicit-exit-notify 5

StuartM

Posts: 16
Joined: Sun Feb 05, 2017 10:07 pm

Post by StuartM » Wed May 17, 2017 6:19 am
Still a problem in 1.7b8 (and revert to latest full release without changing anything else config wise and it works, all betas don't).

Have you managed to reproduce it ? do you need any more info ? It's an every time problem (not just occasionally).

I'm worried as I'm spending most of my time not protected by a VPN because I'm so used to an automatic reconnect and now it wont and I don't know where you are at with this issue. If you need any more info then do ask.

StuartM

Posts: 16
Joined: Sun Feb 05, 2017 10:07 pm

Post by StuartM » Wed May 24, 2017 1:03 am
Reported during the beta https://www.sparklabs.com/forum/viewtop ... f=3&t=2307 and got a "it is something else" - which I responded to (it wasn't what you suggested), gave more info and you went silent AND THE RELEASE VERSION SUFFERS THE SAME ISSUE.

I posted my config, asked if you needed more info getting no response. This is a massive security hole and I'm running much of the time unprotected!

I would start being rude about your performance as it seems reporting reproducible issues is dismissed and ignored - and you end-up with security holes - but I'll restrain myself and not express my feelings.

So what info do you need or are you just going to keep ignoring this issue?

(Re-install 1.6.8 and it works fine on the identical configs, it's just the 1.7 betas and release that does not work)

Correction (sorry): It is now intermittent, sometimes does, sometimes does not. Longer machine left in sleep less likely to even try to reconnect. 1.68 is 100% reliable.

Clarification: It's not "failing to reconnect" - it is not even trying to reconnect (so never gets as far as failing).

James

User avatar
Posts: 2313
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Wed May 24, 2017 5:06 am
Hi StuartM,

I'm afraid there are no known issues. The wake feature has been extensively tested, and we have not had any other reports of problems.

I'd recommend revisiting this post, as I believe the comments apply:
https://www.sparklabs.com/forum/viewtop ... 6741#p6745

I'd say the differing behaviour between 1.6.8 and 1.7 is that 1.7 is much, much faster than 1.6.8. When waking from sleep 1.6.8 needed a second or so to re-initialize, whereas under 1.7 this is essentially instant. My guess is your computer is somewhat slow at reestablishing a network connection after waking from sleep, and so the network isn't available when Viscosity checks whether the connection can be reconnected. It's likely the extra second or so it took 1.6 to start was enough time for your network to become ready. If this is the case increasing the ConnectOnWakeDelay value should be all that is required.

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs

StuartM

Posts: 16
Joined: Sun Feb 05, 2017 10:07 pm

Post by StuartM » Thu May 25, 2017 7:08 am
Tried that and works sometime not others. e.g. with the wake delay thing set to 10 I've opened the laptop, entered the password and I'm browsing the internet in way less than 10 seconds yet Viscosity has not even tried to reconnect - just sits there.

Just done another test: started counting seconds on opening laptop, entered password and screen/apps restored within 5 secs, Wi-Fi connected immediately (never saw it disconnected) and activity to and from internet happening (without any VPN) and when we then get to 10 secs Viscosity does nothing. Few minutes later and Viscosity still done nothing.
Code: Select all
2017-05-24 20:43:06: Testing address: 185.103.96.134 Reachable
2017-05-24 20:43:06: State changed to Disconnected
Last entry in log was from when laptop closed earlier, nothing since, nothing about unreachable or anything. Once or twice it has activated ok so intermittent.

James

User avatar
Posts: 2313
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Thu May 25, 2017 5:08 pm
Hi StuartM,

I'm afraid we're out of ideas (besides doing a complete OS reinstall). Does disabling Power Nap affect the behaviour at all?

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs

StuartM

Posts: 16
Joined: Sun Feb 05, 2017 10:07 pm

Post by StuartM » Fri May 26, 2017 4:51 am
Power nap makes not difference (it was only enabled on mains anyway but switching it off makes no difference).

I can't see how a OS re-install would make any difference (OS is not corrupt e.g. it works fine 100% with 1.6.8). Saying OS install is the same as Windows Support saying "Try Ctrl-Atl-Del".

What information do you need from me in terms of logs so you can find out what is and isn't going on ? Only logs I can find are the ones from the "details" display from the menu bar icon, but I'm technically aware enough to chase out other logs if you can tell me where to find them (I've been a software developer for far too many years C/C++/Objective-C - so give me some pointers re th info you need).
11 posts Page 1 of 2