0

I have an arch-linux system which I use as a server. I try to connect with ssh and samba from different Windows 7 machines.
However, I get frequent connection aborts. ssh (e.g. putty or kitty) says for instance:

Server unexpectedly closed network connection

And often, when I try to connect for the first time

Network error: Software caused connection abort

When I manage it to connect to the machine, it is very random how long it takes to get disconnected again. Sometimes only seconds, sometimes an hour or more.
When I use samba, I often copy some GBs of data before I get an abort. I can not browse the samba shares for a while, before it works again. ssh and samba always disconnect at the same time (given both are active).

I am not sure what kind of problem this is - when my ssh or samba disconnects I can still not ping the machine anymore. I already tried to use a different switch between the machines, but it didn't help either. I tried to change MTU/MRU values - no success.

A tcpdump shows, that the tcp handshake is successful, but afterwards the Windows 7 clients are not responding anymore.

Do you have any idea what's going on here or how I can debug the behavior?

3

These types of issues make me think that there is either something wrong with the Ethernet NIC or the cabling. These sound like spurious errors and often times show up in what only seem like strange or disjoint errors.

One area where these types of errors will show up is if you look at the number of errors that a particular network device is encountering. These counts should generally be low to zero.

Example

Take a peek at the output from ifconfig.

ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:22:15:91:C1:2D  
          inet6 addr: fe80::222:15ff:fe91:c12d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:242318977 errors:0 dropped:0 overruns:0 frame:0
          TX packets:269864547 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:137822461046 (128.3 GiB)  TX bytes:248317481947 (231.2 GiB)
          Interrupt:233 Base address:0x8000 

The line we're interested in is this one:

          RX packets:242318977 errors:0 dropped:0 overruns:0 frame:0
          TX packets:269864547 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 

Notice the errors values are all 0 are this particular server. I would also check these values on the other computers that are exhibiting this behavior.

A similar command, ipconfig, can also show the same type of errors on Windows clients, I'd check this too!

What else?

If the above shows errors, even if it doesn't, I would try replacing the cabling of the server to the switch, and then diagnose the issue further in the following manner, through a process of elimination.

  1. Server & clients' Ethernet NICs
  2. Cabling between server and clients
  3. Switch
  4. Confirm connections are "good" between client X and client

NOTE: I usually use iperf to do this type of analysis between various clients on the network.

If you've successfully done all the above and not ferreted out the issue, then I would move up the stack and start scrutinizing the software on the ArchLinux server next.

  • Thanks for your suggestions, if -s link shows no errors, drops or otherwise corrupt packets. I changed the cabling and the switch without success ... – tanascius Nov 13 '13 at 22:48
  • @tanascius - OK, so I would try doing the iperf tests and drag some data back and forth between hosts to see if any other systems exhibit the issue. This will help to eliminate the switch. – slm Nov 13 '13 at 22:53
1

When connecting to the SSH server, use "ssh -v @". The "-v" means "verbose", and you will see exactly what is happening before you get the error "Server unexpectedly closed network connection".

PS: Try the above command from another Linux machine, not from Windows.

  • Thanks for your answer, I will give it a try and report back – tanascius Nov 14 '13 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.