Page 1 of 1

Noob question - Working with Axis 221 and 211 cameras

Posted: Fri Jun 17, 2011 3:41 pm
by mylesw
Hi there. My first post, so please be kind & forgiving... :)

I have a 2 camera setup for a rental property complex, and the cameras are Axis 221 and 211 PoE Network cameras. Both appear to be compatible with ZoneMinder. I'm trying to setup ZoneMinder 1.24 on a Linux box, and I believe I have it compiled and running. The web interface is working, and I am trying to register the cameras so I can use ZM to monitor and record.

When I login via the web portal, it shows that ZoneMinder Console - Stopped. Not sure if this has anything to do with it, but I can register a monitor. ZoneMinder does appear to be running on the server (did a ps ax | grep zm and I have a bunch of Perl ZM processes running).

The cameras are accessible directly via their own HTTP interface (I can see them just fine using that). When I attempt to register them, they are being setup as follows:

Code: Select all

Source Type:  Remote
Function:  Monitor
Enabled :  Yes
Max FPS:  5
Alarm Max FPS:  5
Remote Protocol:  H T T P
Remote Method:  Simple
Remote Host Name:   (see attached JPG - forums won't let me post the url - too spammy apparently)
Remote Host Port:  8001   (this is the port I've setup for one of the cameras - and it works via web browser)
Remote Host Path: (see attached JPG - forums won't let me post the url - too spammy apparently)
I think all other settings are defaults.

When I open the monitor item and view it, I just get a popup web window by the picture is not coming through. I suspect its not capturing image from the camera.

How can I debug this installation? Are there logs that might tell me what the problem is so that I can fix it?

Thanks in advance for any suggestions, etc.

Myles

Re: Noob question - Working with Axis 221 and 211 cameras

Posted: Fri Jun 17, 2011 5:42 pm
by bb99
It'll be very important to post the full version you're using and whether your utilizing mapped memory or shared. If shared is your answer your issue will be shmall and shmmax values; this is very common on resolutions you're using. The wiki and forum posts covers this fully.

Re: Noob question - Working with Axis 221 and 211 cameras

Posted: Fri Jun 17, 2011 9:44 pm
by mylesw
Thanks for the tips. ZM Version = 1.24.4
When I built from source, I used the config settings (in addition to the :

Code: Select all

enable-mmap=no CPPFLAGS=-D__STDC_CONSTANT_MACROS
It was giving me issues when compiling with FFMPEG, but I can't recall if that had anything to do with shared memory, etc. Is there anyway to tell from this how the memory is configured?

Myles

Re: Noob question - Working with Axis 221 and 211 cameras

Posted: Sat Jun 18, 2011 12:03 am
by bb99
enable-mmap=no
You're using shared memory and that's going to be the first hurdle to getting this working. Two ways to approach this: first option is to decrease the camera output and ZM's resolution to 320*240 (they must match exactly), get it running and configured then go after the shared memory for higher resolutions or increase the shmall and shmmax values in /etc/sysctl.conf to at least 268435456 which will be enough for 640*480. Then attempt any other configuration issues; I recommend the first. Post back.

Re: Noob question - Working with Axis 221 and 211 cameras

Posted: Sat Jun 18, 2011 1:41 am
by mylesw
bb99 wrote:You're using shared memory and that's going to be the first hurdle to getting this working. Two ways to approach this: first option is to decrease the camera output and ZM's resolution to 320*240 (they must match exactly), get it running and configured then go after the shared memory for higher resolutions or increase the shmall and shmmax values in /etc/sysctl.conf to at least 268435456 which will be enough for 640*480. Then attempt any other configuration issues; I recommend the first. Post back.
OK, I changed the camera to 320x240, motion Jpeg. Changed the Monitor settings for it to the same. Then shutdown ZM on the server, and restarted it. Logged back in, and its still showing the following (see attached).

Not sure why its behaving like this... I've checked log files and nothing seems to be reported as an issue in there.

Myles

Re: Noob question - Working with Axis 221 and 211 cameras

Posted: Sat Jun 18, 2011 4:43 am
by bb99
Did you change the remote host path?
Remote Host Path /axis-cgi/mjpg/video.cgi?resolution=320x240&compression=20
http://www.zoneminder.com/forums/viewto ... t=axis+221

Edit: Just noticed that ZM is stopped in your .png. You'll need to start it (or the service) before testing any further.

Re: Noob question - Working with Axis 221 and 211 cameras

Posted: Sat Jun 18, 2011 2:53 pm
by mylesw
Thanks. Some progress....

I was able to get it to start last night, after I realized that the permission of the /tmp/zm folder wasn't allowing my Apache user account to write to the debug log. And then it did show me that it correctly connected to the camera, and I thought I was out of the woods.

However it was not to be. Although it was connecting correctly, I could never get a JPG view to the camera on anything. The images showing if I view the Zone were always broken.

I changed out the Host Path numerous times, and found that my compression level of 20 in ZM wasn't being matched to the camera, so I logged into the camera and changed its compression level to 20 as well, and thought that was the end of it. Then I restarted ZM, and now (again) it won't start on the web.

The /var/log/messages shows the following:

Code: Select all

Jun 18 07:37:30 management zmpkg[13035]: INF [Command: start] 
Jun 18 07:37:30 management zmpkg[13035]: ERR [Unable to find valid 'su' syntax] 
Jun 18 07:41:43 management zmc_m1[12849]: INF [Axis221: 3000 - Capturing at 3.50 fps]
Interesting... I think this is telling me that its capturing images from the camera just fine. My problems appear to be in the web application rather than the camera integration.

I had that 'Unable to find valid 'su' syntax' error when I didn't have the permissions set correctly on the debug log file, but I checked that again and it was fine.

I don't know where on my server it writes the captured images to, in order to check file permissions. All of my system is run under apache:apache (its CentOS) and I checked zm.conf and it was set correctly. Apache user has shell to /bin/sh fine, and it was working fine before I restarted zm daemon processes.

Man, this is one of the most difficult applications to debug, but I'm still game to get this running. If anyone could point me towards anything in logs that could tell me what is going on, I'm all ears. But that su error isn't telling me anything useful in terms of why there is an error.

I checked the Apache logs and I'm seeing:

Code: Select all

[Sat Jun 18 07:29:29 2011] [error] [client 184.183.25.52] File does not exist: .....Zones1.jpg, referer: .......
But I suspect this is simply because the content being captured by the camera is being written to another location? Or that it doesn't have the file permission to access that location? I have open_basedir protection on my PHP.INI (for good reason), but I would have thought that content captured from the camera would be written to the web directory so you could see it?

There must be something fundamental that I'm missing here....

Myles