problems with service zm start

Support and queries relating to all previous versions of ZoneMinder
Post Reply
gungner
Posts: 35
Joined: Tue Feb 08, 2005 8:24 pm

problems with service zm start

Post by gungner » Wed Feb 09, 2005 8:45 pm

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

gungner
Posts: 35
Joined: Tue Feb 08, 2005 8:24 pm

Post by gungner » Wed Feb 09, 2005 9:24 pm

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

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Wed Feb 09, 2005 10:17 pm

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

gungner
Posts: 35
Joined: Tue Feb 08, 2005 8:24 pm

Post by gungner » Thu Feb 10, 2005 5:56 am

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

gungner
Posts: 35
Joined: Tue Feb 08, 2005 8:24 pm

Post by gungner » Thu Feb 10, 2005 8:57 am

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

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Thu Feb 10, 2005 9:05 am

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

gungner
Posts: 35
Joined: Tue Feb 08, 2005 8:24 pm

Post by gungner » Thu Feb 10, 2005 9:34 am

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

gungner
Posts: 35
Joined: Tue Feb 08, 2005 8:24 pm

Post by gungner » Thu Feb 10, 2005 10:02 am

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

gungner
Posts: 35
Joined: Tue Feb 08, 2005 8:24 pm

Post by gungner » Thu Feb 10, 2005 11:20 am

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

gungner
Posts: 35
Joined: Tue Feb 08, 2005 8:24 pm

Post by gungner » Thu Feb 10, 2005 4:48 pm

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

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Fri Feb 11, 2005 4:49 pm

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

gungner
Posts: 35
Joined: Tue Feb 08, 2005 8:24 pm

Post by gungner » Sat Feb 12, 2005 7:08 pm

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

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Mon Feb 14, 2005 9:58 am

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

gungner
Posts: 35
Joined: Tue Feb 08, 2005 8:24 pm

Post by gungner » Mon Feb 14, 2005 7:19 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests