Welcome to the Hamachi Community!
Reply
Contributor
Posts: 6
Registered: ‎05-11-2011

Re: Failed to connect to the engine

So i just did what you suggested here and it says that that file path is not an executable program.

But hamachi has been working since I downloaded it three days ago until now. What would have changed? And how can I fix it? If I reinstall hamachi will I lose the server I have now?

Contributor
Posts: 6
Registered: ‎05-11-2011

Re: Failed to connect to the engine

Apologies, but what i was refering to was

therain:

 

Start > Run > cmd

in the comand prompt, key in the following exactly.

net start Hamachi2svc

If it does not work, the hamachi service process is not installed or diabled.

 

I did this and it said that the file is not recognised as an internal or external command, operable program or batch file.

 

Hamachi has been working since I installed it 3 days ago, until now. What could have changed and how?

Active Contributor
Posts: 6
Registered: ‎04-27-2011

Re: Failed to connect to the engine

I don't know what has changed, but this problem seems to happen almost on every reboot now. However, it's easy to fix, albeit a little extra work. See my previous post.


 

  1. Open Task Manager
  2. Choose Services Tab
  3. Sort by description
  4. Find LogMeIn Hamachi 2.0 Tunnelling Service
  5. [or sort by Name and find Hamachi2Svc)
  6. It says "Starting"
  7. Find the Pricess ID PID
  8. Open cmd window
  9. Type: "taskkill /f /pid <pid>"  (with the PID found about)
  10. Right click service in Task Manager 
  11. Click "Start Service"
  12. Start Hamachi GUI from the Start Menu

 

 

Contributor
Posts: 6
Registered: ‎05-11-2011

Re: Failed to connect to the engine

Mine doesn't even say starting.

And i can't tell the service to start either, the option is greyed out.

This is the only solution everyone is talking about but I don't even have that option. -.-

Contributor
Posts: 6
Registered: ‎05-11-2011

Re: Failed to connect to the engine

Oh and if i go into task manager and try to start the service through the services tab, it says that the operation could not be completed. Access denied.

Active Contributor
Posts: 4
Registered: ‎03-04-2011

Re: Failed to connect to the engine

I get the whole trying to kill it through Task Manager and starting the service but this still requires me to remember to check it when I reboot any of my machines.... or pray if I remote reboot them.  If I forget to check the service (like this morning), I get to work and realize I can't access a remote machine.  This is getting ridiculous.

 

I've tried other p-2-p services and haven't been as happy with them as Hamachi, so I think I'm going to find a program or script that will restart the service when it doesn't respond.... or find another service as a backup...

New Contributor
Posts: 1
Registered: ‎05-21-2011

Re: Failed to connect to the engine

i tried going to the administrative tools==>services==>logmein hamachi but logmein hamachi wasn't there

 

plz help

 

have been trying to get multiplayer to work for ages

Advisor
Posts: 211
Registered: ‎10-28-2007

Re: Failed to connect to the engine

 


pcworldreader wrote:

.......so I think I'm going to find a program or script that will restart the service when it doesn't respond.... or find another service as a backup...


 

The easiest thing might be to install the free version of TeamViewer and use it to restart the remote computer. You can even restart it in the safe mode and have TeamViewer access. TeamViewer is a nice tool but they automatically flag certain accounts that they suspect are using it for commercial usage. (e.g. several computers connecting to the TeamViewer servers via one public facing IP = a business to them) If TeamViewer is not an option, then you might try this script:

 

 

#RequireAdmin
AutoItSetOption("TrayIconDebug", 1)
AutoItSetOption("WinWaitDelay", 1)
AutoItSetOption("WinTitleMatchMode", 3)

;just one copy of this tool should run at a time
$script_running = "keep-hamachi-alive"
If WinExists($script_running) Then Exit
AutoItWinSetTitle($script_running)

;this tool will uninstall and reinstall the hamachi service - if needed
;doing that will close the hamachi "window"
;A.K.A. the "Graphical User Interface" (GUI) or just "User Interface" (UI)
;so you need to decide if you want this tool to always start GUI
$always_start_GUI = "yes"
;changing the "yes" to "no" tells the tool to leave the GUI off if it had been off
;or to turn the GUI back on if it had been on before this tool killed it

;to hide all of the tray tips (ballons)
;remove ";" in front of the line below
;#NoTrayIcon
;but only do this after you turn off the debug tips in the next section
;with tray tips showing and debug times off,
;you should only see tray tips when the tool first starts

;this next part is mostly for me, but I suggest that you leave this "yes/no" alone
;until you have tested to see if this tool can make hamachi reconnect for you
$debug_tips = "yes"
$debug_time = "5000" ;determines how long you see the debug tray tips
If $debug_tips = "yes" Then TrayTip("$debug_tips =", "yes", 100, 16)
If $debug_tips = "yes" Then Sleep($debug_time)

;read the registry to get the path to the these files
$path2ini = RegRead("HKLM\SOFTWARE\LogMeIn Hamachi", "EngineConfigDir") & "\h2-engine.ini"
;if reading the path info fails, just give up
If @error Then Exit
If $debug_tips = "yes" Then TrayTip("$path2ini = ", $path2ini, 100, 16)
If $debug_tips = "yes" Then Sleep($debug_time)

;if the file is not there, just give up
If Not FileExists($path2ini) Then
	Exit
EndIf

;make a backup copy of the ini file
FileCopy($path2ini, RegRead("HKLM\SOFTWARE\LogMeIn Hamachi", "EngineConfigDir") & "\h2-engine.ini.tool.backup.copy", 1)
If $debug_tips = "yes" Then TrayTip("backing up the h2-engine.ini file", "we hope", 100, 16)
If $debug_tips = "yes" Then Sleep($debug_time)

;if the file is not there, just give up
If Not FileExists(RegRead("HKLM\SOFTWARE\LogMeIn Hamachi", "EngineConfigDir") & "\h2-engine.ini.tool.backup.copy") Then
	Exit
EndIf

$path2srv = RegRead("HKLM\SOFTWARE\LogMeIn Hamachi", "InstallDir") & "hamachi-2.exe"
If @error Then Exit
If $debug_tips = "yes" Then TrayTip("$path2srv = ", $path2srv, 100, 16)
If $debug_tips = "yes" Then Sleep($debug_time)

;if the file is not there, just give up
If Not FileExists($path2srv) Then
	Exit
EndIf

$path2GUI = RegRead("HKLM\SOFTWARE\LogMeIn Hamachi", "InstallDir") & "hamachi-2-ui.exe"
If @error Then Exit
If $debug_tips = "yes" Then TrayTip("$path2GUI = ", $path2GUI, 100, 16)
If $debug_tips = "yes" Then Sleep($debug_time)

;if the file is not there, just give up
If Not FileExists($path2GUI) Then
	Exit
EndIf

;this waits up to 5 minutes for the normal install of Hamachi to get the service going
For $i = 300 To 1 Step -1
	If ProcessExists("hamachi-2.exe") Then
		TrayTip("the hamachi service started", "surprised?", 100, 16)
		Sleep(2000)
		If $always_start_GUI = "yes" Then Run($path2GUI & " --auto-start")
		ExitLoop
	EndIf
	TrayTip("waiting for the hamachi service to start", "moving on anyway in " & $i, 100, 16)
	Sleep(1000)
Next
TrayTip("", "", 100)

While 1
	;read the whole ini file
	$s_ini = FileRead($path2ini)
	If $debug_tips = "yes" Then TrayTip("reading ini file", "we hope", 100, 16)
	If $debug_tips = "yes" Then Sleep($debug_time)

	;turn it into in separate lines
	$s_ini_array = StringSplit($s_ini, @LF, 1)
	If $debug_tips = "yes" Then TrayTip("parsing ini file", "we hope", 100, 16)
	If $debug_tips = "yes" Then Sleep($debug_time)

	;read each line looking for the value of Reconnect
	For $i = 1 To $s_ini_array[0] - 1
		If StringInStr($s_ini_array[$i], "Reconnect") Then $reconnect = StringRight($s_ini_array[$i], 1)
		Sleep(10)
	Next
	If $debug_tips = "yes" Then TrayTip("$reconnect = ", $reconnect, 100, 16)
	If $debug_tips = "yes" Then Sleep($debug_time)

	;if reconnect is 0 then the user turned hamachi off or hamachi barfed
	;this was the issue I was facing - hamachi turned itself off at times
	;perhaps a user told it to stop attempting to connect while the servers were busy
	If $reconnect = "0" Then
		;change the value of reconnect to 1
		FileOpen($path2ini, 2)
		For $i = 1 To $s_ini_array[0] - 1
			If StringInStr($s_ini_array[$i], "Reconnect") Then
				FileWrite($path2ini, "Reconnect            1" & @LF)
			Else
				FileWrite($path2ini, $s_ini_array[$i] & @LF)
			EndIf
			Sleep(10)
		Next
		FileClose($path2ini)
		If $debug_tips = "yes" Then TrayTip("writing a reconnect value of 1 to the ini file", "we hope", 100, 16)
		If $debug_tips = "yes" Then Sleep($debug_time)
	EndIf

	;check to see if the service is running
	;it is possible to have the service die and the value of Reconnect still be 1
	If $debug_tips = "yes" Then TrayTip("checking to see that the hamachi service is running", "we hope so", 100, 16)
	If $debug_tips = "yes" Then Sleep($debug_time)
	If $debug_tips = "yes" Then TrayTip("checking to see that hamachi is online", "we hope so", 100, 16)
	If $debug_tips = "yes" Then Sleep($debug_time)
	If Not ProcessExists("hamachi-2.exe") Or WinExists("LogMeIn Hamachi", "offline") Then
		If $debug_tips = "yes" Then TrayTip("the hamachi service was not running or hamachi is offline", "bummer", 100, 16)
		If $debug_tips = "yes" Then Sleep($debug_time)

		;check to see if the GUI is running
		$GUI_was_running = "no"
		If ProcessExists("hamachi-2-ui.exe") Then $GUI_was_running = "yes"

		;if the service is not running - then there might be a problem with the service
		;don't just start the service, recreate it
		;uninstall the service - kills the GUI and set reconnect to 0 again
		RunWait($path2srv & " -u", "", @SW_HIDE)
		If $debug_tips = "yes" Then TrayTip("uninstalling the service", "we hope", 100, 16)
		If $debug_tips = "yes" Then Sleep($debug_time)

		;uninstalling the service changes the value of reconnect to 0
		;must change it back to 1 before reinstalling the service
		FileOpen($path2ini, 2)
		For $i = 1 To $s_ini_array[0] - 1
			If StringInStr($s_ini_array[$i], "Reconnect") Then
				FileWrite($path2ini, "Reconnect            1" & @LF)
			Else
				FileWrite($path2ini, $s_ini_array[$i] & @LF)
			EndIf
			Sleep(10)
		Next
		FileClose($path2ini)
		If $debug_tips = "yes" Then TrayTip("writing a reconnect value of 1 to the ini file", "must do this after uninstalling the service", 100, 16)
		If $debug_tips = "yes" Then Sleep($debug_time)

		;reinstall the service
		Run($path2srv & " -i", "", @SW_HIDE)
		If $debug_tips = "yes" Then TrayTip("reinstalling the service", "we hope", 100, 16)
		If $debug_tips = "yes" Then Sleep($debug_time)

		;start GUI - but only if it was running before this tool killed it
		If $GUI_was_running = "yes" Then Run($path2GUI & " --auto-start")
	EndIf

	;always start the GUI if $always_start_GUI = "yes"
	If Not ProcessExists("hamachi-2-ui.exe") And $always_start_GUI = "yes" Then Run($path2GUI & " --auto-start")

	For $i = 60 To 1 Step -1
		If $debug_tips = "yes" Then TrayTip("this tool will recheck hamachi in", $i, 100, 16)
		Sleep(1000)
	Next
WEnd

 

 

It works for me - but I'm on a simpler XP OS and I don't have the hung service issue to test adding a taskkill section to the script above. If you decide to use the script above, save the text into a file that ends in the ".au3" file extensions and install AutoIt from here: http://www.autoitscript.com/site/autoit/downloads/ 
You can run the script as a text file from the start up folder or compile it into an EXE. Since I don't have a W7 system to test this on - I'm not sure what you would need to do to deal with the UAC.
You will need to read through the comments in the code and make your "yes/no" selections to make it run like you want. Also, if you decide to learn that scripting tool, there are prewritten sections of code that will let you determine and control the state of a service in a much more detailed way than the simple "if process is running" method that I used above. I did not include those methods because it would lengthen the script considerably.
The main two issues that I was attempting to solve with this script is:
the timing of the service vs the UI
(I removed the registry entry that starts the UI and use this script to start it)
someone of something would turn off the hamachi VPN via the GUI maybe
(I need it to always be on for several remote computers). 

 

yucky forum software

New Contributor
Posts: 1
Registered: ‎08-09-2011

Re: Failed to connect to the engine

I've redownloaded it, tried shutting down my computer then pulling it back up again, trying it twice, undownloading and downloading again, all have failed... i just cant connect!!!!!!!!

New Contributor
Posts: 1
Registered: ‎08-16-2011

Re: Failed to connect to the engine

This is a a very annoying issue and I have hit it 3 or 4 times across a couple different PCs over the past few months.  It seems to occur around when I apply my Windows Updates.

 

Fixed it today on a Windows XP Pro box by stopping all services with "LogmeIn *" then starting them back up.  

 

Tech Support...please pass this bug to your dev guys, this is most annoying and is helping push me to another solution.  To be fair, I am using the free one today and I do not mind the stop/start service headaches around this bug.  But in the next 12 months I will be needing a commercial solution for a business need.

 

Thanks for the consideration...