temboard icon indicating copy to clipboard operation
temboard copied to clipboard

temboard-agent fetch-key fails because of HTTP (not HTTPS) : TypeError: HTTPError.__init__() missing 3 required positional arguments: 'msg', 'hdrs', and 'fp'

Open Krysztophe opened this issue 1 year ago • 0 comments

Hi,

  • Fresh install from temboard and temboard-agent both, on Debian 12 bookworm
  • Debian packages from apt.dalibo.org
  • Following https://temboard.readthedocs.io/en/latest/agent_install/#setup-one-instance
  • The cause seems to be : the ui_url used http and not https
  1. OK, I take the blame, but wouldn't a better error message be nicer? (see temboard logs below).

  2. The workaround is to copy manually signing-public.pem into /etc/temboard-agent/version/instance, maybe this should be documented in the error message or in the INFO?

Fetching the key:

root@feng:/etc/temboard# temboard-agent --config /etc/temboard-agent/15/pagode/temboard-agent.conf fetch-key
INFO:  app: Using config file /etc/temboard-agent/15/pagode/temboard-agent.conf.
INFO:  fetch_key: Requesting public key from http://feng.XXXX.org:8889.
ERROR:  app: Unhandled error:
        Traceback (most recent call last):
          File "/usr/lib/python3/dist-packages/temboardagent/toolkit/app.py", line 351, in entrypoint
            retcode = self.main(argv, environ)
                      ^^^^^^^^^^^^^^^^^^^^^^^^
          File "/usr/lib/python3/dist-packages/temboardagent/cli/app.py", line 135, in main
            return command.main(args)
                   ^^^^^^^^^^^^^^^^^^
          File "/usr/lib/python3/dist-packages/temboardagent/cli/fetch_key.py", line 42, in main
            response.raise_for_status()
          File "/usr/lib/python3/dist-packages/temboardagent/toolkit/http.py", line 177, in raise_for_status
            raise HTTPError(self.status, self.reason)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        TypeError: HTTPError.__init__() missing 3 required positional arguments: 'msg', 'hdrs', and 'fp'
ERROR:  app: temboardagent version is 8.2.1.
ERROR:  app: This is a bug!
ERROR:  app: Please report traceback to https://github.com/dalibo/temboard/issues/new! Thanks!

From temboard:

# journalctl -f -u temboard.service

Feb 16 16:00:48 feng temboard[729661]: taskmanager: Job schedule_collector terminated.
Feb 16 16:00:48 feng temboard[729661]: taskmanager: Job statements_pull_data terminated.
Feb 16 16:01:44 feng temboard[729658]: tornado.general: HTTP_REQUEST on SSL handshake from ('127.0.0.1', 45264).
Feb 16 16:01:44 feng temboard[729658]: autossl: Received b'signing.key HTTP/1.1\r\nHost: feng.XXXX.org:8889\r\nAccept-Encoding: identity\r\n\r\n'
Feb 16 16:01:44 feng temboard[729658]: autossl: Redirecting client to https://feng.XXXX.org:8889/.

Versions:

root@feng:/etc/temboard# temboard-agent  --version
temBoard agent 8.2.1 (/usr/bin/temboard-agent)
System Debian GNU/Linux 12 (bookworm)
Python 3.11.2 (/usr/bin/python3)
bottle 0.12.23
cryptography 38.0.4
libpq 16.2
psycopg2 2.9.9 (dt dec pq3 ext lo64)
root@feng:/etc/temboard# temboard  --version
temBoard 8.2.1 (/usr/lib/temboard/bin/temboard)
System Debian GNU/Linux 12 (bookworm)
Python 3.11.2 (/usr/bin/python3)
cryptography 41.0.5
Tornado 6.3.3
libpq 16.2
psycopg2 2.9.9 (dt dec pq3 ext lo64)
SQLAlchemy 1.4.50

Krysztophe avatar Feb 16 '24 15:02 Krysztophe