Page 1 of 1

problems with service zm start

Posted: Wed Feb 09, 2005 8:45 pm
by gungner
I can get i image with of my USB-cam with camstream. I can start zmc -d 1 and it seams to start, I can see zmc_d [NEW: x000 - Capturing ---] in the log file.

If I try service zm start it takes ages and the log says:

session opened for user apache by (uid=0)
session closed for user apache
with about 10 sec in between and it goes on for about 5 times.

I just can't get it started, what do I need to do?

I've checked all .pl scripts and they got o+rx g+rx u+rwx

please, I want to get it to work.

cheers, tord

Posted: Wed Feb 09, 2005 9:24 pm
by gungner
more to it. Trying to click on monitor name gives an error in /var/log/messages

ZMS ERR [Shared memory not initialiesed by capture daemon]

cheers, tord

Posted: Wed Feb 09, 2005 10:17 pm
by zoneminder
Hi,

Thats not a lot of informaiton to go on, can you tell us what distro etc you are using and whether you see anything in any of the other zm logs.

Phil

Posted: Thu Feb 10, 2005 5:56 am
by gungner
well distro = Mandrake 10.1 OE
After reseting the zm.log file and doing a service zm start I get the following:

"Command: start
Executing: su apache --shell=/bin/sh --command='/usr/local/bin/zmdc.pl check'
Removing shared memory
Executing: su apache --shell=/bin/sh --command='/usr/local/bin/zmfix'
Executing: su apache --shell=/bin/sh --command='/usr/local/bin/zmdc.pl status'
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: No such file or directory at /usr/local/bin/zmdc.pl line 159.
Executing: su apache --shell=/bin/sh --command='/usr/local/bin/zmdc.pl start zmc -d 1'
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: No such file or directory at /usr/local/bin/zmdc.pl line 159.
Executing: su apache --shell=/bin/sh --command='/usr/local/bin/zmdc.pl start zmfilter.pl'
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: No such file or directory at /usr/local/bin/zmdc.pl line 159.
Executing: su apache --shell=/bin/sh --command='/usr/local/bin/zmdc.pl start zmaudit.pl -d 900 -y'
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: No such file or directory at /usr/local/bin/zmdc.pl line 159.
Executing: su apache --shell=/bin/sh --command='/usr/local/bin/zmdc.pl start zmwatch.pl'
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: No such file or directory at /usr/local/bin/zmdc.pl line 159.
Executing: su apache --shell=/bin/sh --command='/usr/local/bin/zmdc.pl start zmupdate.pl -c'
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: No such file or directory at /usr/local/bin/zmdc.pl line 159."

Cheers, tord

Posted: Thu Feb 10, 2005 8:57 am
by gungner
Well, done some more work. I've moved the lof files to a place Apache can write. (also tweeked msec to keep apache with write access). Now I get all six logfiles. This is what zmdc.log says:
Server starting at 05/02/10 09:45:11
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
/proc: Permission denied
'zmc -d 1' started at 05/02/10 09:45:14
'zmc -d 1' starting at 05/02/10 09:45:14, pid = 17658
'zmfilter.pl' started at 05/02/10 09:45:14
'zmfilter.pl' starting at 05/02/10 09:45:14, pid = 17664
'zmaudit.pl -d 900 -y' started at 05/02/10 09:45:15
'zmaudit.pl -d 900 -y' starting at 05/02/10 09:45:15, pid = 17671
'zmwatch.pl' started at 05/02/10 09:45:15
'zmwatch.pl' starting at 05/02/10 09:45:15, pid = 17679
'zmupdate.pl -c' started at 05/02/10 09:45:16
'zmupdate.pl -c' starting at 05/02/10 09:45:16, pid = 17685

It seams there are still access problems.

/Tord

Posted: Thu Feb 10, 2005 9:05 am
by zoneminder
Where did you move the logs to?

I've never seem any messages about /proc and I don't really know why anything would want to be accessing it. However aside from that the rest of the startup seems to be working ok now. What problems do you still have?

Phil

Posted: Thu Feb 10, 2005 9:34 am
by gungner
I did move them to where HTTPD writes them (in mandrakes case). /var/log/httpd/

The problem right now is that I can't get any picture out through the web-page.

/Tord

Posted: Thu Feb 10, 2005 10:02 am
by gungner
More from httpd error.log when trying the view picture.

[client x.x.x.x] PHP Notice: import_request_variables() [<a href='function.import-request-variables'>function.import-request-variables</a>]: No prefix specified - possible security hazard in /var/www/html/hc/zm.php on line 21, referer: http://xxx/hc/index.php?view=watch&mid=1
[Thu Feb 10 10:53:52 2005] [error] [client x.x.x.x] Premature end of script headers: zms, referer: http://xxx/hc/index.php?view=watchfeed& ... &scale=100
Error, unable to authenticate user
[Thu Feb 10 10:54:01 2005] [error] [client x.x.x.x] Premature end of script headers: zms

Error: /proc must be mounted
To mount /proc at boot you need an /etc/fstab line like:
/proc /proc proc defaults
In the meantime, mount /proc /proc -t proc

Strange, /PROC is already there, why?

/tord

Posted: Thu Feb 10, 2005 11:20 am
by gungner
it's getting better. I had authentication on and in plain text, but the string passed to CGI was with hashed. Turning auth off I can get still pictures now, but not streamed? Every access to zm generates a few lines in httpd-error.log. What more can I do?

What the link to the stream-picture looks like: http://xxx/cgi-bin/zms?mode=jpeg&monito ... 0&maxfps=5

Trying to access directly in firefox gives
The image “http://xxx/cgi-bin/zms?mode=jpeg&monito ... 0&maxfps=5” cannot be displayed, because it contains errors.

cheers, tord

Posted: Thu Feb 10, 2005 4:48 pm
by gungner
NOW IT WORKS, after some restarting I could even get it to work with user/passwd!!

WHAT A GREAT APPLICATION; IT ROCKS!!!!!!

Only problem still is that it fills up the httpd-error.log with

[client 192.168.1.20] PHP Notice: import_request_variables() [<a href='function.import-request-variables'>function.import-request-variables</a>]: No prefix specified - possible security hazard in /var/www/html/hc/zm.php on line 21

Maybe there is a solution for it, please

Thanks, tord

Posted: Fri Feb 11, 2005 4:49 pm
by zoneminder
If you go into zm.php you will see the following lines

Code: Select all

import_request_variables( "GPC" );
error_reporting (E_ALL ^ E_NOTICE);
You could try swapping the order of them.

Phil

Posted: Sat Feb 12, 2005 7:08 pm
by gungner
Hi,

japp, swaping the lines did the trick, no more error. Only error remaining is

"To mount /proc at boot yo uneed an /etc/fstab line......"

I don't know what that could be since I do have a /proc. The error only comes when I doo a refresh on the main window.

Thanks again! /tord

Posted: Mon Feb 14, 2005 9:58 am
by zoneminder
I have absolutely no idea what the /proc message relates to, and I've never seen it before. I wonder if it relates to the 'uptime' call that the main window uses.

If you type 'uptime' on a terminal window do you get the same error?

Phil

Posted: Mon Feb 14, 2005 7:19 pm
by gungner
no, no problems with uptime. One thing though, top right corner of index.php shows in my case " Load: / Disk 73%", should it show something behind Load?
Could that have any connection?

cheers, tord