I can rule out general network latency as all other network services are running just fine, including SSH between other machines on the same network. As a precaution I am minimising network traffic while I am fiddling with this issue.k4gbb wrote:I have the same problem from time to time.
It happens with almost any and all of my SSh connections.
No matter if they are across the LAN or Inet. It's a latency thing.
I had considered that perhaps it was a processor load issue with the Pi, but no significant processes are running, I am logged in the CLI, with no X running. Uptime shows loads of 0.03, 0.16, 0.09. This is fairly typical as the device is essentially idle. Running top has the top process as using the most CPU by far, at about 3%. During a remote SSH login there is a small spike where the sshd process jumps to the top of the list for a moment or two.bgreat wrote:... My first thought for any issue similar to this is to verify the processor load via top or uptime to confirm no task is causing you to have communication issues.
If you can not isolate it to another application causing a resource issue, then the next thing I would confirm is the power supply. I know you do not notice any network issue when connecting from the Pi, but this is still my number one item for testing. I had one Pi working flawlessly for two months until I switched power adapters. I tested it for several hours and it appeared to be working without issue, then the next day I had a corrupted SD card. Fixed the card and a day later the same thing happened. Switched back the power supply and it has been running flawlessly again.
ifconfig shows 987 RX errors, and 143 TX errors on eth0. I don't recall if these numbers are within acceptable limits or not. This numbers increase at a rate of roughly 50 per minute (estimated).sharow wrote:Try these
1. run "ifconfig" and see what errors/dropped value after slow ssh connection.
2. install ethtool, and see what output 'ethtool eth0' and 'ethtool -k eth0'
3. Disable IPv6
Code: Select all
[email protected] ~ $ sudo ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Link partner advertised link modes: 10baseT/Half 10baseT/Full Link partner advertised pause frame use: Symmetric Link partner advertised auto-negotiation: Yes Speed: 10Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Current message level: 0x00000007 (7) drv probe link Link detected: yes
Code: Select all
[email protected] ~ $ sudo ethtool -k eth0 Features for eth0: rx-checksumming: on tx-checksumming: on tx-checksum-ipv4: off [fixed] tx-checksum-unneeded: off [fixed] tx-checksum-ip-generic: on tx-checksum-ipv6: off [fixed] tx-checksum-fcoe-crc: off [fixed] tx-checksum-sctp: off [fixed] scatter-gather: off tx-scatter-gather: off [fixed] tx-scatter-gather-fraglist: off [fixed] tcp-segmentation-offload: off tx-tcp-segmentation: off [fixed] tx-tcp-ecn-segmentation: off [fixed] tx-tcp6-segmentation: off [fixed] udp-fragmentation-offload: off [fixed] generic-segmentation-offload: off [requested on] generic-receive-offload: on large-receive-offload: off [fixed] rx-vlan-offload: off [fixed] tx-vlan-offload: off [fixed] ntuple-filters: off [fixed] receive-hashing: off [fixed] highdma: off [fixed] rx-vlan-filter: off [fixed] vlan-challenged: off [fixed] tx-lockless: off [fixed] netns-local: off [fixed] tx-gso-robust: off [fixed] tx-fcoe-segmentation: off [fixed] fcoe-mtu: off [fixed] tx-nocache-copy: on loopback: off [fixed]
Reboot complete, this didn't make any difference.sharow wrote:3. Disable IPv6
I'm not aware that my local network has any hostnames, although I did try adding an entry for the windows laptop to /etc/hosts and it made no difference.milhouse wrote:DNS issues can slow down SSH authentication - are you sure your network is resolving local hostnames correctly?
Try adding "UseDNS no" to /etc/ssh/sshd_config and see if it has any effect.
ifconfig shows 987 RX errors, and 143 TX errors on eth0. I don't recall if these numbers are within acceptable limits or not. This numbers increase at a rate of roughly 50 per minute (estimated).
Code: Select all
uprecords # Uptime | System Boot up ----------------------------+--------------------------------------------------- -> 1 52 days, 02:34:35 | Linux 3.2.27+ Sun Nov 18 10:41:10 2012 ifconfig eth0 eth0 Link encap:Ethernet HWaddr b8:27:eb:ec:4e:32 inet addr:192.168.8.33 Bcast:192.168.31.255 Mask:255.255.224.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:57731929 errors:0 dropped:0 overruns:0 frame:0 TX packets:515135 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4027635809 (3.7 GiB) TX bytes:39207000 (37.3 MiB)
floogle wrote:The hub the cable is connected to is a 10/100 switch, I don't know why the Pi connects at 10. The speed doesn't really bother me though, just this SSH issue.
1. I tried using ttssh but it was no different from Putty, I even tried an SSH app on my phone, but they all have the same problem.sharow wrote:1. can you try another SSH-client? openssh or teraterm(http://ttssh2.sourceforge.jp/index.html.en) or something.
2. set 'Compression no' to /etc/ssh/sshd_config
3. set 'Protocol 2' to /etc/ssh/sshd_config, but I don't know Putty supported it.
Thanks for the tip, it's certainly worth a try.efflandt wrote:Check /var/log/syslog for any error messages related to ethernet (whether using ethernet or WiFi).
Have you tried doing running rpi-update to get newer firmware? The script and things need to be installed first https://github.com/Hexxeh/rpi-update
Until I did that I had random network drop outs (which also knocks out USB) on 3 different Pi units. But after rpi-update things stay up for days, no problem.