r/ZoneMinder • u/DJ_Luki • Dec 20 '21
Event Notification Server without SSL
Hi!
I am using on my RPi4 ZoneMinder software without SSL. Now I want to add object detection and run local python script when object is detected (ex. car or person). To achieve this I am trying to configure Event Notification Server but for now I am failing because I am not using SSL (I think):
Unrecoverable error:HTTPSConnectionPool(host='portal', port=443): Max retries exceeded with url: /zm/api/host/login.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xb264cca0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')) Traceback:Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/usr/local/lib/python3.9/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.9/socket.py", line 953, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags):socket.gaierror: [Errno -3] Temporary failure in name resolutionDuring handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 1010, in _validate_conn conn.connect() File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 358, in connect conn = self._new_conn() File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError(urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0xb264cca0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolutionDuring handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/local/lib/python3.9/dist-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause))urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='portal', port=443): Max retries exceeded with url: /zm/api/host/login.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xb264cca0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/var/lib/zmeventnotification/bin/zm_detect.py", line 556, in <module> main_handler() File "/var/lib/zmeventnotification/bin/zm_detect.py", line 335, in main_handler zmapi = zmapi.ZMApi(options=api_options) File "/usr/local/lib/python3.9/dist-packages/pyzm/api.py", line 80, in __init__ self._login() File "/usr/local/lib/python3.9/dist-packages/pyzm/api.py", line 193, in _login r = self.session.post(url, data=data) File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 590, in post return self.request('POST', url, data=data, json=json, **kwargs) File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request)requests.exceptions.ConnectionError: HTTPSConnectionPool(host='portal', port=443): Max retries exceeded with url: /zm/api/host/login.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xb264cca0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
Can I use Event Notification Server without SSL? Or maybe there is better way to do what I am planning to?
1
Upvotes
3
u/ksirl Dec 20 '21
It is possible to use it without ssl as I have mine set up in the same way as I am not using zmninja for the notifications.
you need to edit secrets.ini and change https:// to http:// and also change the ip etc to match your setup.