nlef / moonraker-telegram-bot

Telegram bot to interact with Moonraker (Klipper Web API Server)
Creative Commons Zero v1.0 Universal
245 stars 64 forks source link

[Bug]: Moonraker with HTTPS doesn't work #276

Open HinataKato opened 1 year ago

HinataKato commented 1 year ago

What happened and in what context?

I'm using Moonraker with HTTPS enabled. When I set the server into https://127.0.0.1:7125 in the config file, the program think the "HTTPS" is the domain

If needed, paste the relevant bot log contents here.


*******************************************************************
Current Moonraker telegram bot config
[bot]
server = https://127.0.0.1:7125/

[camera]
host = https://fluidd.*.*/webcam/stream

[progress_notification]
percent = 5
height = 5
time = 60

*******************************************************************
2023-06-07 17:19:57,933 - __main__ - ERROR - 

2023-06-07 17:19:59,140 - klippy - ERROR - HTTPConnectionPool(host='https', port=80): Max retries exceeded with url: //127.0.0.1:7125/printer/info (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xffff7f683220>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 234, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 200, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0xffff7f683220>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

If needed, paste the relevant bot journal contents here.

No response

What branch does this occur on?

master

Reports only on latest master or development branches!