Hiawatha gets stuck on embedded system at startup
7 September 2016, 09:37

after upgrading Hiawatha from 9.10 to latest version on an small ARM system I run into a problem, that made me wasting a lot of time in recompiling different versions and looking for the failure. The problem was introduced in version 9.11:
On Hiawatha startup it gets stuck after the "Press Ctrl-C to shutdown the Hiawatha webserver." message. Nothing gets served via IP (controlled by Wireshark), no helpful entries in any log files and even Hiwatha could not be exited anymore with Ctrl-C. But to my astonishment in rare cases the startup worked fine.
On further investigation lsof showed that Hiawatha had /dev/random opened while stuck. In challenge.c the access to /dev/random was introduced even without using the new ChallengeClient option. The problem is: The ARM embedded system does not produce enough real random data. So I've changed the get_random() function to use /dev/urandom instead. No idea if this is a security issue at that point, but as I didn't use the ChallengeClient option so far, I did not care.

Hopefully this problem can be solved in a sane way because I think Hiawatha is a great http server for embedded systems

Hugo Leisink
7 September 2016, 10:48
Changing /dev/random to /dev/urandom is fine. If you want to disable the ChallengeClient feature completely, edit and comment or remove the ENABLE_CHALLENGE setting (line 31) and recompile Hiawatha.
This topic has been closed.