Varnish Startup Issue? No, /dev/null

November 28, 2009 - 12:00 pm

Ran into an issue where attempting to start Varnish on a VMWare VM spewed out the following:

Assert error in main(), varnishd.c line 632: Condition((daemon(1, d_flag)) == 0) not 
true. errno = 19 (No such device

The reason was that /dev/null was a bit ... wonky. Rather than a device, it had become a perfectly normal file. Easily fixed by recreating /dev/null:

rm /dev/null
mknod -m 666 /dev/null c 1 3

Really confused as to how exactly /dev/null could break like that, but there you have it.