Page 2 of 2

Re: zmeventnotification: Error parsing config:/etc/zm/objectconfig.ini

Posted: Mon Jun 22, 2020 4:56 pm
by asker
Let's focus on the error that you posted:

Code: Select all

File "/usr/lib/python3.7/urllib/request.py", line 1319, in do_open raise URLError(err)urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>
It doesn't say Permission denied, nor does it say 404 (Not found). "Name or service not known" means the download function tried to use a URL to download the image and python does not know how to handle that URL.

Based on what I found:

1. It may be that your URL config is wrong. We ruled that out
2. It may be that DNS cannot resolve that URL from the server you are running zm_detect.py. I think we also ruled that out, because wget works and I assume you ran it from the same server
3. It may be that you are using a proxy? Is that a possibility?

Anyway, to your question, files are downloaded to /var/lib/zmeventnotification/images. You should have write permissions to it, because you ran zm_detect with -u www-data

Re: zmeventnotification: Error parsing config:/etc/zm/objectconfig.ini

Posted: Mon Jun 22, 2020 6:46 pm
by SkippyDo
No, no proxy. That is, none that I'm aware of: I have not intentionally created any such configuration. I'd actually had a previous version of object detection working (back when it was zmeventserver) under ZM 1.32: for a brief time. I'm using the same hardware and basic configurations: I suspect, however, that I may not have been running UFW (can't recall).

Re: zmeventnotification: Error parsing config:/etc/zm/objectconfig.ini

Posted: Sat Jun 27, 2020 1:18 pm
by SkippyDo
I'm really wanting to resolve whatever is causing my issue/error. Should I open up a new thread since it doesn't appear related to parsing the objectconfig.ini file?

I'd like to better understand how to read the error logs as I posted in my June 17th post. Top of error log shows "animation: Traceback:Traceback (most recent call last". Do I read from the bottom of that log entry (which contains " File "/usr/lib/python3.7/urllib/request.py", line 1319, in do_open raise URLError(err)urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>")?

Re: zmeventnotification: Error parsing config:/etc/zm/objectconfig.ini

Posted: Sat Jun 27, 2020 2:33 pm
by asker
The real issue is generally at the bottom of python errors, but in this case, one error caused another, so it is in the middle.

The key issue is this error:

Code: Select all

File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags):socket.gaierror: [Errno -2] Name or service not known
If you google around, the reason is that the address it is trying to resolve is not resolvable via DNS.

You're going to have to figure out why that is so. Not much else I can point to.

Re: zmeventnotification: Error parsing config:/etc/zm/objectconfig.ini

Posted: Sun Jun 28, 2020 9:55 am
by SkippyDo
Yeah, OK. I didn't want to make that assumption.

I've run into a dead end. Problem is at some really low level that I cannot unearth. Everything works except object detection. I'll just live with things as-is.

Re: zmeventnotification: Error parsing config:/etc/zm/objectconfig.ini

Posted: Mon Jun 29, 2020 12:22 am
by asker
If you are able to give me ssh access I can try and debug. I still feel it’s something configuration related.

Re: zmeventnotification: Error parsing config:/etc/zm/objectconfig.ini

Posted: Tue Jun 30, 2020 1:18 pm
by SkippyDo
I think this is a server configuration issue and not an application configuration, application related to ZM/zmeventnotifcation.

"getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags):socket.gaierror: [Errno -2] Name or service not known"

Per an answer given to/on https://stackoverflow.com/questions/572 ... own-python

Code: Select all


socket.gaierror: [Errno -2] Name or service not known means that the name resolution is failing for the given domain (api.github.com).

Name resolution (DNS in the usual notion) can fail for various reasons. As you have disconnected the internet, the reason is pretty obvious (Name or service not known).

gai (GetAddressInfo) is actually used by glibc to perform the name resolutions, it's part of glibc (and socket is using that as you can imagine). You can also actually configure it in /etc/gai.conf.
Not sure what the call is querying, and what it's using to do the query, whether FQDN or just the hostname. If it's a broadcast request to resolve the hostname IP then I can see that failing as the server is directly on the WAN (DMZ'd off my ISP router; DHCP, not static). And, if for some reason it's expecting to resolve as an ipv6 address and is depending on local resources (itself) then that could be dealt with via /etc/hosts (which has an ipv4 entry for hostname and FDQN for the loopback interface at 127.0.1.1, but no equivalent ipv6 entry) or via /etc/gai.conf (set preference to ipv4): I don't understand ipv6, so not real sure how I'd go about making either change or test. This kind of lines up with your suspecting that this might be a proxy issue (which I'd stated I wasn't using any proxy server/services).

Re: zmeventnotification: Error parsing config:/etc/zm/objectconfig.ini

Posted: Tue Jun 30, 2020 5:50 pm
by asker
It is a system issue if you have that problem with any URL and outside of the ES.
I think you did wget tests and they worked. I assume you tested them on the same server where the ES is.

Re: zmeventnotification: Error parsing config:/etc/zm/objectconfig.ini

Posted: Thu Jul 02, 2020 10:52 am
by SkippyDo
Correct, I did run wget on the ES (and ZM) server.

Just seems, according to that error, that it's having issues resolving the hostname/IP. It's like the python scripts are calling some other library routines (than is wget). Well, that or the URL (and rest) is getting corrupted when handed off to some underlying library: there's nothing special in the URL and args that I can see that could be suspect (no strange characters).

Are there any configuration files other than ZM and zmeventnotification that could be a source of this problem? If not, I could just email you the relevant files. I'm not adverse to allowing you access to the server, it's just that I don't think that you'd find anything if only looking at the config files, which I could just send: already noted that the relevant directories have the required permissions/ownership.

Re: zmeventnotification: Error parsing config:/etc/zm/objectconfig.ini

Posted: Thu Jul 02, 2020 1:08 pm
by asker
I don't plan to only read config files. I plan to check your install and execute myself to see what is going on. It is much easier for me than long forum posts

Re: zmeventnotification: Error parsing config:/etc/zm/objectconfig.ini

Posted: Sat Jul 04, 2020 12:53 pm
by SkippyDo
Could you refresh my memory as to how to contact you directly?