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

Problem connecting Arris Connectbox #3

Open guyke01 opened 4 years ago

guyke01 commented 4 years ago

When connecting to the Arris Connectbox the following error occurs in the Docker Container of Connectbox-Prometheus. See the error below:

Exception happened during processing of request from ('172.17.0.1', 41560)

Traceback (most recent call last):

 File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread

    self.finish_request(request, client_address)

  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request

    self.RequestHandlerClass(request, client_address, self)

  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__

    self.handle()

  File "/usr/local/lib/python3.8/http/server.py", line 427, in handle

    self.handle_one_request()

  File "/usr/local/lib/python3.8/http/server.py", line 415, in handle_one_request

    method()

  File "/usr/local/lib/python3.8/site-packages/prometheus_client/exposition.py", line 152, in do_GET

    output = encoder(registry)

  File "/usr/local/lib/python3.8/site-packages/prometheus_client/openmetrics/exposition.py", line 14, in generate_latest

    for metric in registry.collect():

  File "/usr/local/lib/python3.8/site-packages/prometheus_client/registry.py", line 75, in collect

    for metric in collector.collect():

  File "/usr/local/lib/python3.8/site-packages/connectbox_prometheus-0.2.6-py3.8.egg/connectbox_exporter/connectbox_exporter.py", line 58, in collect

    connectbox.login()

  File "/usr/local/lib/python3.8/site-packages/compal/__init__.py", line 202, in login

    if res.headers["Location"].endswith("common_page/Access-denied.html"):

  File "/usr/local/lib/python3.8/site-packages/requests/structures.py", line 54, in __getitem__

    return self._store[key.lower()][1]

KeyError: 'location'

----------------------------------------

ERROR:compal:Was not redirected to login page: concurrent session?
guyke01 commented 4 years ago

Hi, is there any update on this issue?

mbugert commented 4 years ago

Thanks for posting. Overall it looks like an incompatibility with this type of modem in the upstream compal library.

I assume this issue is reproducible, i.e. login always fails? Could you please post some details on the device that you are using, possibly by adding a photo of the device? I googled for it but didn't find any useful info.

guyke01 commented 4 years ago

Hi, I am using the Arris Modem from Ziggo (Netherlands). I have the model Arris TG2492LG-ZG. https://tweakers.net/pricewatch/789051/ziggo-connect-box/specificaties/

I found some other Github post for the Arris Modem like the following https://github.com/andrewfraley/arris_cable_modem_stats

The error is still the same as the first post.

mbugert commented 4 years ago

Okay. We will need to fix it upstream in compal. I created an issue: :point_right: https://github.com/ties/compal_CH7465LG_py/issues/21 :point_left:

The library in your second link seems to target a different device so I don't expect it to be helpful for this particular issue.