Red Hat Enterprise Linux 5.4 64bit with Zoneminder 1.24.2

Forum for questions and support relating to the 1.24.x releases only.
bsagowitz
Posts: 20
Joined: Mon Nov 09, 2009 4:59 pm

Red Hat Enterprise Linux 5.4 64bit with Zoneminder 1.24.2

Post by bsagowitz »

I'm having trouble getting past the configuration of zoneminder on this system.

here is the command I'm issuing:

./configure --with-webdir=/var/www/html --with-cgidir=/var/www/cgi

here is the error that I receive:

checking for mysql_init in -lmysqlclient... no
configure: error: zm requires libmysqlclient.a

any ideas?
whatboy
Posts: 304
Joined: Mon Aug 31, 2009 10:31 pm

Post by whatboy »

You need to install the "dev" packages of mysql...
bsagowitz
Posts: 20
Joined: Mon Nov 09, 2009 4:59 pm

Post by bsagowitz »

I had already done that...

[root@someworkstation ZoneMinder-1.24.2]# yum install mysql-devel
Loaded plugins: rhnplugin, security
Setting up Install Process
Package mysql-devel-5.0.77-3.el5.x86_64 already installed and latest version
Package mysql-devel-5.0.77-3.el5.i386 already installed and latest version
Nothing to do
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Post by knight-of-ni »

I'm thinking you need to specify the "--with-libarch=lib64" configure parameter (libmysqlclient.a can be found under /usr/lib64 not /usr/lib on 64bit systems).

If you want to use a known good set of parameters, just copy and paste these:

Code: Select all

./configure \
--with-webdir=/var/www/html \
--with-cgidir=/var/www/cgi-bin \
--with-webuser=apache \
--with-webgroup=apache \
--with-libarch=lib64 \
--with-ffmpeg=/usr/local \
--with-mysql=/usr \
--with-cgidir=/var/www/cgi-bin \
--with-extralibs="-L/usr/lib64 -L/usr/lib64/mysql" \
CFLAGS="-g -O3 -march=opteron -mtune=opteron" \
CXXFLAGS="-g -O3 -march=opteron -mtune=opteron"
Works great on my 64bit CentOS 5.4 platform. I'd expect your RHEL 5.4 system to compile pretty close to CentOS 5.4.

It probably goes w/o saying, but verify the ffmpeg path is correct for your system, and of course change the march and mtune parameters to match your cpu architecture.

I'm jumping ahead here, but if you run into any further issues regarding missing libraries, you would probably benefit from reading the install guide for CentOS if you have not already:
http://www.zoneminder.com/wiki/index.php/CentOS

It will give you an idea of what RPM packages you will need.
bsagowitz
Posts: 20
Joined: Mon Nov 09, 2009 4:59 pm

Post by bsagowitz »

Well I got it installed thanks!

now I get a black screen when viewing the camera
searched for the problem and a lot of people suffer this

11/12/2009 12:02:03.937251 zmwatch[11131].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]

my output from ipcs -m

[root@somehost]# ipcs -m

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 65536 root 777 135168 1
0x00000000 131073 root 600 393216 2 dest
0x00000000 163842 root 600 393216 2 dest
0x00000000 196611 root 600 393216 2 dest
0x00000000 229380 root 600 393216 2 dest
0x00000000 262149 root 600 393216 2 dest
0x00000000 294918 root 600 393216 2 dest
0x00000000 327687 root 600 393216 2 dest
0x00000000 360456 root 600 393216 2 dest
0x00000000 393225 root 600 393216 2 dest
0x00000000 425994 root 600 393216 2 dest
0x00000000 491532 root 600 393216 2 dest
0x00000000 524301 root 600 393216 2 dest
0x00000000 557070 root 600 393216 2 dest

my output from cat /proc/sys/kernel/shmall
4294967296

output from ps
ps -ef | grep zm
apache 11092 1 0 10:09 pts/2 00:00:00 /usr/bin/perl -wT /usr/local/bin/zmdc.pl startup
apache 11121 11092 0 10:09 pts/2 00:00:00 /usr/bin/perl -wT /usr/local/bin/zmfilter.pl
apache 11125 11092 0 10:09 pts/2 00:00:00 /usr/bin/perl -wT /usr/local/bin/zmaudit.pl -c
apache 11131 11092 0 10:09 pts/2 00:00:00 /usr/bin/perl -wT /usr/local/bin/zmwatch.pl
apache 11135 11092 0 10:09 pts/2 00:00:00 /usr/bin/perl -w /usr/local/bin/zmupdate.pl -c
root 12001 3316 0 12:06 pts/2 00:00:00 grep zm

the configure scripted that worked:

./configure \
--with-webdir=/var/www/html \
--with-cgidir=/var/www/cgi-bin \
--with-webuser=apache \
--with-webgroup=apache \
--with-libarch=lib64 \
--with-ffmpeg=/usr/bin \
--with-mysql=/usr \
--with-cgidir=/var/www/cgi-bin \
--with-extralibs="-L/usr/lib64 -L/usr/lib64/mysql" \
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Post by knight-of-ni »

Are you using a local capture card?

If so, check your permissions on /dev/videoX where "X" is the number of the video device that points to your capture card. Either chmod /dev/videoX or I think zmfix can fix it for you (search the forums for proper syntax).

If this does not resolve the issue, then test your camera using xawtv at a resolution of 320x240. Report you results. Doing so will help identify the root cause of the problem.
bsagowitz
Posts: 20
Joined: Mon Nov 09, 2009 4:59 pm

Post by bsagowitz »

sorry guess I should have said what camera...

its an IP camera.. more specifically an AXIS 2130R PTZ camera.

I have tried all the presets and no luck
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Post by knight-of-ni »

I just took a second look at the the output you posted.

You've identified kernel.shmall (and that looks ok), but what is kernel.shmmax set to? One usually has to increase the shmmax on a default system to avoid shared memory errors.

I've got mine set to 268435456 (256MB). This number will vary, depending on your ring buffer and resolution.
bsagowitz
Posts: 20
Joined: Mon Nov 09, 2009 4:59 pm

Post by bsagowitz »

mine is set to:

68719476736

should I try changing this?
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Post by knight-of-ni »

I doubt that value will work at all since it almost certainly exceeds the amount of physical memory you have in the machine.

Try the value I mentioned previously. If you are setting this via your sysctl.conf then remember you will need to reboot for the new setting to take effect.

Admittedly, the value of 256MB is probably more than you need, but it should work. If you are interested, there are plenty of threads in this forum that discuss how to calculate a value for your system.
bsagowitz
Posts: 20
Joined: Mon Nov 09, 2009 4:59 pm

Post by bsagowitz »

ok. I rebooted and now my shmmax reports

268435456

however I still have a black screen when trying to view the camera.. output of the logs:

==> /tmp/zmaudit.log <==

==> /tmp/zmcontrol.log <11> /tmp/zmdc.log <11> /tmp/zmfilter.log <11> /tmp/zmpkg.log <11> /tmp/zmupdate.log <11> /tmp/zmwatch.log <==
11/12/2009 14:27:58.936144 zmwatch[2759].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/12/2009 14:28:08.938845 zmwatch[2759].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/12/2009 14:28:18.941476 zmwatch[2759].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/12/2009 14:28:28.945033 zmwatch[2759].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/12/2009 14:28:38.949673 zmwatch[2759].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/12/2009 14:28:48.952531 zmwatch[2759].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/12/2009 14:28:58.955163 zmwatch[2759].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/12/2009 14:29:08.957769 zmwatch[2759].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/12/2009 14:29:18.960398 zmwatch[2759].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/12/2009 14:29:28.962068 zmwatch[2759].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
bsagowitz
Posts: 20
Joined: Mon Nov 09, 2009 4:59 pm

Post by bsagowitz »

hmmm the messege board is truncating my log...

1/10/09 15:10:30.278261 zmcontrol[25093].INF [Starting control server 1/AxisV2]
11/10/09 15:10:30.300580 zmcontrol[25097].INF [Control server 1/AxisV2 starting at 09/11/10 15:10:30]
11/10/09 15:10:31.300866 zmcontrol[25097].FAT [Missing mandatory parameter 'tiltstep']

11/12/2009 14:23:53.158018 zmdc[2717].ERR ['zmc -m 1' exited abnormally, exit status 255]
11/12/2009 14:24:33.076479 zmdc[2717].INF [Starting pending process, zmc -m 1]
11/12/2009 14:24:33.080505 zmdc[2717].INF ['zmc -m 1' starting at 09/11/12 14:24:33, pid = 3140]
11/12/2009 14:24:33.162316 zmdc[2717].ERR ['zmc -m 1' exited abnormally, exit status 255]
11/12/2009 14:25:53.064757 zmdc[2717].INF [Starting pending process, zmc -m 1]
11/12/2009 14:25:53.075166 zmdc[2717].INF ['zmc -m 1' starting at 09/11/12 14:25:53, pid = 3236]
11/12/2009 14:25:53.162356 zmdc[2717].ERR ['zmc -m 1' exited abnormally, exit status 255]
11/12/2009 14:28:33.012524 zmdc[2717].INF [Starting pending process, zmc -m 1]
11/12/2009 14:28:33.017138 zmdc[2717].INF ['zmc -m 1' starting at 09/11/12 14:28:33, pid = 3253]
11/12/2009 14:28:33.109538 zmdc[2717].ERR ['zmc -m 1' exited abnormally, exit status 255]

==> /tmp/zmupdate.log <==
11/10/2009 08:46:06.629123 zmupdate[21841].INF [Checking for updates]
11/10/2009 08:46:07.075060 zmupdate[21841].INF [Got version: '1.24.2']
11/11/2009 08:58:36.819645 zmupdate[24953].INF [Checking for updates]
11/11/2009 08:58:36.871254 zmupdate[24953].ERR [Error check failed: '500 Can't connect to www.zoneminder.com:80 (Bad hostname 'www.zoneminder.com')']
11/11/2009 09:58:36.873023 zmupdate[24953].INF [Checking for updates]
11/11/2009 09:58:36.877334 zmupdate[24953].ERR [Error check failed: '500 Can't connect to www.zoneminder.com:80 (Bad hostname 'www.zoneminder.com')']
11/11/2009 10:58:36.879009 zmupdate[24953].INF [Checking for updates]
11/11/2009 10:58:37.312379 zmupdate[24953].INF [Got version: '1.24.2']
11/12/2009 11:09:42.424676 zmupdate[11135].INF [Checking for updates]
11/12/2009 11:09:44.898291 zmupdate[11135].INF [Got version: '1.24.2']
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Post by knight-of-ni »

I'm wondering if the issue is not shared memory per say, but rather an inability to get an image from the camera.

I noticed that zmupdate was not able to contact www.zoneminder.com could simply be an unrelated dns problem, but just in case let me ask the obvious... can you successfully open a web browser and point it to the camera's ip address?

What are your camera settings... particularly the info on the "source" and "buffers" tabs?
bsagowitz
Posts: 20
Joined: Mon Nov 09, 2009 4:59 pm

Post by bsagowitz »

yes I can see the camera fine from its internal web server

The source tab:
Remote Protocol HTTP
Remote Method Simple
Remote Host Name [The actual IP address]
Remote Host Port 80
Remote Host Path /axis-cgi/jpg/image.cgi?resolution=320x240
Remote Image Colours 24 bit colour
Capture Width 320
Capture Height 240

Buffers
Image Buffer Size (frames) 40
Warmup Frames 25
Pre Event Image Count 10
Post Event Image Count 10
Stream Replay Image Buffer 1000
Alarm Frame Count 1
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Have you tried using mapped memory instead? Add --enable-mmap to the configure line.
Phil
Locked