I'm working a lot with the Octoprint REST api, and I have stumbled accross this issue quite a few times now;
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=5000): Max retries exceeded with url: /api/files/local (Caused by NewConnectionError('<ur llib3.connection.HTTPConnection object at 0x763f6950>: Failed to establish a new connection: [Errno 111] Connection refused',))
The Raspberry (Pi 3B) running Octoprint requests the Octoprint API quite a lot, and sometimes I get the error above. I have 9 Raspberries running with the exact same code, each on their own printer, but one of the Raspberries keep failing with exactly this error. It happens on none of the others.
First I thought it was a network problem, but now I have come to think that it might just be Octoprint? It's only that one request that fails. I can request anything else perfectly fine, and it's not even the URL I request the most.
I tried switching networks - same thing happened. Restart; same thing happens.
Anyone knows why this is?