Lost ability to view events from the web

Forum for questions and support relating to the 1.28.x releases only.
Locked
m_theredhead

Lost ability to view events from the web

Post by m_theredhead »

Hello,

I have been running zoneminder on Fedora for a while, but recently viewing events has broken and I don't know what led to the issue.

I am running Fedora 20 with rpmfusion repos and zoneminder repo. The package version is zoneminder-1.28.0-3.fc20.x86_64.

WHen I try to view events, I just get a broken picture icon and no streaming video. Looking in the web server logs, I see this error:

Code: Select all

[Wed Nov 05 09:32:48.093225 2014] [:error] [pid 31897] [client 192.168.101.10:45297] ERR [socket_sendto( /var/lib/zoneminder/sock/zms-665702s.sock ) failed: No such file or directory], [val]=6&sort_field=StartTime&sort_asc=1&page=1
Similar error in /var/log/message:

Code: Select all

Nov  5 09:46:51 <host> web_php[31900]: ERR [socket_sendto( /var/lib/zoneminder/sock/zms-365962s.sock ) failed: No such file or directory]
Nov  5 09:46:51 <host> web_php[31900]: ERR [getCmdResponse stream error: socket_sendto( /var/lib/zoneminder/sock/zms-365962s.sock ) failed: No such file or directory - checkStreamForErrors()]
From looking at the FAQ and searching the forum, I see this is typically caused by the ScriptAlias definition. I have followed the guidance in the FAQ and tried moving this below the inclusion of the conf.d/* files and I have tried commenting out the line all together, restarting http and zoneminder, but neither solution impacted the error.

Any other suggestions?
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Lost ability to view events from the web

Post by knight-of-ni »

Step 7 from README.Fedora addresses the issue you are experiencing.

Note that, if you are using zmrepo, you don't need to add the RPMFusion repo, unless of course you need it for something non-zonemidner related.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
m_theredhead

Re: Lost ability to view events from the web

Post by m_theredhead »

As I noted in my original message, I have followed step 7 and it does not resolve the issue.

Below is a section from my httpd conf file

Code: Select all

# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf

#Moved below to fix zoneminder
#ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
As you can see I have moved the Script alias below and it didn't fix the issue. Also commenting it out didn't fix the issue.
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Lost ability to view events from the web

Post by knight-of-ni »

Look in your Apache logfiles under /var/log/httpd for errors. That will tell you if you have an overlapping ScriptAlias.
Do you have any other config files in conf.d that might also have a ScriptAlias?

What is the value of ZM_PATH_ZMS?

Verify the backend is still running normally by the presence of repeating "Capturing at x.xx fps” messages.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
m_theredhead

Re: Lost ability to view events from the web

Post by m_theredhead »

I grep'ed through all of my http logs and there is no reference to ScriptAlias ( or even alias ).

Looking through the config files, I see:

Code: Select all

 find . -name \*.conf -exec grep ScriptAlias {} /dev/null \;
./conf/httpd.conf:    # ScriptAlias: This controls which directories contain server scripts. 
./conf/httpd.conf:    # ScriptAliases are essentially the same as Aliases, except that
./conf/httpd.conf:    # client.  The same rules about trailing "/" apply to ScriptAlias
./conf/httpd.conf:    #ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
./conf/httpd.conf:# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
./conf/httpd.conf:    # To use CGI scripts outside of ScriptAliased directories:
./conf/httpd.conf:#ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
./conf.d/munin.conf:ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph
./conf.d/zoneminder.conf:ScriptAlias /cgi-bin/zm "/usr/libexec/zoneminder/cgi-bin"
The only other one that has a reference to ScriptAlias is munin. I tried moving this config file out of the way, restarting httpd, and zoneminder, but it didn't change the result.

The value of ZM_PATH_ZMS is /cgi-bin/zm/nph-zms

The backend is running. I see messages related to capturing at x.xx fps.
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Lost ability to view events from the web

Post by knight-of-ni »

These are less likely, but you should verify the following:
- The alias_module is being loaded /etc/httpd/conf.modules.d/00-base.conf
- /var/lib/zoneminder/sock exists and is writable by apache
- Go through the conf.d folder again and look for Redirect or RedirectMatch directives that might cause apache to ignore the scriptalias.

If that isn't it, then the only thing I can suggest is to retrace your steps. To isolate the problem, undo all the changes you've made, one at a time, up until the last time zoneminder worked.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
m_theredhead

Re: Lost ability to view events from the web

Post by m_theredhead »

I checked all of the items you mentioned above and they all looked fine.

I ended up removing the rpm, deleting the zm table and user from mysql and just completely reinstalling. Video is working fine now.

The only thing I can think of is maybe the transition from moving from the posted rpms to the rpm repo had some subtle change that impacted me.

All seems to be working at the moment.
Locked