mbugert / connectbox-prometheus

Prometheus exporter for Compal CH7465LG cable modems, commonly sold as "Connect Box"
Apache License 2.0
49 stars 9 forks source link

Read timed out. #11

Closed abrilevskiy closed 3 years ago

abrilevskiy commented 3 years ago

Exception occurred during processing of request from ('172.17.0.1', 58136) Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 438, in _error_catcher yield File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 519, in read data = self._fp.read(amt) if not fp_closed else b"" File "/usr/local/lib/python3.9/http/client.py", line 458, in read n = self.readinto(b) File "/usr/local/lib/python3.9/http/client.py", line 502, in readinto n = self.fp.readinto(b) File "/usr/local/lib/python3.9/socket.py", line 704, in readinto return self._sock.recv_into(b) socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 753, in generate for chunk in self.raw.stream(chunk_size, decode_content=True): File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 576, in stream data = self.read(amt=amt, decode_content=decode_content) File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 541, in read raise IncompleteRead(self._fp_bytes_read, self.length_remaining) File "/usr/local/lib/python3.9/contextlib.py", line 135, in exit self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 443, in _error_catcher raise ReadTimeoutError(self._pool, None, "Read timed out.") urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.0.1', port=80): Read timed out.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.9/socketserver.py", line 650, in process_request_thread self.finish_request(request, client_address) File "/usr/local/lib/python3.9/socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/local/lib/python3.9/socketserver.py", line 720, in init self.handle() File "/usr/local/lib/python3.9/http/server.py", line 427, in handle self.handle_one_request() File "/usr/local/lib/python3.9/http/server.py", line 415, in handle_one_request method() File "/usr/local/lib/python3.9/site-packages/prometheus_client/exposition.py", line 170, in do_GET status, header, output = _bake_output(registry, accept_header, params) File "/usr/local/lib/python3.9/site-packages/prometheus_client/exposition.py", line 41, in _bake_output output = encoder(registry) File "/usr/local/lib/python3.9/site-packages/prometheus_client/openmetrics/exposition.py", line 14, in generate_latest for metric in registry.collect(): File "/usr/local/lib/python3.9/site-packages/prometheus_client/registry.py", line 83, in collect for metric in collector.collect(): File "/usr/local/lib/python3.9/site-packages/connectbox_prometheus-0.2.8-py3.9.egg/connectbox_exporter/connectbox_exporter.py", line 87, in collect raw_xml = connectbox.xml_getter(fun, {}).content File "/usr/local/lib/python3.9/site-packages/compal/init.py", line 182, in xml_getter return self.post("/xml/getter.xml", params) File "/usr/local/lib/python3.9/site-packages/compal/init.py", line 144, in post res = self.session.post( File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 590, in post return self.request('POST', url, data=data, json=json, kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 697, in send r.content File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 831, in content self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b'' File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 760, in generate raise ConnectionError(e) requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.0.1', port=80): Read timed out.

2021-03-25 01:13:53,481 - connectbox_exporter - ERROR - ReadTimeout(ReadTimeoutError("HTTPConnectionPool(host='192.168.0.1', port=80): Read timed out. (read timeout=9)"))

mbugert commented 3 years ago

Hi, thanks for reporting. Just like for #10, could you please provide more details on the steps which led to this error message? What was supposed to happen? Also, which version of the exporter are you using?

This one might be a networking issue. Does pinging the router from the machine where the exporter runs work?

mbugert commented 3 years ago

Closing due to inactivity.