ajax errors?

Forum for questions and support relating to the 1.24.x releases only.
c0mputerking
Posts: 190
Joined: Tue Sep 16, 2008 5:22 am

ajax errors?

Post by c0mputerking »

Hello all i am still experiencing problems with apache giving errors like below. This is using 1.24.1 ZMLarch live CD installed on my hard drive with a blue cherry pv-something dvr card and 4 analog and one ip based cameras.

Code: Select all

Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8j DAV/2 Server at 1.surveillanceking.net Port 80
ALSO i cannot login via SSH after experiencing this error, this is very bad as i cannot reset apache remotely and must drive across town to reboot the machine.

I thought i had it fixed by changing line 61 in the stream.php file as in this post.

Code: Select all

http://www.zoneminder.com/forums/viewtopic.php?t=13322
This did make things much better (used to hang each night) however i still get the above mentioned error about once every 3 days on this machine

I get a bunch of these in the logs about ajax errors when i open up a montage screen. Have experimented with a number of browser but the all give the same errors and some cameras still seem to freeze up after a time on montage screen. My coding skill are very weak i took a look at the stream.php file and it is way over my head.

Code: Select all

==> /var/log/httpd/access_log <68> /var/log/messages.log <Mar> 
Mar 27 14:18:07 cedars array (
Mar 27 14:18:07 cedars 'file' => '/var/lib/zm/www/ajax/stream.php',
Mar 27 14:18:07 cedars 'line' => 51,
Mar 27 14:18:07 cedars 'function' => 'ajaxError',
Mar 27 14:18:07 cedars 'args' => 
Mar 27 14:18:07 cedars array (
Mar 27 14:18:07 cedars 0 => 'socket_sendto( /var/lib/zm/socks/zms-767036s.sock ) failed: Connection refused',
Mar 27 14:18:07 cedars ),
Mar 27 14:18:07 cedars ),
Mar 27 14:18:07 cedars 1 => 
Mar 27 14:18:07 cedars array (
Mar 27 14:18:07 cedars 'file' => '/var/lib/zm/www/index.php',
Mar 27 14:18:07 cedars 'line' => 116,
Mar 27 14:18:07 cedars 'args' => 
Mar 27 14:18:07 cedars array (
Mar 27 14:18:07 cedars 0 => '/var/lib/zm/www/ajax/stream.php',
Mar 27 14:18:07 cedars ),
Mar 27 14:18:07 cedars 'function' => 'require_once',
Mar 27 14:18:07 cedars ),
Mar 27 14:18:07 cedars )
Mar 27 14:18:07 cedars httpd: socket_sendto( /var/lib/zm/socks/zms-849362s.sock ) failed: Connection refused
Mar 27 14:18:07 cedars httpd: array (
Mar 27 14:18:07 cedars 0 => 
Mar 27 14:18:07 cedars array (
Mar 27 14:18:07 cedars 'file' => '/var/lib/zm/www/ajax/stream.php',
Mar 27 14:18:07 cedars 'line' => 51,
Mar 27 14:18:07 cedars 'function' => 'ajaxError',
Mar 27 14:18:07 cedars 'args' => 
Mar 27 14:18:07 cedars array (
Mar 27 14:18:07 cedars 0 => 'socket_sendto( /var/lib/zm/socks/zms-849362s.sock ) failed: Connection refused',
Mar 27 14:18:07 cedars ),
Mar 27 14:18:07 cedars ),
Mar 27 14:18:07 cedars 1 => 
Mar 27 14:18:07 cedars array (
Mar 27 14:18:07 cedars 'file' => '/var/lib/zm/www/index.php',
Mar 27 14:18:07 cedars 'line' => 116,
Mar 27 14:18:07 cedars 'args' => 
Mar 27 14:18:07 cedars array (
Mar 27 14:18:07 cedars 0 => '/var/lib/zm/www/ajax/stream.php',
Mar 27 14:18:07 cedars ),
Mar 27 14:18:07 cedars 'function' => 'require_once',
Mar 27 14:18:07 cedars ),
Mar 27 14:18:07 cedars )

==> /var/log/httpd/access_log <==
68.144.18.110 - - [27/Mar/2009:14:18:07 -0600] "POST /index.php HTTP/1.1" 200 109
68.144.18.110 - - [27/Mar/2009:14:18:07 -0600] "POST /index.php HTTP/1.1" 200 109
^C
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Have experimented with a number of browser but the all give the same errors and some cameras still seem to freeze up after a time on montage screen
Have you tried Opera? I don't get the errors here with it. If not would you mind trying it and see if it helps.
c0mputerking
Posts: 190
Joined: Tue Sep 16, 2008 5:22 am

Post by c0mputerking »

Dude my clients don't run Opera I really feel like abandoning ship right now. l know zm is open source and i have not paid anything other than optional donations which is the way it should be.

Seriously i have spent so much time and money (hardware) on this project and i am never willing to give up, but if it doesn't work with firefox ie or seamonkey what the hell.

Do you know the looks i get when i install seamonkey? like is this guy crazy does he know what he is doing? how much did it cost to fix our computer the last time the it guy installed something open source on it.

Think of it like this i have this great product it is so wonderful and reliable it can be used for security to monitor your home, but, but, but, and to top it all off now i have to use opera? while we are grasping at straws why not chrome it beta totally unreliable too.

I sorry this is just Friday night rant. I love zoneminder it almost works great.

THANK YOU RDMELIN thank you all, this is a great community and i really really appreciate, and understand all the time and effort put forth

I will try again tomorrow starting with Opera
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

Sorry I can't help, but do stick with it. I've had ZM running fine on three servers, the oldest for two and a half years. Never encountered this problem on any of them. That said, I don't use zm streaming. All my cams are ip, so I stream those directly. Doesn't help you much.
c0mputerking
Posts: 190
Joined: Tue Sep 16, 2008 5:22 am

Post by c0mputerking »

Same error with Opera I also tried changing the line in stream.php to the original one without the <1> /var/log/messages.log <Mar>
Mar 28 01:47:54 cedars array (
Mar 28 01:47:54 cedars 'file' => '/var/lib/zm/www/ajax/stream.php',
Mar 28 01:47:54 cedars 'line' => 51,
Mar 28 01:47:54 cedars 'function' => 'ajaxError',
Mar 28 01:47:54 cedars 'args' =>
Mar 28 01:47:54 cedars array (
Mar 28 01:47:54 cedars 0 => 'socket_sendto( /var/lib/zm/socks/zms-568199s.sock ) failed: No such file or directory',
Mar 28 01:47:54 cedars ),
Mar 28 01:47:54 cedars ),
Mar 28 01:47:54 cedars 1 =>
Mar 28 01:47:54 cedars array (
Mar 28 01:47:54 cedars 'file' => '/var/lib/zm/www/index.php',
Mar 28 01:47:54 cedars 'line' => 116,
Mar 28 01:47:54 cedars 'args' =>
Mar 28 01:47:54 cedars array (
Mar 28 01:47:54 cedars 0 => '/var/lib/zm/www/ajax/stream.php',
Mar 28 01:47:54 cedars ),
Mar 28 01:47:54 cedars 'function' => 'require_once',
Mar 28 01:47:54 cedars ),
Mar 28 01:47:54 cedars )

==> /var/log/httpd/access_log <==
192.168.1.149 - - [28/Mar/2009:01:47:54 -0600] "POST /index.php HTTP/1.1" 200 116
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

Theres no way an ajax error or anything with apache would also affect ssh, so I suspect something else is going on. Make sure your network interface is not in half duplex mode (/sbin/mii-tool), also check the output near the bottom of "dmesg" and see if there are any errors as soon as you log back in.
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

c0mputerking, I didn't notice if you specified if you were streaming mpeg (swf) in any of the threads about this issue, but I'm guessing that you are, since I only see these errors here streaming mpeg. Can you switch to mjpeg streaming until these issues get resolved?

I don't want this problem to be ignored. I reported the ajax errors repeatedly during the beta period leading up to 1.24.0. They need to be fixed. But if mjpeg will work for you in the mean time maybe we can see if the apache 403 error, and the ssh problem is being caused by the ajax error or is unrelated. ( Sorry Blazer, you're probably right, but as unlikely as it seems, I can't discount that these errors might be related. I would like to get a look at all the logs when the network functions are hung up.)
c0mputerking
Posts: 190
Joined: Tue Sep 16, 2008 5:22 am

Post by c0mputerking »

It is not really an ssh error per say, sorry to confuse matters it just freezes the whole box and i have to manually reset it and it lives across town. Ok i have tried switching to mpeg but my browser now asks for a plugin? and i cannot seem to install it? tested on my main machine a mac and also on a windows box. I feel like a fool but where/why do i get the required plugin seem to think it is a windows media player file. I have windows media player install on Windows machine but it still will not play mpeg stream? windows media play has never been cool on my MAC.
c0mputerking
Posts: 190
Joined: Tue Sep 16, 2008 5:22 am

Post by c0mputerking »

Ok it tried to mpeg stream with Opera it does not ask for the plugin but i get some errors i am pretty sure i have seen listed somewhere else on these forums. Call me lazy but i am going to post them again here maybe we should call this thread making zoneminder 1.24.1 actually work/ or usable something like that heehee. oh ya it pretty much freezes opera and will not stream might update still every 20 seconds but mostly not even that.

Code: Select all

==> /var/log/httpd/access_log <192> /var/log/zm/zm_debug.log <==
03/16/09 23:32:31.351063 zmfix[18558].INF-zm_debug.c/292 [New Debug Level = 0, New Debug Log = /var/log/zm/zm_debug.log]
03/16/09 23:32:31.352474 zmfix[18558].ERR-zmfix.cpp/40 [Can't stat : No such file or directory]

==> /var/log/messages.log <==
Mar 28 15:38:35 1 zms[4974]: INF [Debug Level = 0, Debug Log = <none>]
Mar 28 15:38:35 1 zms[4974]: INF [Authenticated user 'customer1']
Mar 28 15:38:35 1 zms[4976]: INF [Debug Level = 0, Debug Log = <none>]
Mar 28 15:38:35 1 zms[4976]: INF [Authenticated user 'customer1']

==> /var/log/httpd/error_log <Sat> /var/log/httpd/access_log <192> /var/log/messages.log <Mar> /var/log/httpd/access_log <==
192.168.1.1 - - [28/Mar/2009:15:38:34 -0600] "GET /cgi-zm/nph-zms?mode=mpeg&monitor=2&scale=100&bitrate=25000&maxfps=5&format=asf&buffer=1000&auth=d82e2d788b4284cebf9b28e96410fe57&connkey=773265&rand=1238276314 HTTP/1.1" 200 -
192.168.1.1 - - [28/Mar/2009:15:38:47 -0600] "POST /index.php HTTP/1.1" 200 169


User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Just help me make sure I understand correctly. You were using mjpeg streaming before when posting the ajax errors? This surprises me, I assumed you were using mpeg.

If you are now trying mpeg streaming for the first time, try changing from asf to swf. Most browsers have flash plugin installed already. However be aware that mpeg streaming has shown itself prone to fall behind realtime, an increasing lag between "live" view and what is displayed. I have set cache to 0 in flash player settings to mitigate this (right click in the stream view) but haven't really stress tested. I never leave a stream (or montage) view open when I'm away from the computer.
newvisionantenna
Posts: 381
Joined: Sat Jan 17, 2009 7:49 pm
Location: Germany

Post by newvisionantenna »

Did you end up going back to the older build of ffmpeg on your live cd? Last time I checked the newer builds didn't allow mpeg streaming to work when selected, that's why I went back a build or two.

I've now switched options and going to see how long mpeg streaming last's on my VPS machine. I'm using IE7 so I'll see how it works out, so far so good. If I try and use firefox it asks for a plugin but I don't have time to mess with that right now.

nevermind, sounds like you guys are talking about something else. This comment probably belongs in the apache freezing section. So far 20 minutes none stop with mpeg option selected in zoneminder.
Last edited by newvisionantenna on Sat Mar 28, 2009 10:50 pm, edited 1 time in total.
c0mputerking
Posts: 190
Joined: Tue Sep 16, 2008 5:22 am

Post by c0mputerking »

rdmelin wrote:Just help me make sure I understand correctly. You were using mjpeg streaming before when posting the ajax errors? This surprises me, I assumed you were using mpeg.

If you are now trying mpeg streaming for the first time, try changing from asf to swf. Most browsers have flash plugin installed already. However be aware that mpeg streaming has shown itself prone to fall behind realtime, an increasing lag between "live" view and what is displayed. I have set cache to 0 in flash player settings to mitigate this (right click in the stream view) but haven't really stress tested. I never leave a stream (or montage) view open when I'm away from the computer.
Yes i was using mjpeg that is the default and i had browser detections set to auto. I have tried the swf setting and it helps but is still get the same java error. Does not seem to be related to mjpeg or mpeg setting.
c0mputerking
Posts: 190
Joined: Tue Sep 16, 2008 5:22 am

Post by c0mputerking »

I have switched back to mjpeg and things seem to work better still just as broken but better than mpeg. Also sometimes i get a Could not connect to database: Too many connections error not often and it useally goes away on its own but maybe somehow related?
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

sometimes i get a Could not connect to database: Too many connections error not often and it useally goes away on its own but maybe somehow related?
I think it is likely related. From another thread:
[Mon Mar 16 15:08:45 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Mon Mar 16 15:24:57 2009] [warn] child process 13647 still did not exit, sending a SIGTERM
[Mon Mar 16 15:24:57 2009] [warn] child process 13648 still did not exit, sending a SIGTERM

....SNIP ALOT OF THESE....
See this article about the relationship between apache proccesses and mysql connections.
http://www.faqts.com/knowledge_base/vie ... 230/fid/13

If you would try setting MaxRequestsPerChild in /etc/httpd/conf/httpd.conf to something modest like 100. It is not set now so defaults to 1000

And in /etc/my.cnf set "wait_timeout = 30"
These are just guesses for values.
Won't fix the zoneminder errors but hopefully will prevent then from bringing down the system.
c0mputerking
Posts: 190
Joined: Tue Sep 16, 2008 5:22 am

Post by c0mputerking »

bt just to let you know i have not been able to get this work correctly yet and still get errors. Could be a memory issue if I turn down res to 320 X 240 it takes alot longer to get errors and i get alot less too.
Locked