Page 1 of 1

Posted: Tue Feb 14, 2006 8:36 pm
by sitxu
thank you cordel, I already solved that problem bu now I dont have any image, zmc -d /dev/video0 does not show any error.

02/14/2006 15:58:50.406091 zmaudit_d900_y[7117].DBG [Found filesystem monitor '2']
02/14/2006 15:58:50.406619 zmaudit_d900_y[7117].DBG [Got 0 events]
02/14/2006 16:13:50.414917 zmaudit_d900_y[7117].DBG [Found database monitor '2']
02/14/2006 16:13:50.416434 zmaudit_d900_y[7117].DBG [Got 0 events]
02/14/2006 16:13:50.417369 zmaudit_d900_y[7117].DBG [Found filesystem monitor '2']
02/14/2006 16:13:50.417902 zmaudit_d900_y[7117].DBG [Got 0 events]
02/14/2006 16:32:06.831571 zmaudit_d900_y[2411].DBG [Found database monitor '2']
02/14/2006 16:32:06.913771 zmaudit_d900_y[2411].DBG [Got 0 events]
02/14/2006 16:32:06.925940 zmaudit_d900_y[2411].DBG [Found filesystem monitor '2']
02/14/2006 16:32:06.932681 zmaudit_d900_y[2411].DBG [Got 0 events]'zma -m 2' starting at 06/02/14 16:31:59, pid = 2382
'zma -m 2' crashed at 06/02/14 16:31:59, exit status 255
Can't select: No child processes at /usr/lib/zm/bin/zmdc.pl line 593.
Server starting at 06/02/14 16:32:00
'zmfilter.pl' started at 06/02/14 16:32:03
'zmfilter.pl' starting at 06/02/14 16:32:03, pid = 2406
'zmaudit.pl -d 900 -y' started at 06/02/14 16:32:05
'zmaudit.pl -d 900 -y' starting at 06/02/14 16:32:05, pid = 2411
'zmwatch.pl' started at 06/02/14 16:32:06
'zmwatch.pl' starting at 06/02/14 16:32:06, pid = 2418

Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Watchdog starting at 06/02/14 16:32:09
Watchdog pausing for 30 seconds

those are the logs

Posted: Tue Feb 14, 2006 8:41 pm
by cordel
Okay, Whay Distro are you using?
What have you got (ie Ip cams , what video card, etc...)
On what kind of system?

What do you see in the logs (zmdc.log, zmpkg.log, zmwatch.log, messages/syslog, apaches error_log)?

What do you get when you run:
dmesg |grep bttv
????

What do you have configured in ZoneMinder?

Regards,
Corey

Posted: Tue Feb 14, 2006 8:59 pm
by sitxu
system Os Centos4.2
ZM intalled by rpm (in 2004 I compiled the whole thing and worked like a charm) usin a webcam:
[root@mirror bin]# ./zmu -d /dev/video0 -q -v -U admin -P 123x
Video Capabilities
Name: OV511+ USB Camera
Type: 513
Can capture
Can capture subareas of the image
Video Channels: 1
Audio Channels: 0
Maximum Width: 640
Maximum Height: 480
Minimum Width: 64
Minimum Height: 48
Window Attributes
X Offset: 0
Y Offset: 0
Width: 640
Height: 480
Picture Attributes
Palette: 10 - YUV420
Colour Depth: 12
Brightness: 16384
Hue: 32768
Colour :49152
Contrast: 22016
Whiteness: 26880
Channel 0 Attributes
Name: Camera
Channel: 0
Flags: 0
Type: 2 - Camera
Format: 0 - PAL

video source /dev/video0
channel 0
format 0

none of the palettes nor the device format has work so far
[root@mirror bin]# tail -f /var/log/httpd/error_log
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Can't open log file: Permission denied at /usr/lib/zm/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/lib/zm/bin/zmdc.pl line 159.
Error, unable to authenticate user
[Tue Feb 14 17:04:03 2006] [error] [client 192.168.166.17] Premature end of script headers: zms, referer: http://mirror.uft.edu.ve/zm/index.php?v ... 0&control=
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user

well i think i wil be installing from source in a while, if it doesnt work.

Posted: Tue Feb 14, 2006 9:08 pm
by cordel
Check and make sure the logs have permisions set so the web user can rw to them. ZM will not start if it can not.

Corey

Posted: Tue Feb 14, 2006 9:22 pm
by sitxu
done, same problem

[root@mirror log]# tail httpd/error_log
Can't open log file: Permission denied at /usr/lib/zm/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/lib/zm/bin/zmdc.pl line 159.
Can't open log file: Permission denied at /usr/lib/zm/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/lib/zm/bin/zmdc.pl line 159.
Error, unable to authenticate user
[Tue Feb 14 17:20:02 2006] [error] [client 192.168.166.17] Premature end of script headers: zms, referer: http://mirror.uft.edu.ve/zm/index.php?v ... 0&control=
Error, unable to authenticate user
[Tue Feb 14 17:20:56 2006] [error] [client 192.168.166.17] Premature end of script headers: zms, referer: http://mirror.uft.edu.ve/zm/index.php?v ... 0&control=
Error, unable to authenticate user
Error, unable to authenticate user
[root@mirror log]# tail -f httpd/error_log
Error, unable to authenticate user
[Tue Feb 14 17:20:02 2006] [error] [client 192.168.166.17] Premature end of script headers: zms, referer: http://mirror.uft.edu.ve/zm/index.php?v ... 0&control=
Error, unable to authenticate user
[Tue Feb 14 17:20:56 2006] [error] [client 192.168.166.17] Premature end of script headers: zms, referer: http://mirror.uft.edu.ve/zm/index.php?v ... 0&control=
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
[Tue Feb 14 17:22:29 2006] [error] [client 192.168.166.17] Premature end of script headers: zms, referer: http://mirror.uft.edu.ve/zm/index.php?v ... 0&control=
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user
Error, unable to authenticate user

[root@mirror log]# tail -f zm/zm
zmaudit.log zmdc.log zmfilter.log zmpkg.log zmupdate.log zmwatch.log
[root@mirror log]# tail -f zm/zmaudit.log
02/14/2006 17:02:07.040709 zmaudit_d900_y[2411].DBG [Found filesystem monitor '2']
02/14/2006 17:02:07.041220 zmaudit_d900_y[2411].DBG [Got 0 events]
02/14/2006 17:17:07.048537 zmaudit_d900_y[2411].DBG [Found database monitor '2']
02/14/2006 17:17:07.050009 zmaudit_d900_y[2411].DBG [Got 0 events]
02/14/2006 17:17:07.050870 zmaudit_d900_y[2411].DBG [Found filesystem monitor '2']
02/14/2006 17:17:07.051387 zmaudit_d900_y[2411].DBG [Got 0 events]
02/14/2006 17:21:57.694387 zmaudit_d900_y[4112].DBG [Found database monitor '2']
02/14/2006 17:21:57.696379 zmaudit_d900_y[4112].DBG [Got 0 events]
02/14/2006 17:21:57.697593 zmaudit_d900_y[4112].DBG [Found filesystem monitor '2']
02/14/2006 17:21:57.698180 zmaudit_d900_y[4112].DBG [Got 0 events]

[root@mirror log]# tail -f zm/zm
zmaudit.log zmdc.log zmfilter.log zmpkg.log zmupdate.log zmwatch.log
[root@mirror log]# tail -f zm/zmdc.log
'zma -m 2' crashed at 06/02/14 17:21:50, exit status 255
'zmc -d /dev/video0' crashed at 06/02/14 17:21:51, exit status 255
Can't select: No child processes at /usr/lib/zm/bin/zmdc.pl line 593.
Server starting at 06/02/14 17:21:51
'zmfilter.pl' started at 06/02/14 17:21:54
'zmfilter.pl' starting at 06/02/14 17:21:54, pid = 4107
'zmaudit.pl -d 900 -y' starting at 06/02/14 17:21:56, pid = 4112
'zmaudit.pl -d 900 -y' started at 06/02/14 17:21:56
'zmwatch.pl' started at 06/02/14 17:21:58
'zmwatch.pl' starting at 06/02/14 17:21:58, pid = 4119

[root@mirror log]# tail -f zm/zm
zmaudit.log zmdc.log zmfilter.log zmpkg.log zmupdate.log zmwatch.log
[root@mirror log]# tail -f zm/zmfilter.log
02/13/2006 18:51:30.340655 zmfilter[23599].INF [Scanning for events]
02/14/2006 10:25:54.701540 zmfilter[24730].INF [Scanning for events]
02/14/2006 10:34:44.349446 zmfilter[24972].INF [Scanning for events]
02/14/2006 15:09:20.537311 zmfilter[6242].INF [Scanning for events]
02/14/2006 15:11:43.919830 zmfilter[6642].INF [Scanning for events]
02/14/2006 15:28:50.516786 zmfilter[7112].INF [Scanning for events]
02/14/2006 16:32:06.836004 zmfilter[2406].INF [Scanning for events]
02/14/2006 17:21:58.110829 zmfilter[4107].INF [Scanning for events]

[root@mirror log]# tail -f zm/zm
zmaudit.log zmdc.log zmfilter.log zmpkg.log zmupdate.log zmwatch.log
[root@mirror log]# tail -f zm/zmwatch.log
Watchdog pausing for 30 seconds
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory
Can't get shared memory id '2053971970': No such file or directory

[root@mirror log]# tail -f messages
Feb 14 17:21:56 mirror su(pam_unix)[4113]: session opened for user asterisk by (uid=0)
Feb 14 17:21:58 mirror su(pam_unix)[4113]: session closed for user asterisk
Feb 14 17:22:29 mirror zms[4130]: ERR [Unable to authenticate user]
Feb 14 17:25:01 mirror crond(pam_unix)[4207]: session opened for user root by (uid=0)
Feb 14 17:25:01 mirror crond(pam_unix)[4206]: session opened for user cactiuser by (uid=0)
Feb 14 17:25:01 mirror crond(pam_unix)[4209]: session opened for user cacti by (uid=0)
Feb 14 17:25:02 mirror crond(pam_unix)[4206]: session closed for user cactiuser
Feb 14 17:25:05 mirror crond(pam_unix)[4207]: session closed for user root
Feb 14 17:25:06 mirror crond(pam_unix)[4209]: session closed for user cacti


which user?

Posted: Tue Feb 14, 2006 9:26 pm
by sitxu
holy lUsers Batman!
[root@mirror log]# ps axu | grep zm
asterisk 4086 0.0 1.5 12644 6116 pts/1 S 17:21 0:00 /usr/bin/perl -wT /usr/lib/zm/bin/zmdc.pl start zmfilter.pl
asterisk 4107 0.2 2.4 17032 9544 pts/1 S 17:21 0:01 /usr/bin/perl -wT /usr/lib/zm/bin/zmfilter.pl
asterisk 4112 0.1 1.5 13004 5976 pts/1 S 17:21 0:00 /usr/bin/perl -wT /usr/lib/zm/bin/zmaudit.pl -d 900 -y
asterisk 4119 0.1 1.4 12424 5672 pts/1 S 17:21 0:00 /usr/bin/perl -wT /usr/lib/zm/bin/zmwatch.pl

somehow the user asterisk is running zm, idunno why, how.

dam .rpm

Posted: Tue Feb 14, 2006 9:32 pm
by cordel
Possibly you have changed the web user or are you using the user group directives in apache?

Did you change the user for use in asterisk maybe (AMP would require you to if you use it).
There are a lot of configurations that could be done to try and make then work together, I just need to know what route you have chosen.

Posted: Tue Feb 14, 2006 9:33 pm
by cordel
Your not using AAH are you?

Posted: Tue Feb 14, 2006 9:49 pm
by sitxu
I dont even know what AAH is

[root@mirror bin]# tail -f /var/log/zm/zmdc.log
zmwatch.pl(5242): Operation not permitted
Can't bind: Address already in use at /usr/lib/zm/bin/zmdc.pl line 180.
Server starting at 06/02/14 17:49:29
zmfilter.pl(5232): Operation not permitted
zmaudit.pl(5236): Operation not permitted
zmwatch.pl(5242): Operation not permitted
zmfilter.pl(5232): Operation not permitted
zmaudit.pl(5236): Operation not permitted
zmwatch.pl(5242): Operation not permitted
Can't bind: Address already in use at /usr/lib/zm/bin/zmdc.pl line 180.
Server starting at 06/02/14 17:54:41
zmfilter.pl(5232): Operation not permitted
zmaudit.pl(5236): Operation not permitted
zmwatch.pl(5242): Operation not permitted
zmfilter.pl(5232): Operation not permitted
zmaudit.pl(5236): Operation not permitted
zmwatch.pl(5242): Operation not permitted
Can't bind: Address already in use at /usr/lib/zm/bin/zmdc.pl line 180.

[root@mirror bin]# ps axu | grep zm
root 5211 0.0 1.5 14124 6116 pts/0 S 17:43 0:00 /usr/bin/perl -wT /usr/lib/zm/bin/zmdc.pl start zmfilter.pl
root 5232 0.1 2.4 15936 9428 pts/0 S 17:43 0:01 /usr/bin/perl -wT /usr/lib/zm/bin/zmfilter.pl
root 5236 0.0 1.5 13472 5964 pts/0 S 17:43 0:00 /usr/bin/perl -wT /usr/lib/zm/bin/zmaudit.pl -d 900 -y
root 5242 0.0 1.4 12384 5680 pts/0 S 17:43 0:00 /usr/bin/perl -wT /usr/lib/zm/bin/zmwatch.pl

Posted: Tue Feb 14, 2006 9:56 pm
by cordel
AAH is Asterisk @ Home.
The RPM will not work with AAH out of the box. You must reconfigure many things and either use the unsupported kernel (which aint that great), or make your own.

Also, I'm not sure if the version of apache they have in that distro supports the user and group derictives yet. Apache only recently got it working.

Posted: Tue Feb 14, 2006 10:02 pm
by sitxu
is not AAH is plain centos4 with asterisk installed(not running now), zm is running as root now, should it run as who? apache?

Posted: Tue Feb 14, 2006 10:11 pm
by cordel
The easy way to go about it is to have it run as the same user/group as the web server and a bit more secure.

When you change it, make sure you change the permissions on all the logs.

Posted: Tue Feb 14, 2006 10:26 pm
by sitxu
if I change :
use constant ZM_WEB_USER => "apache";
use constant ZM_WEB_USER => "apache";

zm just does not run

with root runs but doesnt work, kinda weird!

ill scrap it and compile the source, the deps are there, also the DB.

rpm -e zm

thank you.