Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Odd sshd crash
PostPosted: Thu Dec 30, 2004 6:54 pm 
Offline
Junior Member

Joined: Thu Oct 07, 2004 6:47 pm
Posts: 47
I just had to restart OpenSSH (gentoo 2004-03, 2.6.9-linode9 on host33) and I found this error in my logs :
Dec 30 23:25:45 [sshd] fatal: Couldn't obtain random bytes (error 604389476)

Never saw this kind of sshd error before... If it fetches its random bytes from /dev/(u)random, it could mean the UMLs are all using the hosts (u)random and there was some kind of starvation occuring.

Note: I'm hosting a small SSL site on the machine, although it wasn't used at this time it could help explain a starvation.


Top
   
 Post subject:
PostPosted: Thu Dec 30, 2004 7:33 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
Sometimes headless machines run short of random entropy because there are no keyboard or mouse events to help generate it - disk and network activity may just not be enough.

The problem of too little entropy generation with UML was discussed here but no real solution was found.

I'm pretty sure that the UML instances maintain their own random entropy pools - they do not access the host pool. Host pool access was suggested as a solution to the problem discussed in the thread mentioned above, but caker wasn't keen in case one greedy Linode depleted the host entropy pool.

caker suggested increasing the entropy pool size - most distros have a default entropy pool size of 512 bytes - I increase mine to 8k so as to save up randomness during normal operations for the times when sshd and mod_ssl need lots and there's not much else going on to generate it.

Code:
fremont root # echo 8192 > /proc/sys/kernel/random/poolsize

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Thu Dec 30, 2004 7:43 pm 
Offline
Junior Member

Joined: Thu Oct 07, 2004 6:47 pm
Posts: 47
Thanks a lot for this summary. Just added kernel.random.poolsize = 2048 in my sysctl.conf file and increased the value manually.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group