rpi3-webiopi
rpi3-webiopi copied to clipboard
Address already in use!! can't stop webiopi service
Hello! I'm trying to put webiopi working for E-Paper remote control and can't solve this problem, the service keeps running after trying to stop it. I can run several ones but with different addresses. Older software worked well with original webiopi, but in Jessie, now with recent Stretch OS it doesn't anymore.
Then when trying to restart with the same port address it says:
2019-02-16 21:00:44 - WebIOPi - ERROR - [Errno 98] Address already in use Traceback (most recent call last): File "/usr/lib/python3/dist-packages/webiopi/protocols/http.py", line 47, in init BaseHTTPServer.HTTPServer.init(self, ("", port), HTTPHandler) File "/usr/lib/python3.5/socketserver.py", line 440, in init self.server_bind() File "/usr/lib/python3.5/http/server.py", line 138, in server_bind socketserver.TCPServer.server_bind(self) File "/usr/lib/python3.5/socketserver.py", line 454, in server_bind self.socket.bind(self.server_address) OSError: [Errno 98] Address already in use
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/webiopi/main.py", line 75, in
Any idea? Thanks a lot!
Same here: #52
The process fails to stop. The included init.d service, being translated into a systemd forking service, does not really kill the main process, it stays active, stalling at 100% CPU usage even that the service appears to be stopped.
Using a native systemd unit will successfully SIGKILL it after 90 seconds timeout. But underlying problem can be much easier replicated by running python3 -m webiopi
form console and trying to interrupt it via CTRL+C. It will hang the console until you SIGKILL it from elsewhere.