Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration make HA crash after a day #176

Open
guba91 opened this issue May 24, 2023 · 3 comments
Open

integration make HA crash after a day #176

guba91 opened this issue May 24, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@guba91
Copy link
Contributor

guba91 commented May 24, 2023

Everything works, but after some time, like a day, HA stop respond and the docker log are full of messages like ValueError: Invalid file descriptor: -1

HA 2023.5.3
foxess-ha version: v0.26

without foxess-ha homeassistant run without a problem for a week, then reinstalled foxess-ha and after a day BOOM.. D:

`2023-05-24 15:28:41.500 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.501 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.502 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.502 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.503 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.504 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.504 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.505 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.505 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.506 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.507 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.508 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.508 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.509 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.510 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.510 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.511 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.512 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.512 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.513 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.513 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.514 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.515 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.516 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 145, in _start_serving
self._add_reader(sock.fileno(), self._accept_connection,
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/usr/local/lib/python3.10/selectors.py", line 191, in get_key
return mapping[fileobj]
File "/usr/local/lib/python3.10/selectors.py", line 72, in getitem
fd = self._selector._fileobj_lookup(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 226, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.10/selectors.py", line 42, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
2023-05-24 15:28:41.516 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop.start_serving(<aiohttp.web...x7fd31d92ae30>, <socket.socke...REAM, proto=6>, None, , 128, None)
Traceback (most recent call last):

@guba91 guba91 added the bug Something isn't working label May 24, 2023
@RubenCoppensOnGit
Copy link

Found some problems here that could cause this issue.
What happens in the code when auth token is expired and the properties are refreshed (async)?

in the updateAdressbook method the code doesn't return false if the token is expired. that's one fix i would suggest.
The refershToken counter is never used there (it stays always 0)
and .. what happens when all properties request an update at the same time and the auth token is not valid?
There should be set a lock on the global token if it is updating otherwise the trheads risk to interfere.
I will try to make some updates locally on this code.. try it .. and let you knw.
I'm running HA in a container and debugging it during run is a bit difficult there.

@guba91
Copy link
Contributor Author

guba91 commented Jun 20, 2023

the problem is that in my home asistant, this integration make it crash completly, in another HA with only this integration it works perfectly.. so there is something somewhere that make it crash.. or is something with the token as @RubenCoppensOnGit said.. because i noticed that every time i open the foxess app to check the data, it broke the token..
so maybe is just something like "if token is invalid then re-login"
with https://github.com/mhzawadi/foxess-mqtt same problem with the token, but in the dev-php branch it can see that the token is broken and relogin.. hope this is helpful

@essenemari
Copy link

Isn't related to #156 but for you crashes in different place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants