Zones missing Zones2.jpg 404 ?

Forum for questions and support relating to the 1.27.x releases only.
Locked
sleuth
Posts: 5
Joined: Mon Jun 23, 2014 5:24 pm

Zones missing Zones2.jpg 404 ?

Post by sleuth »

Hello, I'm new to ZoneMinder... but I am a little technically savvy :)

Background:
I just set up a new build on a new VM using Mint 16 (based on Ubuntu 13.10), assigned all 16 logical cores on a dual quadcore L5520 server with 20GB of ram... Build a git clone of master from source, showing 1.27.1 version. I only have one camera set up right now, Dahua IPC-HFW4300S, supports 1080p @ 30fps or 3m @ 20 fps. I have it set for 1080p @ 30fps in the camera setup, and in the ZoneMinder setup I'm using LibVLC set at 1920x1080 with a 10fps max. I currently have it set on MoDec.

I click on 1 Zone and it pops up and I'm missing any sort of reference picture, getting a 404 on the image:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /zm/images/Zones2.jpg was not found on this server.</p>
<hr>
<address>Apache/2.4.6 (Ubuntu) Server at 192.168.1.32 Port 80</address>
</body></html>

Is this a bug, is there something I need to do for this image to be populated? Otherwise the monitor screens and basic events seem to be working although, it's definitely triggering on a lot of false positives.

Also as an aside, what's the best way to deal with the transition from night mode (IRs turn on) and day mode since this seems to trigger an alert every morning and night.
sleuth
Posts: 5
Joined: Mon Jun 23, 2014 5:24 pm

Re: Zones missing Zones2.jpg 404 ?

Post by sleuth »

hmm any ideas?

I also have in part of my field of view a sidewalk and as it is an overcast day today, the sun keeps going in and out of clouds and it triggers events as it suddenly gets lighter or darker, may take some playing to get this right I think.
linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: Zones missing Zones2.jpg 404 ?

Post by linuxsense »

Does /images/ exist in the root of the ZM tree? And if so, does www-data (or whatever apache runs as) have read/write access to it?
sleuth
Posts: 5
Joined: Mon Jun 23, 2014 5:24 pm

Re: Zones missing Zones2.jpg 404 ?

Post by sleuth »

That's it... I guess I should have checked that, but the install process should be tweaked to fix this, I didn't create any of these folders:

/usr/share/zoneminder $ ls -la
...
lrwxrwxrwx 1 root root 28 Jun 20 20:12 images -> /var/cache/zoneminder/images

/usr/share/zoneminder $ cd /var/cache/zoneminder

/var/cache/zoneminder $ ls -la
total 20
drwxr-xr-x 5 www-data www-data 4096 Jun 20 20:14 .
drwxr-xr-x 18 root root 4096 Jun 20 18:55 ..
drwxr-xr-x 3 www-data www-data 4096 Jun 20 21:14 events
drwxr-xr-x 2 root root 4096 Jun 20 20:12 images
drwxr-xr-x 2 root root 4096 Jun 20 20:12 temp

/var/cache/zoneminder $ sudo chown www-data:www-data images

/var/cache/zoneminder $ ls -la
total 20
drwxr-xr-x 5 www-data www-data 4096 Jun 20 20:14 .
drwxr-xr-x 18 root root 4096 Jun 20 18:55 ..
drwxr-xr-x 3 www-data www-data 4096 Jun 20 21:14 events
drwxr-xr-x 2 www-data www-data 4096 Jun 20 20:12 images
drwxr-xr-x 2 root root 4096 Jun 20 20:12 temp

Works!
linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: Zones missing Zones2.jpg 404 ?

Post by linuxsense »

I think its a recent issue, I ran into it the other day myself.
nikonaum
Posts: 2
Joined: Sun Aug 10, 2014 10:36 am

Re: Zones missing Zones2.jpg 404 ?

Post by nikonaum »

Make sure you've added "/var/cache/zoneminder" to open_basedir in php.ini and restart apache server.

Mine looks like this: open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/:/srv/http/zoneminder/:/usr/share/cambozola/:/var/cache/zoneminder/:/tmp/zoneminder/:/var/log/zoneminder/

I'm using Arch Linux and installed ZoneMinder 1.27 from AUR repository. I could not export anything in ZoneMinder or even see image in the create Zones function.
Hope this helps you.

Edit: In my case is "/var/cache/zoneminder". This is the parent directory of the images/, events/ and temp/ directories, yours may be different depending on the distro you are using.
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Re: Zones missing Zones2.jpg 404 ?

Post by iitywygms »

linuxsense wrote:I think its a recent issue, I ran into it the other day myself.
How were you able to solve?
ThomasNovin
Posts: 29
Joined: Fri Jun 12, 2009 11:36 am

Re: Zones missing Zones2.jpg 404 ?

Post by ThomasNovin »

I also have this problem on this version:

root@mistik:/var/cache/zoneminder# apt-cache policy zoneminder
zoneminder:
Installed: 1.27.99+1-trusty-SNAPSHOT2014080402
Candidate: 1.27.99+1-trusty-SNAPSHOT2014080402
Version table:
*** 1.27.99+1-trusty-SNAPSHOT2014080402 0
500 http://ppa.launchpad.net/iconnor/zonemi ... er/ubuntu/ trusty/main i386 Packages
100 /var/lib/dpkg/status
1.26.5-1ubuntu3 0
500 http://se.archive.ubuntu.com/ubuntu/ trusty/universe i386 Packages

From the Zoneminder log:

2014-08-20 15:18:09.373809 zmu 18833 ERR Can't open Zones1.jpg: Permission denied zm_image.cpp 797

I was able to fix this by changing so that www-data owns the directory that houses this file.

root:/var/cache/zoneminder# ls -al
total 20
drwxr-xr-x 5 www-data www-data 4096 jul 28 22:06 .
drwxr-xr-x 33 root root 4096 maj 2 11:02 ..
drwxr-xr-x 3 www-data www-data 4096 okt 25 2013 events
drwxr-xr-x 2 root root 4096 jul 26 20:56 images
drwxr-xr-x 2 root root 4096 jul 26 20:56 temp
root:/var/cache/zoneminder# ls -la images/
total 8
drwxr-xr-x 2 root root 4096 jul 26 20:56 .
drwxr-xr-x 5 www-data www-data 4096 jul 28 22:06 ..
root:/var/cache/zoneminder# chown www-data:www-data images

The installer should have fixed this IMHO as I have not changed this myself.
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Re: Zones missing Zones2.jpg 404 ?

Post by iitywygms »

I wish I could say the same thing.
I have it setup as everyone says it should be.
But I do not get any images to set up zones.
If I delete the images in the zoneminder images directory and go to add a zone, the image is created but it never shows in zoneminder.

kevin@mythbackend:/var/cache/zoneminder$ apt-cache policy zoneminder
zoneminder:
Installed: 1.27.0-precise-2
Candidate: 1.27.0-precise-2
Version table:
*** 1.27.0-precise-2 0
500 http://ppa.launchpad.net/iconnor/zoneminder/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status
1.25.0-1 0
500 http://mirror.math.ucdavis.edu/ubuntu/ precise/universe amd64 Packages


kevin@mythbackend:/var/cache/zoneminder$ ls -la
total 20
drwxr-xr-x 5 www-data www-data 4096 Aug 19 19:21 .
drwxr-xr-x 22 root root 4096 Aug 19 19:21 ..
drwxrwxrwx 10 www-data www-data 4096 Aug 19 20:36 events
drwxrwxrwx 2 www-data www-data 64 Aug 19 22:08 images
drwxr-xr-x 2 www-data www-data 4096 Apr 30 11:22 temp
Locked