First connection attempts usually fail

Bug #109764 reported by Rocco Stanzione
6
Affects Status Importance Assigned to Milestone
openswan (Ubuntu)
Incomplete
Medium
Harald Jenny

Bug Description

For any TCP connection (http, ftp, ssh...), the first connection attempt almost always fails, and the second and subsequent attempts almost always succeed. The ssh error message is "Resource temporarily unavailable". In Firefox, sometimes it will say the connection was reset, sometimes it will just fail to download a stylesheet or image. Apt-get update looks like this:
Cannot initiate the connection to archive.ubuntu.com:80 (91.189.88.42). - connect (11 Resource temporarily unavailable) [IP: 91.189.88.42 80]
This happens with the newest lowlatency kernels in Feisty. I can't say for sure which build introduced it, as I skipped several kernel updates without rebooting. It may have been introduced in a pre-release kernel. Some googling reinforced my suspicion that it's a kernel issue, including this faq:
http://www.faqs.org/faqs/computer-security/ssh-faq/
which blames that error message in Solaris on a Solaris kernel bug. I don't have a non-lowlatency kernel installed at the moment, but if I get time I'll install one and report whether I have the same bug.

There are no corresponding log entries in dmesg, /var/log/messages, /var/log/syslog etc.

Revision history for this message
Kent Borg (kentborg) wrote :

I seem to be seeing the same thing with my Feisty install. 2.6.20-15-generic, running on a Panasonic W4 notebook. Happens on both of the two different networks I have tried (interestingly, seems to happen more at my employer's network and less on my simpler home network).

Have tried both the builtin ethernet on this machine and a different ethernet adaptor (a USB dongle), they seem to behave identically. Earlier today I did a wireshark capture on the same machine while trying to do an rdesktop connection out. The rdesktop said "ERROR: connect: Resource temporarily unavailable", and there were no associated packets captured. (Other packets were captured, however, both broadcast traffic I wasn't part of and several packets from an IMAPS session I had open.)

Makes it hard to use this machine. (Any work-around suggestions? Other than booting back from my Dapper install.)

Thanks,

-kb, the Kent who can Dapper, a light Feisty install, or a heavy Feisty install--if that is useful to anyone.

Revision history for this message
Kent Borg (kentborg) wrote : vtun makes it worse

I uninstalled vtun from my heavy Feisty install the problem is *much* reduced. (That is, a retry in whatever program can't connect pretty easily works around the problem for that moment.)

I will be trying my light (default) Feisty install to see if the originally reported problem exists for me there.

-kb, the Kent who will report back.

Revision history for this message
Tom Hargreaves (hex-freezone) wrote :

Also happening here (feisty, 2.6.20-15-generic). It's not just TCP though, ping is also affected. Haven't tested UDP.
Initial connection attempts to a given host seem to always fail with EAGAIN, and henceforth always succeed until after a certain period of inactivity, which a little experimentation showed to be exactly 900 seconds.

Here's how I measured it:
a=0; while ping -q -c 1 216.239.59.104 >/dev/null; do a=`expr $a + 10`;echo $a;sleep $a;done

Revision history for this message
Kent Borg (kentborg) wrote : Plug-cycling ethernet helps

Sometimes the problem gets worse for me and second tries don't work, but I discovered unplugging the ethernet and plugging it back in again (and Feisty doing the "The network connection has been disconnected"/"You are now connected to the wired network" notices), helps matters; retries work again.

-kb

Revision history for this message
Kent Borg (kentborg) wrote : Seems Side Effect of Other Packages

I rebooted into my light (default) Feisty install and the problem doesn't seem to be there. (I don't think so, it is a little elusive sometimes.) So looked again at the packages I had installed in my fat Feisty install, looking for network-related items.

I found ipsec-tools and openswan . I removed them (I previously removed vtun, there is a pattern here), and I think I have fixed it...I think so. Networking seems to be working. A reboot or two might be interesting, but for the moment my computer seems to be working.

Tom, Rocco: Are you having this problem on a default install?, or have you installed other packages? (Have you installed any of the packages I removed?) Any other suspicious packages on your machines?

-kb

Revision history for this message
Tom Hargreaves (hex-freezone) wrote :

Yes, I had openswan installed. and yes, removing it made the problem go away. Thanks.

Revision history for this message
Rocco Stanzione (trappist) wrote :

Confirmed. Removing openswan fixes it. Thanks!

Revision history for this message
Frederic Arpin (ubuntu-drazil) wrote :

I also had that problem, removing openswan fixed it for me too.

Changed in openswan:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Harald Jenny (harald-a-little-linux-box) wrote :

Dear bug reporters

as this bug is already aged I wanted to ask if it can be closed - if not could you please provide more information:

openswan version
kernel version
openswan configuration (private informations obfuscated)

Wild guess would be that in your installation opportunistic encryption was activated which may have caused this problem.

Kind regards
Harald Jenny

Changed in openswan (Ubuntu):
assignee: nobody → Harald Jenny (harald-a-little-linux-box)
status: Triaged → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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