Page 1 of 2
zm with Slackware 10.2 - help to a HOWTO
Posted: Sat Dec 10, 2005 11:46 pm
by ttsoares
Greetings.
Just had discovered ZM yesterday... Great piece of software !!
But, the tips at
http://www.zoneminder.com/fileadmin/dow ... -notes.doc
are outdated...
I am trying to do a frorm-scratch install of ZM at Slack 10.2.
But there are some issues to get all running fine...
If there is any one here in the mood to share some exp. about those matters - let me know about it.
Posted: Sun Dec 11, 2005 9:13 am
by cordel
I would imagine that it's not quiet that involved any more. The new slack has the 1.6 kernel doesn't it? If so most all the drivers you might need are part of it unless the modules were not selected when the kernel was built.
I have not experience with Slack so I can not be sure what all you need to do step by step.
If you already have slack installed with everything working short of zm I can help.
If you check the Hints and Tips topic you will find a post on the dependencies to build and run zm. Those are a must have to get zm to build.
I think there are still some Slack users here, so they might be able to offer better guidance.
Regards,
Cordel
Re: to cordel
Posted: Sun Dec 11, 2005 2:40 pm
by ttsoares
Slack 10.2 uses kernel 2.4 as a default install, but one could migrate to 2.6 pretaty easelly.
I have almost ZM working now, after 3 hours or work, it is a PIII so, compilations take time to finish...
The xawtv is 100%. I added a cam with Function 'Monitor' but when do a click at the 'Zones' number the window that appears has no image !
The link location of the broken image is
javascript: newWindow( '/zm/index.php?view=zone&mid=1&zid=1', 'zmZone', 360, 500 );
The browser is running at the same sistem with ZM and it is a Mozilla 1.7.11 with javascrip enabled.
The status at the Console is 'Stopped'. Could be this ?
More detais of the problem here
Posted: Sun Dec 11, 2005 5:46 pm
by ttsoares
The zmpkg.log file is full of these messages:
Executing: /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: Permission denied at /usr/local/bin/zmdc.pl line 159.
Executing: /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: Permission denied at /usr/local/bin/zmdc.pl line 159.
Executing: /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: Permission denied at /usr/local/bin/zmdc.pl line 159.
So I run zmc manually "zmc --device /dev/video0" had produced this logs at /var/log/messages:
Dec 11 15:35:12 patrol zmc_dvideo0[20709]: INF [Debug Level = 0, Debug Log = <none>]
Dec 11 15:35:12 patrol kernel: [18235.330946] bttv0: PLL: 28636363 => 35468950 .. ok
Dec 11 15:35:12 patrol zmc_dvideo0[20709]: INF [Starting Capture]
Dec 11 15:35:41 patrol zmc_dvideo0[20711]: INF [Debug Level = 0, Debug Log = <none>]
Dec 11 15:35:41 patrol zmc_dvideo0[20711]: INF [Starting Capture]
Dec 11 15:36:48 patrol zmc_dvideo0[20711]: INF [cam1: 1000 - Capturing at 14.93 fps]
Dec 11 15:37:55 patrol zmc_dvideo0[20711]: INF [cam1: 2000 - Capturing at 14.93 fps]
Dec 11 15:39:06 patrol zmc_dvideo0[20711]: INF [cam1: 3000 - Capturing at 14.08 fps]
Dec 11 15:40:14 patrol zmc_dvideo0[20711]: INF [cam1: 4000 - Capturing at 14.71 fps]
Dec 11 15:41:21 patrol zmc_dvideo0[20711]: INF [cam1: 5000 - Capturing at 14.93 fps]
So i clicked again at the Zone number and the image DO appears !!!
It was a incorrect image but after a "v4lctl -v /dev/video0 setnorm PAL-M" the imagem was fine.
I do not know if this have anything to do with the fact that zmc was runned manually before...
Posted: Sun Dec 11, 2005 5:52 pm
by jameswilson
that sounds like a permisiion error to me, check what accounts your using the run the zm service and any services it needs to start
Permissions issue
Posted: Sun Dec 11, 2005 8:45 pm
by ttsoares
Yes, That comclusion came to me by seeing the logs: a permission problem...
But as I am running averything on the computer as root, a permission problem can only appears as a result of ZM beeing doming some acction as the user 'apache' via su command.
My question is how to know where use the chown and/or chmod commands...
I had run again the zmconfig.pl to activate de debug feature:
Whether to switch additional debugging on (yes|no) [yes] :
What components should have extra debug enabled (string) [_zmc,_zmdc] :
What level of extra debug should be enabled (0|1|2|3|4|5|6|7|8|9) [5] :
Where extra debug is output to (string) [/tmp/zm_debug.log+] :
But that /tmp/zm_debug.log+ never appears any place !
Posted: Sun Dec 11, 2005 9:20 pm
by cordel
make sure that the log files exist in the proper place and if they do not, create them.
you should have:
zmdc.log
zmupdate.log
zmwatch.log
zmaudit.log
zmfilter.log
and should be owned by your apache user. The one in red is most likely the one giving you grief.
Regards,
Cordel
zmcd.log
Posted: Sun Dec 11, 2005 9:43 pm
by ttsoares
I deleted all the /tmp/*.log and started ZM, the zmdc.log is:
Server starting at 05/12/11 19:37:19
'zmc -d /dev/video0' started at 05/12/11 19:37:23
'zmc -d /dev/video0' starting at 05/12/11 19:37:23, pid = 22642
'zmfilter.pl' started at 05/12/11 19:37:24
'zmfilter.pl' starting at 05/12/11 19:37:24, pid = 22644
'zmaudit.pl -d 900 -y' started at 05/12/11 19:37:25
'zmaudit.pl -d 900 -y' starting at 05/12/11 19:37:25, pid = 22646
'zmwatch.pl' started at 05/12/11 19:37:26
'zmwatch.pl' starting at 05/12/11 19:37:26, pid = 22648
'zmupdate.pl -c' started at 05/12/11 19:37:26
'zmupdate.pl -c' starting at 05/12/11 19:37:26, pid = 22650
All logs files, but zmpkg.log are owned by root - zmpkg.log is owned by apache.
None of the 6 log files has any message that could be interpreted as a error or even a warning !!
Still, there is no image by clicking at a number at the Zones column...
# ps x | grep zm
22620 pts/1 S 0:00 /usr/bin/perl -wT /usr/local/bin/zmdc.pl status
22642 pts/1 S 0:24 /usr/local/bin/zmc -d /dev/video0
22644 pts/1 S 0:00 /usr/bin/perl -wT /usr/local/bin/zmfilter.pl
22646 pts/1 S 0:00 /usr/bin/perl -wT /usr/local/bin/zmaudit.pl -d 900 -y
22648 pts/1 S 0:00 /usr/bin/perl -wT /usr/local/bin/zmwatch.pl
22650 pts/1 S 0:00 /usr/bin/perl -w /usr/local/bin/zmupdate.pl -c
Plus: why a click at the link 'Sopped at
"ZoneMinder Console - Stopped - v1.21.4"
do not turn it "Running" - or whatever ?
Posted: Sun Dec 11, 2005 9:56 pm
by cordel
That will still most likely be a permissions issue as the web interface may not be able to get the status of the app. If you start zm from the console as root then it will run and set it's permissions as root and not the web user as it was intended.
So it looks like your down to just sorting the permissions out.
Regards,
Cordel
runninf from xterm as root
Posted: Sun Dec 11, 2005 10:37 pm
by ttsoares
From the begining i am running ZM as root from a xterm.
I even place some alias do help a bit:
alias zm0='/usr/local/bin/zmpkg.pl stop'
alias zm1='/usr/local/bin/zmpkg.pl start'
alias zms='/usr/local/bin/zmpkg.pl status'
More details
Posted: Mon Dec 12, 2005 1:29 am
by ttsoares
After a lot of read, logs search and coffe... the system had reached a point on that all the logs of ZM are clean. No message complaing about anything.
The /var/log/messages is full of normal linhes like this:
Dec 11 23:14:44 patrol zmc_dvideo0[23182]: INF [cam1: 12000 - Capturing at 14.71 fps]
witch is OK.
BUT, the /var/log/apache/error_log tels a different history:
[Sun Dec 11 23:18:41 2005] [error] [client 192.168.200.10] File does not exist: /var/www/htdocs/zm/images/cam1-Zones.jpg
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
So, to solve the zmdc.pl line 167 problem a
chmod a+rw /tmp/*.log && chown apache:apache /tmp/*.log
was enough.
But i do not know how to fiz the zmdc.pl line 159 error:
die( "Can't connect: $!" ) if ($attempts > MAX_CONNECT_DELAY);
Is the related with the fact that the Zones window do not show an image ?
This message at apache's error_log is the result of click at a Zones number:
[Sun Dec 11 23:35:22 2005] [error] [client 192.168.200.10] File does not exist: /var/www/htdocs/zm/images/cam1-Zones.jpg
Posted: Mon Dec 12, 2005 4:05 am
by cordel
Make sure apache can read and write /var/www/htdocs/zm/images/
When you click to edit a zone apache goes out and retrives a current image and writes it to this folder.
Regards,
Cordel
Posted: Mon Dec 12, 2005 11:36 am
by ttsoares
$ su - apache
Password:
apache@patrol:~$ cd /var/www/htdocs/zm/images/
apache@patrol:/var/www/htdocs/zm/images$ touch merda
apache@patrol:/var/www/htdocs/zm/images$ ls
merda
apache@patrol:/var/www/htdocs/zm/images$ rm -rf merda
apache@patrol:/var/www/htdocs/zm/images$ ls
apache@patrol:/var/www/htdocs/zm/images$ logout
Final solution
Posted: Tue Dec 13, 2005 12:53 pm
by ttsoares
I was always running "zmpkg start" as root.
Do not do this at all !!
Running as 'apache' user all is working like a charm.
New step is to write a new version of Slackware HOWTO.
Posted: Tue Dec 13, 2005 1:03 pm
by cordel
Really glad you got it sorted, and look forward to seeing your how to.
Regards,
Corey