I've noticed that some of our Raspberries running Octoprint have issues sending web request. It often returns "
getrandom() initialization failed". This happens for both Octoprint itself, and a plugin I've made that relies heavily on web requests.
Examples of the error; (from the log)
octoprint.plugins.announcements - ERROR - Could not fetch channel _important from https://octoprint.org/feeds/important.xml: HTTPSConnectionPool(host='octoprint.org', port=443): Max retries exceeded with url: /feeds/important.xml (Caused by SSLError(SSLError("bad handshake: Error([('', 'osrandom_rand_bytes', 'getrandom() initialization failed.')],)",),)) SSLError: HTTPSConnectionPool(host='plugins.octoprint.org', port=443): Max retries exceeded with url: /notices.json (Caused by SSLError(SSLError("bad handshake: Error([('', 'osrandom_rand_bytes', 'getrandom() initialization failed.')],)",),)) octoprint.plugins.SimplyPrint - INFO - [SimplyPrint] - Web request FAILED; URLError = getrandom() initialization failed. (_ssl.c:661)
octoprint - 2020-04-10T145657.255.log (1.2 MB)
Googlin' has lead me to this Stackoverflow question regarding the same issue, where the recommended fix is installing
rng-tools. I am yet to test whether installing this makes a difference for my printers that has the issue, but they are all currently mid-print.
If this was only a problem for my plugin, I'd just deal with it locally, but seeing it affects Octoprint core functions I thought it better to bring it up here. Has anyone here experienced this issue?