smarthomeNG / smarthome

Device integration platform for your smart home
https://www.smarthomeNG.de
GNU General Public License v3.0
121 stars 92 forks source link

CherryPy ValueError on restart #547

Closed onkelandy closed 1 year ago

onkelandy commented 1 year ago

I got the following exception on restart

Apr 18 23:01:21 NOTICE   lib.smarthome     --------------------   SmartHomeNG restarting, initiated by admin interface   --------------------
Apr 18 23:01:22 ERROR    cherrypy.error    [18/Apr/2023:23:01:22] ENGINE ValueError('I/O operation on closed file.')
Traceback (most recent call last):
  File "/home/smarthome/.local/lib/python3.9/site-packages/cheroot/server.py", line 1267, in communicate
    req.parse_request()
  File "/home/smarthome/.local/lib/python3.9/site-packages/cheroot/server.py", line 702, in parse_request
    success = self.read_request_line()
  File "/home/smarthome/.local/lib/python3.9/site-packages/cheroot/server.py", line 743, in read_request_line
    request_line = self.rfile.readline()
  File "/home/smarthome/.local/lib/python3.9/site-packages/cheroot/server.py", line 300, in readline
    data = self.rfile.readline(256)
  File "/usr/lib/python3.9/_pyio.py", line 559, in readline
    b = self.read(nreadahead())
  File "/usr/lib/python3.9/_pyio.py", line 538, in nreadahead
    readahead = self.peek(1)
  File "/usr/lib/python3.9/_pyio.py", line 1134, in peek
    return self._peek_unlocked(size)
  File "/usr/lib/python3.9/_pyio.py", line 1141, in _peek_unlocked
    current = self.raw.read(to_read)
  File "/usr/lib/python3.9/socket.py", line 698, in readinto
    self._checkClosed()
ValueError: I/O operation on closed file.

Apr 18 23:02:05 NOTICE   lib.smarthome     --------------------   Init SmartHomeNG v1.9.5.1-564828c6.develop   --------------------

I don't see any real issue after that, however catching the error might be an idea if possible? Not sure where this issue originates from in shng..

msinn commented 1 year ago

The error is already catcht within cherrypy, as you can see by the logger that is used. From SmartHomeNG nothing can be done.

It would be best, if you report the error to the Cherrypy project.

onkelandy commented 1 year ago

OK thought so. Thx.