Ubuntu 9.04 / ZM 1.24.1 - Apache Randomly Stops
Ubuntu 9.04 / ZM 1.24.1 - Apache Randomly Stops
I have a computer running Ubuntu Server 9.04 with ZoneMinder 1.24.1. The system works great, but for some reason apache2 just stops running at random.
I can log in to the system and restart apache via SSH and everything works great again, but I shouldn't have to do that everyday... Is this a bug or is this just a problem with my machine? Is there any way to fix this?
I can log in to the system and restart apache via SSH and everything works great again, but I shouldn't have to do that everyday... Is this a bug or is this just a problem with my machine? Is there any way to fix this?
I get a similar issue with ubuntu 9.04 and ZM 1.24.1. Seems a restart of apache sorts it. Will check the logs in the meantime.
Reesmarine - Free photo classifieds for boats for sale. www.reesmarine.com
[Sun Jun 14 06:40:21 2009] [error] [client 192.168.1.71] array (\n 0 => \n array (\n 'file' => '/usr/share/zoneminder/ajax/stream.php',\n 'line' => 51,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto( /tmp/zms-004587s.sock ) failed: No such file or directory',\n ),\n ),\n 1 => \n array (\n 'file' => '/usr/share/zoneminder/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/usr/share/zoneminder/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.71/zm/?view=montage&group=0
The error message I see A LOT of in error.log
Have you read this?
http://www.zoneminder.com/forums/viewtopic.php?p=51045
http://www.zoneminder.com/forums/viewtopic.php?p=51045
Lets say I watch the feed for two hours, and apache restarts every hour. Would this not cause an interruption in the video feed I'm viewing?Flasheart wrote:Whilst not a solution, if the solution can't be easily found, crontab periodic restarts of apache. Allows you to live with the problem until you can fix it
- henriquejf
- Posts: 77
- Joined: Tue Feb 10, 2009 12:01 pm
- Location: Brazil
suggested workaround: restart your browser , not apache
i have experienced that a lot; if you feel youre able to reproduce it, i think there are some 4 or 5 threads that report different causes but i think it reproduces similar problems...
apache hanging problems - related, duplicated (or not) topics
==============================================================
** Maxopenfile reached & machine hangs zm problem ?
http://www.zoneminder.com/forums/viewtopic.php?t=13486
** apache not responding
http://www.zoneminder.com/forums/viewtopic.php?t=13322
** Apache instances/responsiveness issue...solved(?)
http://www.zoneminder.com/forums/viewto ... c&start=15
** Zoneminder UNSTABLE & HANGS, needs frequent restarting
http://www.zoneminder.com/forums/viewto ... 1196#51196
** hundreds of httpd processes
http://www.zoneminder.com/forums/viewtopic.php?t=13588
for me, the key to reproduce that was to be on the "wan side" of the network (higher ping); its more difficult to reproduce on the lan side; also, it may be a problem of the browser and not zm itself;
i have tried and did reproduce my case on those threads i have pointed; i hope it may help the community experts, they are already aware of that, made many corrections into the subversion, but i still get it; i think its close to an end;
Also, id like to mention that opera doesnt hang my apache, but the streams by the lan side are a little ugglier; on the lan side, i have adopted opera and its 100% fine;
hope it helps
i have experienced that a lot; if you feel youre able to reproduce it, i think there are some 4 or 5 threads that report different causes but i think it reproduces similar problems...
apache hanging problems - related, duplicated (or not) topics
==============================================================
** Maxopenfile reached & machine hangs zm problem ?
http://www.zoneminder.com/forums/viewtopic.php?t=13486
** apache not responding
http://www.zoneminder.com/forums/viewtopic.php?t=13322
** Apache instances/responsiveness issue...solved(?)
http://www.zoneminder.com/forums/viewto ... c&start=15
** Zoneminder UNSTABLE & HANGS, needs frequent restarting
http://www.zoneminder.com/forums/viewto ... 1196#51196
** hundreds of httpd processes
http://www.zoneminder.com/forums/viewtopic.php?t=13588
for me, the key to reproduce that was to be on the "wan side" of the network (higher ping); its more difficult to reproduce on the lan side; also, it may be a problem of the browser and not zm itself;
i have tried and did reproduce my case on those threads i have pointed; i hope it may help the community experts, they are already aware of that, made many corrections into the subversion, but i still get it; i think its close to an end;
Also, id like to mention that opera doesnt hang my apache, but the streams by the lan side are a little ugglier; on the lan side, i have adopted opera and its 100% fine;
hope it helps
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
m3bik: Did you ever resolve this?
I am having the same issue. I am also running the same setup, Ubuntu 9.04 with ZM 1.24.1.
This just happened a couple hours ago. I will paste the last few lines of the /var/log/apache2/error.log file below. The last line shows me manually restarting apache.
In the log below, 192.168.1.125 was the computer running the browser.
192.168.1.100 is my ZM server.
[Sat Jun 20 17:31:25 2009] [error] [client 192.168.1.125] socket_sendto( /tmp/zms-927015s.sock ) failed: No such file or directory, referer: http://192.168.1.100/zm/?view=montage&group=0
[Sat Jun 20 17:31:25 2009] [error] [client 192.168.1.125] array (\n 0 => \n array (\n 'file' => '/usr/share/zoneminder/ajax/stream.php',\n 'line' => 51,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto( /tmp/zms-927015s.sock ) failed: No such file or directory',\n ),\n ),\n 1 => \n array (\n 'file' => '/usr/share/zoneminder/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/usr/share/zoneminder/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.100/zm/?view=montage&group=0
[Sat Jun 20 17:37:20 2009] [notice] caught SIGTERM, shutting down
[Sat Jun 20 17:37:21 2009] [notice] Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch configured -- resuming normal operations
I am having the same issue. I am also running the same setup, Ubuntu 9.04 with ZM 1.24.1.
This just happened a couple hours ago. I will paste the last few lines of the /var/log/apache2/error.log file below. The last line shows me manually restarting apache.
In the log below, 192.168.1.125 was the computer running the browser.
192.168.1.100 is my ZM server.
[Sat Jun 20 17:31:25 2009] [error] [client 192.168.1.125] socket_sendto( /tmp/zms-927015s.sock ) failed: No such file or directory, referer: http://192.168.1.100/zm/?view=montage&group=0
[Sat Jun 20 17:31:25 2009] [error] [client 192.168.1.125] array (\n 0 => \n array (\n 'file' => '/usr/share/zoneminder/ajax/stream.php',\n 'line' => 51,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto( /tmp/zms-927015s.sock ) failed: No such file or directory',\n ),\n ),\n 1 => \n array (\n 'file' => '/usr/share/zoneminder/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/usr/share/zoneminder/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.100/zm/?view=montage&group=0
[Sat Jun 20 17:37:20 2009] [notice] caught SIGTERM, shutting down
[Sat Jun 20 17:37:21 2009] [notice] Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch configured -- resuming normal operations
-
- Posts: 15
- Joined: Wed Jun 17, 2009 12:53 am
-
- Posts: 4
- Joined: Tue Apr 21, 2009 7:46 pm
Hello everyone, I'm having the same problem. Probe amend stream.php without positive results.
Also edit the Apache configuration
MaxKeepAliveRequests 100 -----> 500
KeepAliveRequests 15 ---------> 5
This is merely drives the apache connections reach the top faster.
Someone comes up with something else?
Thanks
Also edit the Apache configuration
MaxKeepAliveRequests 100 -----> 500
KeepAliveRequests 15 ---------> 5
This is merely drives the apache connections reach the top faster.
Someone comes up with something else?
Thanks
I temporary resolve problem:
Crontab
/etc/cron.t/check.sh
My system
Crontab
Code: Select all
*/1 * * * * root bash /etc/cron.t/check.sh >& /dev/null
Code: Select all
#!/bin/bash
T=`tail /var/log/httpd/access_log |grep "GET /index.php HTTP/1.1\" 200 0"|tail -n 1`
if [ "${T}" != "" ]; then
sh /etc/init.d/httpd reload
# date >>/var/log/httpd/restart_log
echo "PHP: `date`">>/var/log/httpd/restart_log
exit
fi
T=`tail -n 1 /var/log/httpd/error_log |grep "Timeout waiting for output from CGI script /var/www/cgi-bin/nph-zms"`
if [ "${T}" != "" ]; then
sh /etc/init.d/httpd reload
# date >>/var/log/httpd/restart_log
echo "CGI: `date`">>/var/log/httpd/restart_log
exit
fi
Code: Select all
Fedora 11 (AMD X2 64 6000+ /4G/ 500G Sata )
PHP 4.4.9 (down it :( ) (test 5.2.10/5.3 )
Apache/2.2.13 (Unix) DAV/2 PHP/4.4.9 mod_ssl/2.2.13 OpenSSL/0.9.8k-fips mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.0 configured
Mysql 5.x.17 (ICC build static)
+ jpegsrc-6b-x86simd-1.02.tar.bz2
(only 32 bit)
FWIW, I had the exact same problem (on Suse), and "aa-complain *" made the vanishing socket problem vanish.
Since the box doesn't run any non-ZM processes and isn't publicly accessible, I don't really care if it's running SELinux (in fact, I'd prefer that it not, since any overhead is wasted).
Terry
Since the box doesn't run any non-ZM processes and isn't publicly accessible, I don't really care if it's running SELinux (in fact, I'd prefer that it not, since any overhead is wasted).
Terry