Repeated no internet connection

Bug #1258361 reported by kexp903
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Haguichi
Fix Released
Medium
Stephen Brandt

Bug Description

When the program starts it greys out (crash) and then it tells me that there are no internet connection what so ever.

System:

Ubuntu 12.04.3 LTS x86_64
Hamachi: 2.1.0.119
Haguichi: 1.0.22
Network Prot: IPv4 only
DNS: Google DNS

Nothing in syslog

Revision history for this message
Stephen Brandt (ztefn) wrote :

Please run Haguichi from terminal using "haguichi --debug > log.txt". A log file will be saved in your home folder. Then attach this file here in Launchpad.

Changed in haguichi:
status: New → Incomplete
Revision history for this message
kexp903 (kexp903) wrote :
Revision history for this message
Stephen Brandt (ztefn) wrote :

I don't understand the end of your log, which just says "Marshaling activate signal". It should at least be followed by an exception message or stack trace. I guess the error message was printed on the terminal. Please also add the error message or create a new log using "haguichi --debug &> log.txt" (note the added the & sign to redirect all messages).

But lets also take a step back. Do you actually have internet connection? Can you ping 8.8.8.8? (That is the IP address of Google DNS and that's what Haguichi itself pings to check for internet connectivity)

Revision history for this message
kexp903 (kexp903) wrote :

Marshaling active signal came from me quitting the application (ctrl+c) and it did not come from haguichi. I've tried five times and only the action of quitting haguichi from the terminal is the reason for it to appear on the log. As for the internet connection yes I do have full internet with DNS completely working. In-fact the normal hamachi being ran form the terminals works just fine but however haguichi does not. This seems to have appeared about few weeks back.

kernel:
Linux [hostname] 3.8.0-34-generic #49~precise1~Ubuntu SMP Wed Nov 13 18:00:01 UTC 2013 i686 athlon i386 GNU/Linux

Revision history for this message
Stephen Brandt (ztefn) wrote :

Okay, so it doesn't actually crash. You should be able to quit Haguichi normally by using "Client" -> "Quit" in the menubar.

Please attach the ouput of the command "ping -c 4 8.8.8.8".

Revision history for this message
kexp903 (kexp903) wrote :
Revision history for this message
kexp903 (kexp903) wrote :

I've changed the dns to opendns for the time being and this resolved the problem for the time being. Even though the ping has been working flawlessly it does make a difference for now. I would consider this closed until a same issues pops up either by me or someone else.

Thanks for the help Stephen.

Revision history for this message
Stephen Brandt (ztefn) wrote :

Good to know changing DNS makes a difference. I'll try to see if I can replicate your problem using the same DNS.

Meanwhile found out that slow ping responses -or no response at all- will lock (no crash but unusable anyway) the GUI, because pings are apparently being executed on the main thread. So I've moved the "WaitForInternetConnection" process to it's own thread. This should prevent Haguichi from locking (greying out). Here's a debian package of the latest build if your interested to test it:
http://www.haguichi.net/build/haguichi_1.0.22rev371-clr4.0_all.deb

Revision history for this message
kexp903 (kexp903) wrote :

Thanks and I will keep the .deb and run it in a VM possibly later on this December. I'm a bit short on time at the moment so I will let you know whether the hang happens using the Google DNS.

Revision history for this message
kexp903 (kexp903) wrote :

Also to note I know that some routers and gateways block inbound ICMP requests and responses. This may cause the ping to not reach some people. Are there any other methods to confirm connectivity to the internet for haguichi? My case in particular does not have this problem. But increasingly in the Untied States many ISP provides their customers with a modem / router hybrid. And from my experience some if not most of the gateways block both ICMP request and response packets from returning to the devices within the firewall.

Revision history for this message
Stephen Brandt (ztefn) wrote :

I haven't found any other methods than ping to check the internet connection (by command line). Within Haguichi itself I've used some different .NET methods over the years. Started out with TcpClient then replaced it by Dns.GetHostAddresses [1] to gain some speed, but later it turned out to be even slower in some situation so eventually replaced it by a Ping method [2] to 8.8.8.8 which is as fast as Google DNS can be.

Maybe I could let Haguichi ping the default gateway instead of 8.8.8.8, like suggested here:
http://stackoverflow.com/questions/929368/how-to-test-a-internet-connection-in-bash#answer-932187

I'm not sure if it's reliable, I'd think it might only check the connection to the gateway itself.

[1] http://bazaar.launchpad.net/~ztefn/haguichi/1.0/revision/293
[2] http://bazaar.launchpad.net/~ztefn/haguichi/1.0/revision/358

Revision history for this message
Stephen Brandt (ztefn) wrote :

This week I received an e-mail of someone who had his firefwall (accidentally) blocking ICMP packets. He suggested using a web request if ping fails. Web requests are undoubtedly be slower than pings, but then they are *only* required if ping fails.

While implementing this two-step solution I also stumbled upon netcat. This is a tool that is able to open ports to remote hosts. It's as fast as ping and might not be blocked (altough I'm not sure what kind of packets it sends).

So I ultimately ended up building a three-step solution:
http://bazaar.launchpad.net/~ztefn/haguichi/1.0/revision/376

If you would like to give it a test, here's a freshly build debian package:
http://www.haguichi.net/build/haguichi_1.0.22rev376-clr4.0_all.deb

I'm anxious to hear if it works and if it succeeds at step two (netcat) or only at step three (web request).

Changed in haguichi:
status: Incomplete → In Progress
assignee: nobody → Stephen Brandt (ztefn)
importance: Undecided → Medium
milestone: none → 1.0.23
Revision history for this message
Stephen Brandt (ztefn) wrote :

kexp903,

Could you please respond to this thread again? I would like to publish a new release in a few days and it would nice to know if the bug you reported is fixed or not.

Revision history for this message
kexp903 (kexp903) wrote :

Hey ztefn,

Though when I tried to wget your deb I got an 403 I were able to use a 2nd machine to download it just fine from a browser.
I've tried the new deb and it seemed to work alright on my end looking good. Sorry for the delay on the response.

Revision history for this message
Stephen Brandt (ztefn) wrote :

Ok, great. And thanks for the follow up!

Changed in haguichi:
status: In Progress → Fix Committed
Stephen Brandt (ztefn)
Changed in haguichi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.