Thursday, November 23, 2006

Cool Entropy

So I ran into this problem on updating cups on my server. Whenever I tried to access the admin page, it will seem to hang with message generating ssl keys. Nothing happened. Google came to help, searching for "Generating SSL server key" got me this page. Looks like SSL needs kernel entropy to generate good random numbers which are needed to generate SSL keys. Now this entropy is produced by random events on a computer, key press, mouse movements, disk access etc. Since my server does not have a mouse or keyboard, and disk access is not very often, it did not have enough entropy! As suggested by Ross Burton, I ran find / (lots of disc access) and watch sysctl kernel.random.entropy_avail and indeed after a few minutes the entropy was high enough and cups proceeded normally. Cool!