Page 1 of 1

Watching live cycles through prefork'd apaches

Posted: Thu Nov 26, 2015 3:06 pm
by glenm
Hi all,

I'm struggling with something that should be simple. I'm hoping it is just a configuration error on my part.

Viewing live video seems to work, but generates a lot of error logs while it is running, such as these:

Code: Select all

Nov 26 06:36:09 provost web_php[27103]: ERR [socket_sendto( /var/run/zm/zms-544475s.sock ) failed: No such file or directory]
Nov 26 06:36:09 provost web_php[27103]: ERR [getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-544475s.sock ) failed: No such file or directory]
Nov 26 06:36:12 provost zma_m1[7991]: INF [BackyardCamera: 1090625 - Left alarm state (1443) - 199(38) images]
Nov 26 06:36:12 provost zma_m1[7991]: INF [BackyardCamera: 1090625 - Closing event 1443, alarm end]
Nov 26 06:36:12 provost web_php[27104]: ERR [socket_bind( /var/run/zm/zms-544475w.sock ) failed: Address already in use]
Nov 26 06:36:12 provost web_php[27104]: ERR [getStreamCmdResponse stream error: socket_bind( /var/run/zm/zms-544475w.sock ) failed: Address already in use]
Nov 26 06:36:12 provost web_php[27103]: ERR [socket_sendto( /var/run/zm/zms-544475s.sock ) failed: No such file or directory]
Nov 26 06:36:15 provost web_php[27104]: ERR [socket_sendto( /var/run/zm/zms-544475s.sock ) failed: No such file or directory]
Nov 26 06:36:15 provost web_php[27104]: ERR [getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-544475s.sock ) failed: No such file or directory]
Nov 26 06:36:18 provost web_php[31208]: ERR [socket_bind( /var/run/zm/zms-544475w.sock ) failed: Address already in use]
Nov 26 06:36:18 provost web_php[31208]: ERR [getStreamCmdResponse stream error: socket_bind( /var/run/zm/zms-544475w.sock ) failed: Address already in use]
Nov 26 06:36:18 provost web_php[27104]: ERR [socket_sendto( /var/run/zm/zms-544475s.sock ) failed: No such file or directory]
Nov 26 06:36:21 provost web_php[31208]: ERR [socket_sendto( /var/run/zm/zms-544475s.sock ) failed: No such file or directory]
Nov 26 06:36:21 provost web_php[31208]: ERR [getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-544475s.sock ) failed: No such file or directory]
Nov 26 06:36:24 provost web_php[25419]: ERR [socket_bind( /var/run/zm/zms-544475w.sock ) failed: Address already in use]
Nov 26 06:36:24 provost web_php[25419]: ERR [getStreamCmdResponse stream error: socket_bind( /var/run/zm/zms-544475w.sock ) failed: Address already in use]
The process ids suggest that the web front end is for some reason cycling through the available apache processes, rather than sticking to a single apache. I built apache with mpm prefork, and there are perhaps 8 or so of them running right now.

As I said at top, it looks as if the replay is working fine - video displays for example. There is an events list.

The only suspect issue is that the video stats just below the video are not populated - eg "State: - fps". Being a noob, I'm not sure if those are supposed to be populated at this point, I've never seen content in them.

I'm running ver 1.28.109 using the Nov 21 HEAD from Git (because worked around a shared memory problem I was having with 1.28.1). FWIW, I run gentoo on this box, and am relatively up to date in that respect. apache 2.4.16. php 5.6.14

Any suggestions? thanks

glen

Re: Watching live cycles through prefork'd apaches

Posted: Fri Nov 27, 2015 2:24 am
by bbunge
So, why are you struggling with building packages? There are plenty of Linux distros that have packages built and tested! Please see the WIKI...

Re: Watching live cycles through prefork'd apaches

Posted: Sat Dec 19, 2015 8:10 pm
by glenm
[sorry for the late response, I've been on the road for a few weeks]

> why are you struggling with building packages

Well, because the box already existed, already ran Gentoo and had done for some years because that was convenient for some other things I do with that server. And with Gentoo, one builds packages, that's kinda the point. ;)

I don't think the issue here is the build, but could be the config of Apache httpd or something on the browser side. Somehow the round-robin selection of apache services are causing the connection to zms to fail. Either the browser->apache connections shouldn't round-robin to the loadbalanced services. Or, all the apache services should be able to connect to the same zms.

I guess I was hoping someone who knew could say whether zm intends to be nailed into a single apache service instance, or whether it intends to fully support loadbalanced services. Knowing how it is supposed to work would help me further debug what may be going wrong. I'm not really a LAMP stack expert.

By the way, a little new data. I have now seen the state, fps and other stats populate into the display properly in a couple of occasions, and sure enough, when it displays then there are none of the socket error entries in the log that I reported above. I'm guessing in this case the stats request randomly hits the same httpd server instance, and so it can use that service's existing connection to zms and all is good. But in my config, it mostly doesn't deliver the various requests to the same httpd service.

Thanks

glen