LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-19-2011, 12:23 PM   #1
MALDATA
Member
 
Registered: Mar 2005
Posts: 157

Rep: Reputation: 19
Frequent broken pipes from SSH connection after power loss


I have three machines networked to my desktop which run a bunch of simulations in parallel. As they're running, I connect to them via SSH and screen to keep an eye on the runs and look at the output. They stay usually connected for days at a time. The SSH servers and client are running Fedora 14.

Yesterday one of my coworkers accidentally yanked the plug on one of the servers while it was running. When I powered it up again, I started getting some odd connection problems. I couldn't connect to it via SSH initially because I got the Remote Host Identification Changed (RSA host key changed) error. I deleted the key in .ssh/known_hosts, which allowed me to connect, but it denied my password. I then logged into that machine locally, restarted sshd, and removed .ssh/known_hosts again. Now I can log in via SSH without problems. However, the connection dies with a "Write failed: Broken pipe" error every few minutes (as opposed to the other two machines, which stay connected indefinitely).

So my questions are:
1.) why would a power loss affect the behavior of the SSH server?
2.) why do I keep getting broken pipes now?

Thanks!
 
Old 04-19-2011, 01:31 PM   #2
jcalzare
Member
 
Registered: Aug 2009
Location: Chicago
Distribution: CentOS
Posts: 114

Rep: Reputation: 34
A reboot causes services to be restarted, so config files are re-parsed. If there was an update to the ssh-server or changes made to the config file, they would not be made live until the server restarted. To fix the broken pipes issue, open your ssh configuration file (usually /etc/ssh/sshd_config) and check for ClientAliveInterval and ClientAliveCountMax. I suspect these items because it sounds like the client machine is not responding to keepalive requests. You can check the man page for sshd_config for more details on those and other directives that may be pertinent. You could also try simply copying over the sshd_config from one of the other servers.
 
Old 04-19-2011, 01:35 PM   #3
dafydd2277
Member
 
Registered: Mar 2010
Posts: 58

Rep: Reputation: 5
Off the top of my head, try "ifconfig" and see if you're getting any packet errors or drops on your interface. The power drop might have munged it.
 
Old 04-19-2011, 02:50 PM   #4
MALDATA
Member
 
Registered: Mar 2005
Posts: 157

Original Poster
Rep: Reputation: 19
ifconfig shows no errors and no drops.

This apparently isn't just an SSH problem. Earlier today I connected through VNC, about an hour ago VNC failed to connect, and now it's working again.

I checked the SSH config files, and they are the same as the other machines, so nothing changed. Also, that doesn't seem to explain why it denies my password.

This is starting to get me concerned. Thanks for your input, let me know if you have other ideas.
 
Old 04-19-2011, 05:08 PM   #5
MALDATA
Member
 
Registered: Mar 2005
Posts: 157

Original Poster
Rep: Reputation: 19
I borrowed another ethernet card and popped it in there. That one works fine... all the connection problems are gone. I didn't think it was a hardware problem because I figured the RSA key wouldn't change if something was broken, it just wouldn't connect at all.

I guess I was wrong.

This is why I can't have nice things.
 
  


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
Network Connection Loss And USB Connection Loss. Novatian Linux - Desktop 1 11-07-2008 03:09 PM
signal handler for broken pipes during socket connetions kernel 2.6 rairoldi Programming 1 04-23-2008 07:28 AM
transcode broken pipes redjokerx Linux - Software 1 09-30-2005 06:16 AM
re-display applications in ssh after loss of connection shyam_d_sundar Linux - Newbie 1 06-11-2004 12:16 AM
Kerio mailserver and broken pipes jason4hbs Linux - Software 0 08-13-2003 12:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:24 PM.

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