TCP sessions timing out?
Forum rules
Before you post please read how to get help
Before you post please read how to get help
TCP sessions timing out?
I have had two networking issues with Mint 17 and the new kernel that didnt happen with mint 14. I cant seem to find them mentioned anywhere at all, except possibly in some vague upstream bug.
One I have been able to work around, the other persists.
BUG #1. I have a virtual private server hosted out in a machine room somewhere and I use ssh to connect to it. Normally I leave a session running their permanently, usually to tail a mail log file to look for mail spam incoming and adjust filter rules. On MINT 14 that would stay up forever, but in 17 it was freezing and needing to be restarted if the data stream was idle for any period of time. Now it might be the NAT router or it might not, but all that has changed in the desktop OS and it was fine the day before I upgraded and not fine the day after.
This has been worked around by using ssh keepalives to continually exchange data between client and server. This has fixed the problem.
In the .ssh dir under my home dir
~/.ssh $ more config
Host vps.xxxx.co.uk
User myname
ServerAliveInterval 60
(data obfuscated for privacy).
Bug #2. I run Thunderbird (31.1.1) for mail and news. News is from the albasani news server and its set to poll every few minutes for 'new news' It does this fine. However that's only the news headers. To download the actual posts, it seems to keep open a second connection. That one dies.
When I decide to read more news, the first time I access the news part of thunderbird to get the actual posts, it results in a 'connection refused' error.
Until I try with a different post, which then succeeds.
As do all subsequent ones until I leave it idle....
--------------------
BOTH of these symptoms are consistent with idle TCP sessions being silently dropped within the kernel. to the point where attempts to use them for data transfer result on some kind of error, which in the case of thunderbird is interpreted as 'unable to connect' and in the case of ssh as no response at all.
Can anyone else confirm similar responses? Or shed any light on this?
It is only an irritation, but it is nevertheless an irritant!
One I have been able to work around, the other persists.
BUG #1. I have a virtual private server hosted out in a machine room somewhere and I use ssh to connect to it. Normally I leave a session running their permanently, usually to tail a mail log file to look for mail spam incoming and adjust filter rules. On MINT 14 that would stay up forever, but in 17 it was freezing and needing to be restarted if the data stream was idle for any period of time. Now it might be the NAT router or it might not, but all that has changed in the desktop OS and it was fine the day before I upgraded and not fine the day after.
This has been worked around by using ssh keepalives to continually exchange data between client and server. This has fixed the problem.
In the .ssh dir under my home dir
~/.ssh $ more config
Host vps.xxxx.co.uk
User myname
ServerAliveInterval 60
(data obfuscated for privacy).
Bug #2. I run Thunderbird (31.1.1) for mail and news. News is from the albasani news server and its set to poll every few minutes for 'new news' It does this fine. However that's only the news headers. To download the actual posts, it seems to keep open a second connection. That one dies.
When I decide to read more news, the first time I access the news part of thunderbird to get the actual posts, it results in a 'connection refused' error.
Until I try with a different post, which then succeeds.
As do all subsequent ones until I leave it idle....
--------------------
BOTH of these symptoms are consistent with idle TCP sessions being silently dropped within the kernel. to the point where attempts to use them for data transfer result on some kind of error, which in the case of thunderbird is interpreted as 'unable to connect' and in the case of ssh as no response at all.
Can anyone else confirm similar responses? Or shed any light on this?
It is only an irritation, but it is nevertheless an irritant!
Re: TCP sessions timing out?
Hi,
is this happening on ethernet or wifi?
also share your:
is this happening on ethernet or wifi?
also share your:
Code: Select all
ifconfig
Code: Select all
sudo lshw -c network
People disagree with me. I just ignore them.
(Linus Torvalds, regarding the use of C++ for the Linux kernel.)
Please Add [Solved] to the topic-title of your first post when appropriate so others know they might find a solution here.
(Linus Torvalds, regarding the use of C++ for the Linux kernel.)
Please Add [Solved] to the topic-title of your first post when appropriate so others know they might find a solution here.
Re: TCP sessions timing out?
Oh all ethernet. Don't do wifi on the desktop.
Nowt wrong with the network at any other level. Blindingly fast local transfers at full 100Mbps, decent internet with no issues at all. Unix networking was my stock in trade for many tears..trust me this isnt a noob misconfiguration.
What is more interesting is netstat
I am not running the ssh client at the moment
But you can see two permanent nntp connections one of which is being polled for new headers, and the other of which is dormant
Now if I try and read news

is what happens..
And you will note that one NNTP session has vanished
(never mind the extra NFS that's has popped up. that's down to me uploading a picture)
and then after successfully downloading a post by trying again
then after a few minutes, up pops another nntp session
and its still working, for now..
Now I dont pretend to understand how thunderbird manages its connections to news servers, but whenever there are two nntp sessions left for any length of time, that error message pops up and they get replaced with one, then two new ones.
I cant show you anything meaningful on netsat/ssh because having put in keepalives, it behaves flawlessly.
What may be worth trying is to see whether or not the issue happens with local non-NATTTED sessions.
trying a local telnet session.
However I think telnet has its own keepalives so it may not actually prove anything. Except that if it too times out, the NAT router is not to blame.
Hmm. I'll report back on the telnet, and try rebooting the router just in case.
be right back after decent pause, and coffee.
Code: Select all
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:a0:cc:7c:31:27
inet addr:192.168.0.6 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2a0:ccff:fe7c:3127/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:90425 errors:0 dropped:0 overruns:0 frame:0
TX packets:82809 errors:1 dropped:0 overruns:1 carrier:1
collisions:0 txqueuelen:1000
RX bytes:77313566 (77.3 MB) TX bytes:16517156 (16.5 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:21238 errors:0 dropped:0 overruns:0 frame:0
TX packets:21238 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11952059 (11.9 MB) TX bytes:11952059 (11.9 MB)
-------------------
*-network
description: Ethernet interface
product: DP83815 (MacPhyter) Ethernet Controller
vendor: National Semiconductor Corporation
physical id: 0
bus info: pci@0000:07:00.0
logical name: eth0
version: 00
serial: 00:a0:cc:7c:31:27
size: 100Mbit/s
capacity: 100Mbit/s
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list rom ethernet physical tp mii fibre 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=natsemi driverversion=2.1 duplex=full ip=192.168.0.6 latency=32 link=yes maxlatency=52 mingnt=11 multicast=yes port=twisted pair speed=100Mbit/s
resources: irq:21 ioport:1000(size=256) memory:e3104000-e3104fff memory:f9200000-f920ffff
----------------
What is more interesting is netstat
Code: Select all
sudo netstat -a | grep ESTABLISHED
tcp 0 0 192.168.0.6:54187 four.schnuerpel.eu:nntp ESTABLISHED
tcp 0 0 192.168.0.6:954 tempest:nfs ESTABLISHED
tcp 0 0 192.168.0.6:54186 four.schnuerpel.eu:nntp ESTABLISHED
tcp6 0 0 ip6-localhost:51474 ip6-localhost:ipp ESTABLISHED
tcp6 0 0 ip6-localhost:ipp ip6-localhost:51474 ESTABLISHED
But you can see two permanent nntp connections one of which is being polled for new headers, and the other of which is dormant
Now if I try and read news

is what happens..
Code: Select all
tcp 0 0 192.168.0.6:36865 ea-in-f136.1e100.:https ESTABLISHED
tcp 0 0 192.168.0.6:802 vps.templar.co.uk:nfs ESTABLISHED
tcp 0 0 192.168.0.6:43998 ea-in-f101.1e100.:https ESTABLISHED
tcp 0 0 192.168.0.6:54189 four.schnuerpel.eu:nntp ESTABLISHED
tcp 0 0 192.168.0.6:954 tempest:nfs ESTABLISHED
tcp6 0 0 ip6-localhost:51474 ip6-localhost:ipp ESTABLISHED
tcp6 0 0 ip6-localhost:ipp ip6-localhost:51474 ESTABLISHED
(never mind the extra NFS that's has popped up. that's down to me uploading a picture)
and then after successfully downloading a post by trying again
Code: Select all
sudo netstat -a | grep ESTABLISHED
tcp 0 0 192.168.0.6:54199 four.schnuerpel.eu:nntp ESTABLISHED
tcp 0 0 192.168.0.6:802 vps.templar.co.uk:nfs ESTABLISHED
tcp 0 0 192.168.0.6:954 tempest:nfs ESTABLISHED
tcp6 0 0 ip6-localhost:51474 ip6-localhost:ipp ESTABLISHED
tcp6 0 0 ip6-localhost:ipp ip6-localhost:51474 ESTABLISHED
Code: Select all
tcp 0 0 192.168.0.6:54199 four.schnuerpel.eu:nntp ESTABLISHED
tcp 0 0 192.168.0.6:54200 four.schnuerpel.eu:nntp ESTABLISHED
tcp 0 0 192.168.0.6:802 vps.templar.co.uk:nfs ESTABLISHED
tcp 0 0 192.168.0.6:954 tempest:nfs ESTABLISHED
tcp6 0 0 ip6-localhost:51474 ip6-localhost:ipp ESTABLISHED
tcp6 0 0 ip6-localhost:ipp ip6-localhost:51474 ESTABLISHED
Now I dont pretend to understand how thunderbird manages its connections to news servers, but whenever there are two nntp sessions left for any length of time, that error message pops up and they get replaced with one, then two new ones.
I cant show you anything meaningful on netsat/ssh because having put in keepalives, it behaves flawlessly.
What may be worth trying is to see whether or not the issue happens with local non-NATTTED sessions.
Code: Select all
sudo netstat -a | grep ESTABLISHED
tcp 0 0 192.168.0.6:54220 four.schnuerpel.eu:nntp ESTABLISHED
tcp 0 0 192.168.0.6:954 tempest:nfs ESTABLISHED
tcp 0 0 192.168.0.6:45242 tempest:telnet ESTABLISHED
tcp 0 0 192.168.0.6:54221 four.schnuerpel.eu:nntp ESTABLISHED
tcp6 0 0 ip6-localhost:51474 ip6-localhost:ipp ESTABLISHED
tcp6 0 0 ip6-localhost:ipp ip6-localhost:51474 ESTABLISHED
However I think telnet has its own keepalives so it may not actually prove anything. Except that if it too times out, the NAT router is not to blame.
Hmm. I'll report back on the telnet, and try rebooting the router just in case.
be right back after decent pause, and coffee.
Re: TCP sessions timing out?
Curiouser and curiouser, when not reading news, the two nntp sessions periodically get replaced
Vioz:
Note that the source port numbers have changed...indicating both sessions were torn down and new ones added.
I am now thoroughly confused. This one may be nothing to do with networking at the base level, but due to perhaps an interaction between 'new thunderbird' and 'old albasani news server'
Vioz:
Code: Select all
sudo netstat -a | grep -E 'nntp|telnet'
tcp 0 0 *:telnet *:* LISTEN
tcp 0 0 192.168.0.6:45242 tempest:telnet ESTABLISHED
tcp 0 0 192.168.0.6:54263 four.schnuerpel.eu:nntp ESTABLISHED
tcp 0 0 192.168.0.6:54264 four.schnuerpel.eu:nntp ESTABLISHED
sudo netstat -a | grep -E 'nntp|telnet'
tcp 0 0 *:telnet *:* LISTEN
tcp 0 0 192.168.0.6:54298 four.schnuerpel.eu:nntp ESTABLISHED
tcp 0 0 192.168.0.6:54299 four.schnuerpel.eu:nntp ESTABLISHED
tcp 0 0 192.168.0.6:45242 tempest:telnet ESTABLISHED
I am now thoroughly confused. This one may be nothing to do with networking at the base level, but due to perhaps an interaction between 'new thunderbird' and 'old albasani news server'
Re: TCP sessions timing out?
just tried the news reader and got a connection refused? a minute later it worked.
Also in some rare occasions it seems that the kernel 3.13 does drop connections (could explain why you have sometimes 2 on a very near port mapping)
Try a 3.14 kernel or wait to see if it's not related to the news server?
Also in some rare occasions it seems that the kernel 3.13 does drop connections (could explain why you have sometimes 2 on a very near port mapping)
Try a 3.14 kernel or wait to see if it's not related to the news server?
People disagree with me. I just ignore them.
(Linus Torvalds, regarding the use of C++ for the Linux kernel.)
Please Add [Solved] to the topic-title of your first post when appropriate so others know they might find a solution here.
(Linus Torvalds, regarding the use of C++ for the Linux kernel.)
Please Add [Solved] to the topic-title of your first post when appropriate so others know they might find a solution here.
Re: TCP sessions timing out?
I am loathe to go 3.14 if its still unstable..
But I guess I can always select 3.13 at boot time.
Mmmm. I see listed many flavours of 3.13 but none of 3.14
What is the 'approved' way to get a later 3.13 kernel, and 3.14, which aint in the repo
??
Ok update manager takes me up to 3.13.35, so I'll try that first
I don't know why thunderbird works that way, I think it opens one for headers and the other for post bodies. But that is pure guesswork.
Later, but not 3.14, kernel installed. Will reboot now.
Hope it works
...it did, but made no difference. that's 3.13.35 flavour.
But I guess I can always select 3.13 at boot time.
Mmmm. I see listed many flavours of 3.13 but none of 3.14
What is the 'approved' way to get a later 3.13 kernel, and 3.14, which aint in the repo
??
Ok update manager takes me up to 3.13.35, so I'll try that first
I don't know why thunderbird works that way, I think it opens one for headers and the other for post bodies. But that is pure guesswork.
Later, but not 3.14, kernel installed. Will reboot now.
Hope it works

...it did, but made no difference. that's 3.13.35 flavour.
Re: TCP sessions timing out?
I always use this way to do it (just have to change the version)
http://dcageek.blogspot.fr/2014/06/inst ... buntu.html
http://dcageek.blogspot.fr/2014/06/inst ... buntu.html
People disagree with me. I just ignore them.
(Linus Torvalds, regarding the use of C++ for the Linux kernel.)
Please Add [Solved] to the topic-title of your first post when appropriate so others know they might find a solution here.
(Linus Torvalds, regarding the use of C++ for the Linux kernel.)
Please Add [Solved] to the topic-title of your first post when appropriate so others know they might find a solution here.
Re: TCP sessions timing out?
Thanks for that Pat, but I think I am going to pass. I am thinking this may well be another issue than the kernel.PatH57 wrote:I always use this way to do it (just have to change the version)
http://dcageek.blogspot.fr/2014/06/inst ... buntu.html
No doubt 3.14 will turn up as an upgrade in mint 17 standard distro in due course.
I hope so.
this is really a minor irritation and I just hoped someone had a guaranteed fix.
I suspect its something between T'bird and albasani not playing nice.
Re: TCP sessions timing out?
Hi Leo. I am seeing very similar issues on my LAN with LM17 clients.
But I had put the problem down to a potentially defective L2 Smart Switch dropping packets, port to port, within a tagged VLAN.
Just curious if you are using smart or passive switches ?
Lanser
But I had put the problem down to a potentially defective L2 Smart Switch dropping packets, port to port, within a tagged VLAN.
Just curious if you are using smart or passive switches ?
Lanser
Thinkpads:- LM19.x Mate, LMDE3, Debian 10