Hamachi does not connect (icons remain green) after sleep

0

I have a Windows 8 laptop and need to use it to ssh into an Ubuntu 16.04 desktop in the office. I use Hamachi on both machines to connect via a vpn.

Everything has been working fine for several weeks, until last week. Suddenly, when I wanted to establish a new PuTTY session, I got a timeout error. The machine I was trying to connect to continued to show as green, but when I tried to ping it from Hamachi I again got timeout errors.

So far, the problem has occasionally manifested itself after some time (on the order of hours) has passed since startup, and invariably after the computer wakes from sleep.

The only 'fix' has been to restart the computer (which restored functionality each of the five times I've done it so far) - a real pain on my slow laptop. The problem also seemed to spontaneously disappear once or twice (after many timeout errors I idly tried connecting once more, having nothing better to do at the time, not expecting anything to come of it, yet suddenly it worked).

Shutting down and restarting Logmein Hamachi entirely (including stopping and restarting the Tunneling Engine from Control Planel > Administrative Tools > Services) does not solve the problem

I've tried keeping lists of all the open processes on my laptop at various times when I could and could not connect. I figured that there might be some specific program or process which was responsible, and I would be able to find it by looking at processes that were running all the times I could not connect and none of the times I could. However, there were no such processes.

I'm kind of at a loss as to what I should do.

UPDATE: I have tried something which seems to work as a temporary fix (though why it works is anyone's guess...): I manually stopped the Hamachi tunneling engine and the Hamachi task before setting my computer to sleep mode. Upon waking, I could connect after starting everything up again. Perhaps the problem is somehow related to Hamachi being 'forcibly' shut down when the computer goes into sleep mode?

FURTHER UPDATE: The above fix does not work reliably. I've tried it once more, and now I'm getting locked out again after sleeping.

FURTHER UPDATE: Even reinstalling Hamachi does not fix the problem.

Drubbels

Posted 2019-05-22T07:32:52.073

Reputation: 101

Answers

0

There is a long-running post (2013-2016) about this problem at Hamachi doesn't work after sleep.

The was no solution, but a recommended workaround for scheduling a batch file to restart the Hamachi system service after sleep:

@echo off

echo Stopping Hamachi service if running...
sc stop Hamachi2Svc
if %errorlevel% == 0 timeout 3

echo Restarting Hamachi service...
sc start Hamachi2Svc
if %errorlevel% neq 0 goto Error

rem Successful
exit /b 0

:Error
set result=%errorlevel%
echo Error %result%
exit /b %result%

See also the article Run Program When Windows Resumes from Sleep or Hibernate.

harrymc

Posted 2019-05-22T07:32:52.073

Reputation: 306 093

Thank you for your answer, but this does not seem to solve my problem. I still get the same timeout errors even after restarting the Hamachi service (both using this batch script and manually from Administrative Tools > Services). – Drubbels – 2019-05-22T08:54:24.283

What happens if after restarting the service you run the Hamachi user-interface? This is perhaps C:Program Files (x86)LogMeIn Hamachihamachi-2-ui.exe. – harrymc – 2019-05-22T09:03:41.023

I'm afraid I already always run the interface - that's how I can see that the icon remains green (and that hamachi claims to have a 'direct tunnel' when I hover over it with my cursor), even though any actual ping or connection attempt times out. – Drubbels – 2019-05-22T09:29:09.820

Does the interface restart when the service is restarted? It's clear that the question is to restart enough Hamachi programs so this will be equivalent to a reboot. I don't use Hamachi, so cannot tell how many programs and services it has. – harrymc – 2019-05-22T09:31:15.517

So far I've tried stopping the Logmein Hamachi Tunneling Service in Services and two hamachi-tasks in Task Manager. It didn't help. – Drubbels – 2019-05-22T16:07:33.297

You might use Process Explorer and sort the processes by the "Command Line" column to find all Hamachi running processes and tasks. Otherwise, I wonder if your problem is related to this answer.

– harrymc – 2019-05-22T16:19:04.383