[Solved] ZM 1.34.23 + Eventserver + ML Hooks

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
vtdstein95
Posts: 31
Joined: Sun Jan 24, 2016 3:13 pm

[Solved] ZM 1.34.23 + Eventserver + ML Hooks

Post by vtdstein95 »

For several months I had all of this working. I always got a chuckle that the facial recognition would identify my wife as my daughter and my daughter as my wife which mortified them both. I am sure I could make the recognition better with better/more photos but what is the fun in that.

Things stopped working a month or so ago and I really have no idea where to start with the debug. I am guessing this may have happened after an update to some critical component. I did not intentionally change anything in my configuration but I must have. I do keep Ubuntu current with apt update && apt upgrade.

I find no useful (to me) clues in the log. ZM continues to function just like it always has but something in zm_detect.py fails. The error appears to be a related to login, so I disabled AUTH but that made no difference. I have uninstalled the event server and ML hooks and walked through the install step by step, but end up right back where I started with the same errors in the log.

Thank you in advance for any guidance you can provide.

My setup
Ubuntu 18.04
Apache 2
MariaDB
PHP 7.4-fpm

Code: Select all

2021-02-16 13:02:31.954738 zmesdetect_m5[25311].FAT-zm_detect.py/577 [Unrecoverable error:HTTPSConnectionPool(host='my.server.address', port=443): Max retries exceeded with url: /zm/api/host/login.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8871860160>: Failed to establish a new connection: [Errno -2] Name or service not known',)) Traceback:Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 144, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 852, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 298, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 153, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f8871860160>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='my.server.address', port=443): Max retries exceeded with url: /zm/api/host/login.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8871860160>: Failed to establish a new connection: [Errno -2] Name or service not known',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 574, in <module>
    main_handler()
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 328, in main_handler
    zmapi = zmapi.ZMApi(options=api_options)
  File "/usr/local/lib/python3.6/dist-packages/pyzm/api.py", line 77, in __init__
    self._login()
  File "/usr/local/lib/python3.6/dist-packages/pyzm/api.py", line 183, in _login
    r = self.session.post(url, data=data)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 567, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 520, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 630, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='my.server.address', port=443): Max retries exceeded with url: /zm/api/host/login.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8871860160>: Failed to establish a new connection: [Errno -2] Name or service not known',))
]
Last edited by vtdstein95 on Fri May 07, 2021 11:52 am, edited 1 time in total.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: ZM 1.34.23 + Eventserver + ML Hooks

Post by Magic919 »

It reads like it is failing to make the HTTPS connection to the ZM API. Test that.
-
vtdstein95
Posts: 31
Joined: Sun Jan 24, 2016 3:13 pm

Re: ZM 1.34.23 + Eventserver + ML Hooks

Post by vtdstein95 »

I use zmNinja and it works fine. I think zmNinja uses the API. Not exactly sure how to check if the API is working but based on some googling I think it is unless the queries below do not reflect the functional status of the API.

h t t p s://my.server.address/zm/api/host/getVersion.json

Code: Select all

{"version":"1.34.23","apiversion":"2.0"}
h t t p s://my.server.address/zm/api/monitors/daemonStatus/id:5/daemon:zmc.json

Code: Select all

{"status":true,"statustext":"'zmc -m 5' running since 21\/02\/16 13:04:57, pid = 25726"}
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: ZM 1.34.23 + Eventserver + ML Hooks

Post by Magic919 »

Ok. Another thought is the ZMES version. Which one are you running? There have been a few bugs early on.
-
vtdstein95
Posts: 31
Joined: Sun Jan 24, 2016 3:13 pm

Re: ZM 1.34.23 + Eventserver + ML Hooks

Post by vtdstein95 »

I followed this (stable, not master) for my re-install today.
https://zmeventnotification.readthedocs ... stall.html

Therefore I assume it is 6.1.12. Also I have had this problem across the last two or three versions (was following the upgrade instructions prior to the re-install). I have to believe it is something in my setup, not in ZMES.

My /etc/zm/secrets.ini:

Code: Select all

[secrets]
ZMES_PICTURE_URL=https://my.server.address/zm/index.php?view=image&eid=EVENTID&fid=objdetect&width=600
ZM_USER=UserWithFullAccess
ZM_PASSWORD=Password1
ES_ADMIN_INTERFACE_PASSWORD=AnotherPassword
ZM_PORTAL=https://my.server.address/zm
ZM_API_PORTAL=https://my.server.address/zm/api
ES_CERT_FILE=/etc/letsencrypt/live/my.server.address/cert.pem
ES_KEY_FILE=/etc/letsencrypt/live/my.server.address/privkey.pem
.
.
.
Could there be a permissions issue accessing the cert.pem and privkey.pem? I chmod the letsencrypt/live and archive directories to 755 per guidance from the certbot user guide. I chgown the files in letsencrypt/archive to www-data:root also per the user guide. I cannot change the owner of the links in letsencrypt/live, they are root:root.

I noticed the last update of these .pem files is Dec 21, 2020 which is around the time (I don't know exactly when) ZMES stopped working. As an FYI, these are linked back to the 8th iterations of the .pem files and I know there were several update while ZMES was working in the past.
gbruneau
Posts: 15
Joined: Fri Jun 07, 2019 8:27 pm

Re: ZM 1.34.23 + Eventserver + ML Hooks

Post by gbruneau »

Do you get an error when you curl https://my.server.address/? If you do then it's not a ZM/ES problem, but an issue with your apache/nginx config. Do you have a personal domain pointing to your zm host? If so, you could try this, https://linuxize.com/post/secure-apache ... ntu-20-04/.

I use certbot myself for my personal domain, it works great.
vtdstein95
Posts: 31
Joined: Sun Jan 24, 2016 3:13 pm

Re: ZM 1.34.23 + Eventserver + ML Hooks

Post by vtdstein95 »

No error on the curl. A personal domain is exactly what I have. To setup I followed a similar set of instructions several years back and https has been working fine (nice paddle lock in the address bar) ever since I set it up. No idea if this is at all related to my ZMES problem. Just pulling on threads.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: ZM 1.34.23 + Eventserver + ML Hooks

Post by Magic919 »

For ZMES I would run it manually and see if anything surfaces.
-
vtdstein95
Posts: 31
Joined: Sun Jan 24, 2016 3:13 pm

Re: ZM 1.34.23 + Eventserver + ML Hooks

Post by vtdstein95 »

Did that last night. When the errors are thrown, I see nothing unusual in the terminal display. Maybe I need to look into the logging/verbosity.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: ZM 1.34.23 + Eventserver + ML Hooks

Post by Magic919 »

Might be worth posting it in the mobile section for more visibility.
-
vtdstein95
Posts: 31
Joined: Sun Jan 24, 2016 3:13 pm

Re: ZM 1.34.23 + Eventserver + ML Hooks

Post by vtdstein95 »

For reference, also not helpful (to me anyway), here is the output of running manually with "sudo -u www-data /usr/bin/zmeventnotification.pl --debug":

Code: Select all

DBG-2:2021-02-17,10:08:36 PARENT: ----------> Tick START (active forks:0, total forks:0, running for:5 min)<--------------
DBG-2:2021-02-17,10:08:36 PARENT: After tick: TOTAL: 1,  ES_CONTROL: 0, FCM+WEB: 0, FCM: 1, WEB: 0, MQTT:0, invalid WEB: 0, PENDING: 0
DBG-2:2021-02-17,10:08:36 PARENT: There are 0 active child forks...
DBG-2:2021-02-17,10:08:36 PARENT: checkEvents() new events found=0
DBG-2:2021-02-17,10:08:36 PARENT: There are 0 new Events to process
DBG-2:2021-02-17,10:08:36 PARENT: ---------->Tick END (active forks:0, total forks:0)<--------------
DBG-2:2021-02-17,10:08:41 PARENT: ----------> Tick START (active forks:0, total forks:0, running for:5 min)<--------------
DBG-2:2021-02-17,10:08:41 PARENT: After tick: TOTAL: 1,  ES_CONTROL: 0, FCM+WEB: 0, FCM: 1, WEB: 0, MQTT:0, invalid WEB: 0, PENDING: 0
DBG-2:2021-02-17,10:08:41 PARENT: There are 0 active child forks...
INF:2021-02-17,10:08:41 PARENT: New event 139762 reported for Monitor:5 (Name:Driveway) Motion ShaleCreek[last processed eid:]
02/17/2021 10:08:41.807799 zmeventnotification[29316].INF [main:1004] [PARENT: New event 139762 reported for Monitor:5 (Name:Driveway) Motion ShaleCreek[last processed eid:]]
DBG-2:2021-02-17,10:08:41 PARENT: checkEvents() new events found=1
DBG-2:2021-02-17,10:08:41 PARENT: There are 1 new Events to process
DBG-2:2021-02-17,10:08:41 PARENT: ---------->Tick END (active forks:1, total forks:1)<--------------
DBG-1:2021-02-17,10:08:41 PARENT: Forked process:29825 to handle alarm eid:139762
DBG-2:2021-02-17,10:08:41 |----> FORK:Driveway (5), eid:139762 Adding event path:/var/cache/zoneminder/events/5/2021-02-17/139762 to hook for image storage
DBG-1:2021-02-17,10:08:41 |----> FORK:Driveway (5), eid:139762 Invoking hook on event start:'/var/lib/zmeventnotification/bin/zm_event_start.sh' 139762 5 "Driveway" "Motion ShaleCreek" "/var/cache/zoneminder/events/5/2021-02-17/139762"
DBG-2:2021-02-17,10:08:42 |----> FORK:Driveway (5), eid:139762 parse of hook: and []
DBG-1:2021-02-17,10:08:42 |----> FORK:Driveway (5), eid:139762 hook start returned with text: json:[] exit:1
DBG-2:2021-02-17,10:08:44 |----> FORK:Driveway (5), eid:139762 rules: Checking rules for alarm caused by eid:139762, monitor:5, at: Wed Feb 17 10:08:44 2021 with cause:Motion ShaleCreek
DBG-1:2021-02-17,10:08:44 |----> FORK:Driveway (5), eid:139762 rules: No rules found for Monitor, allowing:5
DBG-1:2021-02-17,10:08:44 |----> FORK:Driveway (5), eid:139762 Matching alarm to connection rules...
DBG-1:2021-02-17,10:08:44 |----> FORK:Driveway (5), eid:139762 Checking alarm conditions for token ending in:...jkr491yN_J
DBG-1:2021-02-17,10:08:44 |----> FORK:Driveway (5), eid:139762 should NOT send alarm as Monitor 5 is excluded
DBG-2:2021-02-17,10:08:46 PARENT: ----------> Tick START (active forks:1, total forks:1, running for:5 min)<--------------
DBG-2:2021-02-17,10:08:46 PARENT: After tick: TOTAL: 1,  ES_CONTROL: 0, FCM+WEB: 0, FCM: 1, WEB: 0, MQTT:0, invalid WEB: 0, PENDING: 0
DBG-2:2021-02-17,10:08:46 PARENT: There are 1 active child forks...
DBG-2:2021-02-17,10:08:46 PARENT: We've already worked on Monitor:5, Event:139762, not doing anything more
DBG-2:2021-02-17,10:08:46 PARENT: checkEvents() new events found=0
DBG-2:2021-02-17,10:08:46 PARENT: There are 0 new Events to process
DBG-2:2021-02-17,10:08:46 PARENT: ---------->Tick END (active forks:1, total forks:1)<--------------
DBG-3:2021-02-17,10:08:50 |----> FORK:Driveway (5), eid:139762 For 5 (Driveway), SHM says: state=0, eid=139762
INF:2021-02-17,10:08:50 |----> FORK:Driveway (5), eid:139762 Event 139762 for Monitor 5 has finished
02/17/2021 10:08:50.702140 zmeventnotification[29825].INF [main:1004] [|----> FORK:Driveway (5), eid:139762 Event 139762 for Monitor 5 has finished]
DBG-3:2021-02-17,10:08:50 |----> FORK:Driveway (5), eid:139762 Event end object is: state=>pending with cause=>Motion: ShaleCreek
DBG-2:2021-02-17,10:08:51 PARENT: ----------> Tick START (active forks:1, total forks:1, running for:5 min)<--------------
DBG-2:2021-02-17,10:08:51 PARENT: After tick: TOTAL: 1,  ES_CONTROL: 0, FCM+WEB: 0, FCM: 1, WEB: 0, MQTT:0, invalid WEB: 0, PENDING: 0
DBG-2:2021-02-17,10:08:51 PARENT: There are 1 active child forks...
DBG-2:2021-02-17,10:08:51 PARENT: checkEvents() new events found=0
DBG-2:2021-02-17,10:08:51 PARENT: There are 0 new Events to process
DBG-2:2021-02-17,10:08:51 PARENT: ---------->Tick END (active forks:1, total forks:1)<--------------
INF:2021-02-17,10:08:52 |----> FORK:Driveway (5), eid:139762 end hooks/use hooks not being used, going to directly send out a notification if checks pass
02/17/2021 10:08:52.709621 zmeventnotification[29825].INF [main:1004] [|----> FORK:Driveway (5), eid:139762 end hooks/use hooks not being used, going to directly send out a notification if checks pass]
DBG-2:2021-02-17,10:08:54 |----> FORK:Driveway (5), eid:139762 rules: Checking rules for alarm caused by eid:139762, monitor:5, at: Wed Feb 17 10:08:54 2021 with cause:Motion ShaleCreek
DBG-1:2021-02-17,10:08:54 |----> FORK:Driveway (5), eid:139762 rules: No rules found for Monitor, allowing:5
INF:2021-02-17,10:08:54 |----> FORK:Driveway (5), eid:139762 Not sending event end alarm, as we did not send a start alarm for this, or start hook processing failed
02/17/2021 10:08:54.715795 zmeventnotification[29825].INF [main:1004] [|----> FORK:Driveway (5), eid:139762 Not sending event end alarm, as we did not send a start alarm for this, or start hook processing failed]
DBG-2:2021-02-17,10:08:56 PARENT: ----------> Tick START (active forks:1, total forks:1, running for:5 min)<--------------
DBG-2:2021-02-17,10:08:56 PARENT: After tick: TOTAL: 1,  ES_CONTROL: 0, FCM+WEB: 0, FCM: 1, WEB: 0, MQTT:0, invalid WEB: 0, PENDING: 0
DBG-2:2021-02-17,10:08:56 PARENT: There are 1 active child forks...
DBG-2:2021-02-17,10:08:56 PARENT: checkEvents() new events found=0
DBG-2:2021-02-17,10:08:56 PARENT: There are 0 new Events to process
DBG-2:2021-02-17,10:08:56 PARENT: ---------->Tick END (active forks:1, total forks:1)<--------------
DBG-1:2021-02-17,10:08:58 |----> FORK:Driveway (5), eid:139762 exiting
DBG-1:2021-02-17,10:08:58 |----> FORK:Driveway (5), eid:139762 Ending process:29825 to handle alarms
DBG-2:2021-02-17,10:09:01 PARENT: ----------> Tick START (active forks:1, total forks:1, running for:5 min)<--------------
DBG-2:2021-02-17,10:09:01 PARENT: After tick: TOTAL: 1,  ES_CONTROL: 0, FCM+WEB: 0, FCM: 1, WEB: 0, MQTT:0, invalid WEB: 0, PENDING: 0
DBG-2:2021-02-17,10:09:01 PARENT: RAW TEXT-->active_event_delete--TYPE--5--SPLIT--139762
DBG-2:2021-02-17,10:09:01 PARENT: Job: Deleting active_event eid:139762, mid:5
DBG-2:2021-02-17,10:09:01 PARENT: There are 0 active child forks...
DBG-2:2021-02-17,10:09:01 PARENT: checkEvents() new events found=0
DBG-2:2021-02-17,10:09:01 PARENT: There are 0 new Events to process
DBG-2:2021-02-17,10:09:01 PARENT: ---------->Tick END (active forks:0, total forks:1)<--------------
DBG-2:2021-02-17,10:09:06 PARENT: ----------> Tick START (active forks:0, total forks:1, running for:5 min)<--------------
DBG-2:2021-02-17,10:09:06 PARENT: After tick: TOTAL: 1,  ES_CONTROL: 0, FCM+WEB: 0, FCM: 1, WEB: 0, MQTT:0, invalid WEB: 0, PENDING: 0
DBG-2:2021-02-17,10:09:06 PARENT: There are 0 active child forks...
DBG-2:2021-02-17,10:09:06 PARENT: checkEvents() new events found=0
DBG-2:2021-02-17,10:09:06 PARENT: There are 0 new Events to process
DBG-2:2021-02-17,10:09:06 PARENT: ---------->Tick END (active forks:0, total forks:1)<--------------
DBG-2:2021-02-17,10:09:11 PARENT: ----------> Tick START (active forks:0, total forks:1, running for:5 min)<--------------
DBG-2:2021-02-17,10:09:11 PARENT: After tick: TOTAL: 1,  ES_CONTROL: 0, FCM+WEB: 0, FCM: 1, WEB: 0, MQTT:0, invalid WEB: 0, PENDING: 0
DBG-2:2021-02-17,10:09:11 PARENT: There are 0 active child forks...
DBG-2:2021-02-17,10:09:11 PARENT: checkEvents() new events found=0
DBG-2:2021-02-17,10:09:11 PARENT: There are 0 new Events to process
DBG-2:2021-02-17,10:09:11 PARENT: ---------->Tick END (active forks:0, total forks:1)<--------------
DBG-2:2021-02-17,10:09:16 PARENT: ----------> Tick START (active forks:0, total forks:1, running for:5 min)<--------------
DBG-2:2021-02-17,10:09:16 PARENT: After tick: TOTAL: 1,  ES_CONTROL: 0, FCM+WEB: 0, FCM: 1, WEB: 0, MQTT:0, invalid WEB: 0, PENDING: 0
DBG-2:2021-02-17,10:09:16 PARENT: There are 0 active child forks...
DBG-2:2021-02-17,10:09:16 PARENT: checkEvents() new events found=0
DBG-2:2021-02-17,10:09:16 PARENT: There are 0 new Events to process
DBG-2:2021-02-17,10:09:16 PARENT: ---------->Tick END (active forks:0, total forks:1)<--------------
^CINF:2021-02-17,10:09:21 PARENT: Event Server Terminating
02/17/2021 10:09:21.804249 zmeventnotification[29316].INF [main:1004] [PARENT: Event Server Terminating]
And the ZM log which correlates to the above:

Code: Select all

2021-02-17 10:08:42.646864 zmesdetect_m5[29829].FAT-zm_detect.py/577 [Unrecoverable error:HTTPSConnectionPool(host='my.server.address', port=443): Max retries exceeded with url: /zm/api/host/login.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f49d1ef6048>: Failed to establish a new connection: [Errno -2] Name or service not known',)) Traceback:Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 144, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/lib/python3/dist-packages/urllib3/connecti
State: alarm/ Total: 281147/ Available: 1/ Displaying: 200/ Updated: Wed 17th Feb, 10:11am
Component
Server PID
Level
File Line
Date/Time
	Component 	Server 	PID 	Level 	Message 	File 	Line

State: alarm/ Total: 281147/ Available: 1/ Displaying: 200/ Updated: Wed 17th Feb, 10:11am
Component
Server PID
Level
File Line
Date/Time
	Component 	Server 	PID 	Level 	Message 	File 	Line
onpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 852, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 298, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 153, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f49d1ef6048>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='my.server.address', port=443): Max retries exceeded with url: /zm/api/host/login.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f49d1ef6048>: Failed to establish a new connection: [Errno -2] Name or service not known',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 574, in <module>
    main_handler()
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 328, in main_handler
    zmapi = zmapi.ZMApi(options=api_options)
  File "/usr/local/lib/python3.6/dist-packages/pyzm/api.py", line 77, in __init__
    self._login()
  File "/usr/local/lib/python3.6/dist-packages/pyzm/api.py", line 183, in _login
    r = self.session.post(url, data=data)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 567, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 520, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 630, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='my.server.address', port=443): Max retries exceeded with url: /zm/api/host/login.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f49d1ef6048>: Failed to establish a new connection: [Errno -2] Name or service not known',))
]
vtdstein95
Posts: 31
Joined: Sun Jan 24, 2016 3:13 pm

Re: [Solved] ZM 1.34.23 + Eventserver + ML Hooks

Post by vtdstein95 »

This was (as expected) operator error. In my secrets.ini I changed the ZM_PORTAL from an ip address to a domain name. When I made the change, I transposed two letters in that domain name "....nm...." was "....mn...." I had this correct in every other config file location which calls for the URL.

Hope this helps someone else as the error message indicates (to me at least) a successful connection to the server, but a login credentials failure. The real issue was an unsuccessful connection to the server due to an incorrect URL.
Post Reply