"The VyprVPN service could not be contacted" if network missing (?)

System:
Windows 7 Home Premium, 64 bit running on a Toshiba laptop with loads of memory and a humongous hard drive.

VyprVPN 2.7.5.5242 - also true in earlier versions.

I also have VMware Workstation installed, which creates at least one synthetic network that is always guaranteed to work, but goes nowhere if no virtual machines are running. (Which, IMHO, is a defect in VMware, not VyprVPN)

Issue:
When starting the VyprVPN service I (occasionally) get the following dialog:

The VyprVPN service could not be contacted.  Would you like to attempt to start the service?

First things first: As a Software QA Engineer of many years standing, this is, without a doubt, one of the very best error dialogs I have ever seen. It succinctly describes the problem and (even better!), offers the user a useful workaround. Two thumbs up!

Possible cause
I notice that this appears to happen in one of two cases:

  1. There is no “real” (i.e. connected to the Internet), network connection.
  2. The VyprVPN service attempts to start too soon, before critical dependencies are running.

A potential workaround to case #2 is to set the startup attribute to “Automatic (Delayed Start)” instead of just “Automatic”

I do not know a workaround to case number one.

An additional data point:
If the VyprVPN service is started prior to the user realizing that there is no active network, the VyprVPN application just hangs with no icon in the system tray, no desktop dialog, and no way to kill it except by using the task manager and selecting “Kill process tree”, though a simple “Kill process” may work just as well.

Why this is a problem
I am often abroad, in countries where my local e-mail provider will not allow a mobile SMTP connection. I solve that problem by punching trough to a US based location, (usually NY), to avoid that restriction. To make things both easier and automatic, I have VyprVPN set to start when Windows starts.

However, this is not always the case, as when I am at home, within the US, on a known-good, high bandwidth, network connection - this occasionally happens. (Though I reduced the severity by changing the service’s startup attribute.)

This is also true if I am within the US, using a wireless network, and VyprVPN attempts to start prior to connecting to a live network rather than just VMware’s virtual network

Suggestion
In a future release,

  • Make “Automatic (Delayed Start)” the default startup attribute for the VyprVPN service.
  • Allow VyprVPN to detect, and ignore, virtual networks set up by virtualization software.

Is there a way to avoid the issue of VyprVPN failing/hanging on a missing network?

Thanks!

Jim

Hello again @jharris1993,

Thank you for your feedback on “the VyprVPN service could not be contacted” error.

Currently I have made our QA and Development teams aware of your post so that can review and retain this information. I see that in your posted you stated that changing the service to “Automatic (Delayed Start)” in place of “Automatic”, this is one of the very work around that we use in assisting customer.

We have also found this issue can be caused by corrupt Microsoft C++ redistributable installations on some Windows OS. The link below will walk you through a few other steps that we are suing to assist customer in this issue:

https://support.goldenfrog.com/hc/en-us/articles/204631257--Service-cannot-be-contacted-error

This issue is actively being worked on and investigated in to for a future resolution. The information that you have provided today will surly assist us in this!

Thank you again for your contribution!

Cody
Golden Frog Support

Thanks!

I tried re-installing the C++ redistributable, no change.

I didn’t think it would help, but I’ve been wrong before, so I gave it a try.

Let me know if anything happens concerning this issue at your end.

Jim

@jharris1993,

Jim,

If you would like to create a ticket so we can investigate further please go to the below link to create a support ticket with our 24/7 support team: https://www.goldenfrog.com/contact-support

Our QA team is actively reviewing the information you provided.

Thank you,

Josh
Golden Frog Support

Josh,

I’m thinking that it might be better to let the stew “simmer” a bit longer before I hit the fire-bell, 'eh?

Let’s give your QA/Dev people a chance to look at this first, I don’t want to confuse things more than they already are. ( :grin!: )

Jim

Update:
I performed the following steps on my 64 bit systems:

  • I downloaded the respective 32 and 64 bit versions of the 2008, 2010, and 2012 C++ redistributables from Microsoft’s download center.
  • I completely uninstalled the corresponding libraries, (and their associated updates), from my system. Note that in some cases, there was only the 32 bit version installed.
  • I did a frosty cold reboot, (i.e. I shutdown to a completely powered-off state, and then restarted, as I have found that warm-boots do not always return everything to their “at startup” reset state.)
  • I installed each library file, one at a time, doing a warm-boot after each install.
  • I allowed Windows Update to mangle my installs. ( :grinning: )

So far, there has been minimal or no recurrences of this issue. Unfortunately, my wife usually gets to the computer before me, so if that dialog shows up, she will likely press “Yes” and continue.

I will continue to monitor the situation and report any additional results I may find.

Note:
I tried to upload a ZIP file containing all of the library files I downloaded and installed, unfortunately your forum rules do not allow uploading of ZIP files.

Is there some other way I can send them to you if you are interested?

Jim (JR)

p.s. Rather than create a support ticket, I decided to report results - publicly - here so that others can benefit from my efforts.

Update Aug. 30, 2015:

I updated to the latest-and-greatest version of VyprVPN and noticed the “Could not contact” service error is being thrown again at each restart.

To help troubleshoot the issue, I did the following:

  1. Set the service to “Automatic (Delayed Start)” as it was set to “Automatic” - did not help
  2. Set the first, second, and subsequent restart actions in the service’s properties to “Restart Service”. This also did not help.
  3. Set the restart timers, both “restart service” and “reset fail counters”, to (cringe!) zero. This did not help either.
    Note: Do not try this at home! These are trained professionals! (If you try this, and things don’t work, you could end up with a “spinning service” which is a Bad Thing.)
  4. (a) Reset the service to “Automatic” instead of "Automatic (Delayed Start)
    (b) Set the first and second fail actions to “Restart Service”, and the “subsequent” failure action to “Take No Action”
    © Set the “reset fail counters” to “1” (one day), but left the “restart service” delay set to zero. This allows the service two tries to start and then dies if it doesn’t work after two tries.
    Result: VyprVPN started normally.

Note to developers: This is what I think is happening on my system, which has much installed and takes a non-trivial time to fully start. . .

  1. (Using “Delayed Start”)
    I believe that the VyprVPN service is taking too long to start when set to delayed. This is evidenced by the fact that even with the service set to “spin” on a failure, (see #3 above), the service had not yet started by the time the VyprVPN app started.
  2. (Using “Automatic Start” without the delay, and with all the recovery options set to "Take No Action)
    I believe that, in this particular case, the VyprVPN service is starting too quickly, (before essential pre-requisites have started), so it fails.
  3. (Using “Automatic Start” as before in #2, but with the first and second recovery options set to “Restart Service” with a zero-minute delay)
    This gives the service a couple of tries to start, whereupon it started successfully, prior to the VyprVPN app starting.

Ideas for a possible fix:
(please see the very interesting article on services, service failures, and how to manage them at https://mdenomy.wordpress.com/2008/02/28/using-the-automatic-recovery-features-of-windows-services/)
TinyURL: http://tinyurl.com/ngu6qdv

  1. The service should monitor itself for a successful start something like this:

    For i = 1 to 5
    StartService(parameters)
    If service started then [continue doing what you’re supposed to be doing]
    Sleep(2 seconds)
    next i
    ThrowExecption(exception-code)
    … and so on.
    The idea here is to allow the service to try to restart itself a few times, (in this case, five times), before just puking it’s guts up and failing miserably.

Likewise, the code in the VyprVPN application can make repeated attempts to contact the service, (with a two or three second pause between attempts), before throwing the “attempt to start” dialog.

I have attached a screen-shot of my revised properties dialog.

What say ye?

Jim (JR)

Hi. Fellow QA Engineer II here; how are you getting to where options can be set? On my laptop, once that message appears, and either ‘yes’ or ‘no’ is selected, it’s pretty much game over. ‘Yes’ keeps retrying and failing, and 'No" just ends the application. Vypr works fine on my desktop, and both that and the laptop are running Windows 10. Also, both have ASUS mainboards.

You have to go to your control panel.

Set “View By” to “Large Icons” (instead of categories, which IMHO is as useless as Teats on a Boar Hog)
Select “Administrative Tools”
Select “Services”
Scroll down and select the VyprVPN service.

Please read my caution about setting service properties!

If you’re mucking around with system services – which you will be if you mess with the “Services” administrative tool – it is very easy to bork your box if you are not careful.

Jim (JR)

Thanks! Unfortunately, that didn’t fix the problem. The service can’t even be stopped nor paused. I guess I’m going to delve deeper.

Did you stop the VPN application first? If VyprVPN is running, you won’t be able to touch the service.

Try this:

  1. Set the VyprVPN options so that it does not start at Windows startup.
  2. Reboot
  3. Try messing with the service.

Let us know how that works.

Jim (JR)