LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-10-2014, 03:59 AM   #1
ddwmusic
LQ Newbie
 
Registered: Dec 2014
Posts: 6

Rep: Reputation: Disabled
Losing connection to specific servers until reboot


I have had a networking problem off and on for several years. I could never figure it out before, partly because I saw the problem on only one machine, so there was not much to compare. Now I'm seeing the problem on multiple machines, so it's worth coming back to it.

The problem: Periodically, I lose connection with specific servers. This happens most often with IMAP/SMTP connections to e-mail, but sometimes it happens with specific websites. When this happens, rebooting clears the problem immediately. But, rebooting is a disruption to workflow and I would prefer to avoid it as much as possible.

Observations:
  • I'll focus on IMAP for simplicity. I have three devices configured to get my e-mail by IMAP:
    • Computer: ThinkPad running Ubuntu 12.04. E-mail client: wanderlust in Emacs 24. WiFi: BroadComm BCM43142, proprietary driver
    • Before getting the ThinkPad, I used an MSI running Ubuntu 10.04, later upgraded to 12.04. Same problem. That one was using an Atheros WiFi card using the ath9k module. So, the problem is not specific to network hardware or driver.
    • Cell phone: HTC 812 running Android 4.4.2. E-mail client: AquaMail 1.3.8.
    • Tablet: Asus Transformer Pad running Android 4.2.1. E-mail client: AquaMail 1.3.8.
    • IMAP service: QQ Mail, based in mainland China. imap.qq.com, smtp.qq.com. (I'm living in mainland China. Using a Chinese service should avoid problems with the Great Firewall.)
  • The problem does NOT happen to all machines at the same time. That is, right now, my computer cannot access the IMAP server for my e-mail, but my phone has no problem accessing it. They are both online through the same WiFi router. I have also seen the phone or the tablet lose contact with IMAP, while the computer and the other Android device are working fine. Therefore, it's unlikely to be a problem with the server or with the ISP. If it were, I would expect all devices to lose connectivity at the same time, and all of them to restore connectivity at once. That's not what I see.
  • The problem occurs most often with my home DSL connection, but it seems not to be limited to that. My phone has, at times, lost access to IMAP over China Mobile's 4G service, and regained access after a reboot. This isn't guaranteed to be the same problem, but it seems too closely related to be coincidental.
  • The fact that a reboot temporarily solves the problem tells me that there is some stale information lurking in the networking layer. I'm assured that Linux does not cache DNS info. Okay... then, what is cached? If nothing is being cached, then would the problem not persist after a reboot?
  • I've seen the problem in four different apartments in Guangzhou, using at least two different ISPs. This also points to an issue in the client machines, rather than servers or network providers.
  • Android is based on the Linux kernel. I can't confirm that the Android networking stack is the same as the Linux networking stack on my computer, but it doesn't seem coincidental that this problem occurs on three Linux-based devices, but my housemate (using Windows) has never complained about this.
Short version: Multiple ISPs, multiple machines, multiple email clients, but all based on Linux. Reboot always clears it (but only temporarily), so it must be something local.

Does anybody have any ideas? Even random neural firings? The preponderance of evidence points to some bad data lingering in RAM until a reboot purges it. But when I've asked this question before, I've been told that that's not possible. Well, something is causing this...

Thanks,
James

Last edited by ddwmusic; 12-10-2014 at 04:01 AM.
 
Old 12-11-2014, 11:58 AM   #2
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
I am thinking you are using a SOHO router.switch combo your ISP has given you yes?

It sounds to me like a bad SOHO router to me, do you lose conectivity from computer to computer if you plug computer A directly into computer B? if not, i would put my money on a bad switch/router.
 
Old 12-12-2014, 08:40 AM   #3
ddwmusic
LQ Newbie
 
Registered: Dec 2014
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by /dev/random View Post
I am thinking you are using a SOHO router.switch combo your ISP has given you yes?

It sounds to me like a bad SOHO router to me, do you lose conectivity from computer to computer if you plug computer A directly into computer B? if not, i would put my money on a bad switch/router.
No, it's a DSL modem and a separate wifi router. (Ancient technology, I know.)

Computer-to-computer is a rough test because the issue is sporadic. After a reboot, the network is fine for a day or two, or sometimes longer... but when it breaks, it's done. I can't realistically take my computer off the network and leave it hard-connected to another computer for a few days.

One test I haven't tried is to wait for the issue to happen again, then cycle power on the router. Another possible test is to disable wifi using F8, and then re-enable it. (IIUC, this should reset the wifi kernel module.)

James
 
Old 12-12-2014, 09:43 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,261

Rep: Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419
reboot of what helps you to solve this issue? I think - probably - sometimes the router is out of resources, but ...
You can try - instead of rebooting a linux - just remove the wifi kernel module and reload it.
 
Old 12-16-2014, 08:34 PM   #5
ddwmusic
LQ Newbie
 
Registered: Dec 2014
Posts: 6

Original Poster
Rep: Reputation: Disabled
Well, the problem just happened again. So here are the tests I performed.

1. Switch off WiFi using the XF86WLAN key*, and then switch it back on. In my e-mail client (wanderlust in Emacs 24), cycle alt-T to kill any open connection processes so that the next request will start with a fresh connection.

* Someone told me on another forum that disabling WiFi this way would remove the WiFi kernel module, and toggling it back on would restart that module. If that was correct, then the conclusion is valid. If not, could someone tell me the name of the proprietary Broadcomm kernel module?

Result: No connection.

Conclusion: If the kernel module was successfully reset, then the problem has nothing to do with the kernel module.

2. Quit Emacs, relaunch and restart wanderlust.

Result: No connection.

Conclusion: The problem is not a bug in wanderlust.

3. Quit all applications, log out and log back in (without rebooting the machine). Then relaunch wanderlust and try e-mail again.

Result: No connection.

Conclusion: The problem persists through shell sessions.

4. Cycle power on the WiFi router, reset wanderlust's connection and try again.

Result: No connection.

Conclusion: The problem seems not to be in the router. Note also that my phone, connected to the same WiFi router, has no problem accessing the IMAP server. As I'm writing this, only my computer is unable to connect.

Which leaves the observation from my first post -- some information, somewhere in my computer, seems to be stale and the only way to clear it is to reboot. It's hard to imagine how it could be a router or ISP problem, because other devices on the same WiFi router have no problem connecting to an IMAP server that my computer simply can't.

So, now I'm going to reboot my machine so that I can send one e-mail. Just... one... e-mail... and I have to friggen' reboot???

I do appreciate the advice so far. I hope someone has some other ideas, as this is really quite frustrating -- something that really quite obviously should not happen, but this has been going on for four years.

Thanks in advance --
James
 
Old 12-16-2014, 08:40 PM   #6
ddwmusic
LQ Newbie
 
Registered: Dec 2014
Posts: 6

Original Poster
Rep: Reputation: Disabled
Update on the last message: After reboot, the initial connection failed, but I retried the connection (without a second reboot) and everything worked.

So, to recap: Other devices on the same wifi router, not affected. Nothing on my laptop fixes the problem except rebooting.

What could cause that?

James

Last edited by ddwmusic; 12-16-2014 at 09:36 PM.
 
Old 12-17-2014, 08:50 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,261

Rep: Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419
you can try lsmod before and after "Switch off WiFi using the XF86WLAN key", and you will see if there was a missing/removed kernel module.
As far as I see the "switch on" was not successful - you can check lsmod again, and also ifconfig.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Losing ALSA confifuration at each reboot ... geotux Linux - Hardware 2 06-27-2008 02:20 AM
Losing name server info upon reboot BaltikaTroika SUSE / openSUSE 5 11-03-2006 11:03 PM
Losing connection after every reboot.. biikman Linux - Newbie 1 02-27-2006 08:50 AM
Losing my alsamixer settings after a reboot moger Slackware 4 07-05-2004 10:17 PM
losing connections always when reboot in DHCP helsinkiboy Linux - Networking 1 06-13-2003 07:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration