Page 1 of 2

ZM 1.24.1 Ubuntu 9.10 No Events Being Stored

Posted: Wed Mar 24, 2010 7:16 pm
by hummingwolf
Hi everyone. I have relentlessly tried to get ZM up and running without having to ask for help, but I am finally stumped. I have been in IT for many years, but only have a few years experience with Linux and way less with ZM. Here is my problem:

Ubuntu 9.10 Desktop AMD 64 Dual Processor 8GB RAM
ZM 1.24.1 installed from Software Center as per the best install guide I could find.
Axis Cameras
As per another guide, I moved "Events" & "Images" folders to a 2nd mounted drive.
I deleted folders from: /var/cache/zoneminder (default install)
I created simlinks to: /media/sbd1 (straight to the root of the drive)
I deleted simlinks that pointed to: /var/cache/zoneminder from: /usr/share/zoneminder
I created new simlinks from: /media/sbd1 to: /usr/share/zoneminder
I can view axis camera via http and ZM console
Example of the thousands of Events:
31963 New Event 2010-03-24 12:05:59 0.00 null/null 0/0 X
"Source" for camera is Orange
When I go to: http://localhost/zm/events I get 403 Forbidden
When I go to: /var/log/apache2 I get:
[Wed Mar 24 11:44:15 2010] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /usr/share/zoneminder/events
I have also struggled with "Permission Denied" errors.
I have done:
chmod -R 777 /media/sdb1/events
chmod -R 777 /media/sdb1/images
My simlinks are good and active
I have done "Shared Memory Settings as recommended (only running 1 camera so far)
Could someone please assist? I really don't want to give up on this, but this security system is for a racetrack and I am running out of time before being forced to purchase something else! TY in advance. I appreciate your time and effort!

Posted: Wed Mar 24, 2010 9:56 pm
by whatboy
Did you enable/configure FollowSymlink on apache???

Does your apache user (www or apache or whateva) is on the sudoers file???

Did you give proper permission to the /events folder to your apache user (www or apache or whateva)??? , better try chown user on the /events folder...

Posted: Wed Mar 24, 2010 10:18 pm
by kingofkya
Also make sure Apache owned the folders. with chown -R www-data:www-data /events

Posted: Thu Mar 25, 2010 4:49 pm
by hummingwolf
Thank you whatboy & kingofkya for your responses! Here is some additional info.

sudo terminal:

root@ipsec01:/home/administrator# chown -R www-data:www-data /media/sdb1/events
root@ipsec01:/home/administrator# chown -R www-data:www-data /media/sdb1/images
root@ipsec01:/home/administrator# apache2ctl restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
root@ipsec01:/home/administrator#

apache.conf:

Alias /zm /usr/share/zoneminder

<Directory>
php_flag register_globals off
Options Indexes FollowSymLinks
<IfModule>
DirectoryIndex index.php
</IfModule>
</Directory>

zmwatch.log:

03/25/10 09:44:09.395013 zmwatch[2576].INF [Restarting analysis daemon for 192168143, time since last analysis 9 seconds (1269535449-1269535440)]
03/25/10 09:44:09.669632 zmwatch[2576].INF ['zma -m 2' starting at 10/03/25 09:44:09, pid = 2816]
03/25/10 09:44:19.671555 zmwatch[2576].INF [Restarting analysis daemon for 192168143, time since last analysis 8 seconds (1269535459-1269535451)]
03/25/10 09:44:19.906876 zmwatch[2576].INF ['zma -m 2' starting at 10/03/25 09:44:19, pid = 2818]
03/25/10 09:44:29.908965 zmwatch[2576].INF [Restarting analysis daemon for 192168143, time since last analysis 9 seconds (1269535469-1269535460)]
03/25/10 09:44:30.204135 zmwatch[2576].INF ['zma -m 2' starting at 10/03/25 09:44:30, pid = 2820]
03/25/10 09:44:40.206059 zmwatch[2576].INF [Restarting analysis daemon for 192168143, time since last analysis 9 seconds (1269535480-1269535471)]
03/25/10 09:44:40.470421 zmwatch[2576].INF ['zma -m 2' starting at 10/03/25 09:44:40, pid = 2824]

apache2 error.log:

[Thu Mar 25 09:34:27 2010] [notice] SIGHUP received. Attempting to restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Thu Mar 25 09:34:27 2010] [notice] Apache/2.2.12 (Ubuntu) PHP/5.2.10-2ubuntu6.4 with Suhosin-Patch configured -- resuming normal operations
df: `events': Permission denied
df: no file systems processed
df: `events': Permission denied
df: no file systems processed
df: `events': Permission denied
df: no file systems processed
df: `events': Permission denied
df: no file systems processed

Please forgive my lack of knowledge, but:

Does your apache user (www or apache or whateva) is on the sudoers file???

I am not familiar with the process to check or revise this...

Thank you again for all of your assistance!

Posted: Thu Mar 25, 2010 4:56 pm
by whatboy
as admin

visudo

add to the last of the file

Code: Select all

www-data       ALL=(ALL)       NOPASSWD: ALL

Some Additional Info

Posted: Thu Mar 25, 2010 4:57 pm
by hummingwolf
Here is the shared memory settings in sysctl.conf:

# Memory modifications for ZoneMinder (kernel.shmall = 32 MB,
kernel.shmmax = 512 MB)
kernel.shmall = 33554432
kernel.shmmax = 536870912

As previously noted, my boxes have 8Gb of RAM and I will be recording motion detection for approximately 15 cameras per unit...

Posted: Thu Mar 25, 2010 5:00 pm
by hummingwolf
Sorry again for my lacking...

what would be the syntax for adding www-data as a sudo user?

Posted: Thu Mar 25, 2010 5:01 pm
by hummingwolf
Ooops disregard... lol

Posted: Thu Mar 25, 2010 5:03 pm
by whatboy

Code: Select all

Could not reliably determine the server's fully qualified domain name
Place what "hostname" gives you in your httpd.conf file...

Posted: Thu Mar 25, 2010 5:04 pm
by whatboy

Code: Select all

# Memory modifications for ZoneMinder (kernel.shmall = 32 MB, 
kernel.shmmax = 512 MB)  <-- I think this line shouldn't be here...
kernel.shmall = 33554432 
kernel.shmmax = 536870912 

Oppsss never mind, its a cut line in two...

Posted: Thu Mar 25, 2010 5:15 pm
by hummingwolf
The: /etc/apache2/httpd.conf is empty...

Posted: Thu Mar 25, 2010 5:21 pm
by hummingwolf
I added www-data as a sudo user, restarted apache2, restarted zm...

Same permission error

All this to have events stored on a second data drive. If there were instructions to install zm from scratch using a second drive for data, I would almost be tempted to do that...
O'well that's why we love the challenge I guess! LOL

Posted: Fri Mar 26, 2010 3:24 pm
by hummingwolf
Well, I am stumped... I do appreciate the help I have received! I think I am going to have to shelve ZM. I am in a production situation with little time left. Thank you everyone! This is a great community!

Posted: Fri Mar 26, 2010 11:25 pm
by hummingwolf
Just in case someone sees my thread and has some suggestions over the weekend, here is some more errors:

/etc/apache2/httpd.conf - blank

/etc/zm/apache.conf

Alias /zm /usr/share/zoneminder

<Directory>
php_flag register_globals off
Options Indexes FollowSymLinks
<IfModule>
DirectoryIndex index.php
</IfModule>
</Directory>

/tmp/zmdc.log

03/26/10 15:44:56.677017 zmdc[1630].INF ['zma -m 2' starting at 10/03/26 15:44:56, pid = 28373]
03/26/10 15:44:59.925061 zmdc[1630].ERR ['zma -m 2' exited abnormally, exit status 6]
03/26/10 15:45:06.874894 zmdc[1630].INF ['zma -m 2' starting at 10/03/26 15:45:06, pid = 28378]
03/26/10 15:45:10.126359 zmdc[1630].ERR ['zma -m 2' exited abnormally, exit status 6]
03/26/10 15:45:17.173197 zmdc[1630].INF ['zma -m 2' starting at 10/03/26 15:45:17, pid = 28381]
03/26/10 15:45:20.655191 zmdc[1630].ERR ['zma -m 2' exited abnormally, exit status 6]
03/26/10 15:45:27.463358 zmdc[1630].INF ['zma -m 2' starting at 10/03/26 15:45:27, pid = 28387]
03/26/10 15:45:30.729096 zmdc[1630].ERR ['zma -m 2' exited abnormally, exit status 6]
03/26/10 15:45:37.725906 zmdc[1630].INF ['zma -m 2' starting at 10/03/26 15:45:37, pid = 28398]

/tmp/zmwatch.log

03/26/10 15:45:37.738612 zmwatch[1728].INF ['zma -m 2' starting at 10/03/26 15:45:37, pid = 28398]
03/26/10 15:45:47.740802 zmwatch[1728].INF [Restarting analysis daemon for 192168143, time since last analysis 6 seconds (1269643547-1269643541)]
03/26/10 15:45:47.983761 zmwatch[1728].INF ['zma -m 2' starting at 10/03/26 15:45:47, pid = 28405]
03/26/10 15:45:57.994305 zmwatch[1728].INF [Restarting analysis daemon for 192168143, time since last analysis 6 seconds (1269643557-1269643551)]
03/26/10 15:45:58.182113 zmwatch[1728].INF ['zma -m 2' starting at 10/03/26 15:45:58, pid = 28423]
03/26/10 15:46:08.184092 zmwatch[1728].INF [Restarting analysis daemon for 192168143, time since last analysis 7 seconds (1269643568-1269643561)]
03/26/10 15:46:08.458825 zmwatch[1728].INF ['zma -m 2' starting at 10/03/26 15:46:08, pid = 28429]
03/26/10 15:46:18.460781 zmwatch[1728].INF [Restarting analysis daemon for 192168143, time since last analysis 7 seconds (1269643578-1269643571)]
03/26/10 15:46:18.654667 zmwatch[1728].INF ['zma -m 2' starting at 10/03/26 15:46:18, pid = 28437]
03/26/10 15:46:28.656537 zmwatch[1728].INF [Restarting analysis daemon for 192168143, time since last analysis 6 seconds (1269643588-1269643582)]
03/26/10 15:46:28.898147 zmwatch[1728].INF ['zma -m 2' starting at 10/03/26 15:46:28, pid = 28445]

/tmp/zmdc.log

03/26/10 16:17:15.939699 zmdc[1630].INF ['zma -m 2' starting at 10/03/26 16:17:15, pid = 29046]
03/26/10 16:17:19.520520 zmdc[1630].ERR ['zma -m 2' exited abnormally, exit status 6]
03/26/10 16:17:26.160153 zmdc[1630].INF ['zma -m 2' starting at 10/03/26 16:17:26, pid = 29051]
03/26/10 16:17:29.719487 zmdc[1630].ERR ['zma -m 2' exited abnormally, exit status 6]
03/26/10 16:17:36.402527 zmdc[1630].INF ['zma -m 2' starting at 10/03/26 16:17:36, pid = 29056]
03/26/10 16:17:39.765951 zmdc[1630].ERR ['zma -m 2' exited abnormally, exit status 6]
03/26/10 16:17:46.634805 zmdc[1630].INF ['zma -m 2' starting at 10/03/26 16:17:46, pid = 29062]

/var/log/apache2/error.log

df: `events': Permission denied
df: no file systems processed
df: `events': Permission denied
df: no file systems processed
[Fri Mar 26 16:14:56 2010] [error] [client 192.168.1.40] Premature end of script headers: zms, referer: http://192.168.1.40/zm/index.php?view=e ... 1=2&page=1
[Fri Mar 26 16:14:56 2010] [error] [client 192.168.1.40] socket_sendto( /tmp/zms-496957s.sock ) failed: No such file or directory, referer: http://192.168.1.40/zm/index.php?view=e ... 1=2&page=1
[Fri Mar 26 16:14:56 2010] [error] [client 192.168.1.40] array (\n 0 => \n array (\n 'file' => '/usr/share/zoneminder/ajax/stream.php',\n 'line' => 51,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto( /tmp/zms-496957s.sock ) failed: No such file or directory',\n ),\n ),\n 1 => \n array (\n 'file' => '/usr/share/zoneminder/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/usr/share/zoneminder/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.40/zm/index.php?view=e ... 1=2&page=1
df: `events': Permission denied
df: no file systems processed

/var/log/apache2/access.log

192.168.1.40 - - [26/Mar/2010:16:13:23 -0700] "GET /zm/index.php HTTP/1.1" 200 2343 "http://192.168.1.40/zm/index.php" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
192.168.1.40 - - [26/Mar/2010:16:14:44 -0700] "GET /zm/index.php?view=watch&mid=2 HTTP/1.1" 200 3028 "http://192.168.1.40/zm/index.php" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
192.168.1.40 - - [26/Mar/2010:16:14:47 -0700] "POST /zm/index.php HTTP/1.1" 200 568 "http://192.168.1.40/zm/index.php?view=watch&mid=2" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
192.168.1.40 - - [26/Mar/2010:16:14:53 -0700] "POST /zm/index.php HTTP/1.1" 200 834 "http://192.168.1.40/zm/index.php?view=watch&mid=2" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
192.168.1.40 - - [26/Mar/2010:16:14:55 -0700] "GET /zm/index.php?view=event&eid=50190&trms=1&attr1=MonitorId&op1=%3d&val1=2&page=1 HTTP/1.1" 200 2847 "http://192.168.1.40/zm/index.php?view=watch&mid=2" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
192.168.1.40 - - [26/Mar/2010:16:14:56 -0700] "GET /cgi-bin/zms?source=event&mode=jpeg&event=50190&frame=1&scale=100&rate=100&maxfps=5&replay=single&connkey=496957&rand=1269645295 HTTP/1.1" 500 640 "http://192.168.1.40/zm/index.php?view=e ... 1=2&page=1" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
192.168.1.40 - - [26/Mar/2010:16:14:56 -0700] "POST /zm/index.php HTTP/1.1" 200 530 "http://192.168.1.40/zm/index.php?view=e ... 1=2&page=1" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
192.168.1.40 - - [26/Mar/2010:16:14:56 -0700] "POST /zm/index.php HTTP/1.1" 200 684 "http://192.168.1.40/zm/index.php?view=e ... 1=2&page=1" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
192.168.1.40 - - [26/Mar/2010:16:14:56 -0700] "POST /zm/index.php HTTP/1.1" 200 493 "http://192.168.1.40/zm/index.php?view=e ... 1=2&page=1" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
192.168.1.40 - - [26/Mar/2010:16:14:57 -0700] "POST /zm/index.php HTTP/1.1" 200 569 "http://192.168.1.40/zm/index.php?view=watch&mid=2" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
192.168.1.40 - - [26/Mar/2010:16:14:44 -0700] "GET /cgi-bin/zms?mode=jpeg&monitor=2&scale=100&maxfps=5&buffer=1000&connkey=159774&rand=1269645284 HTTP/1.1" 200 741688 "http://192.168.1.40/zm/index.php?view=watch&mid=2" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
192.168.1.40 - - [26/Mar/2010:16:18:24 -0700] "GET /zm/index.php HTTP/1.1" 200 2341 "http://192.168.1.40/zm/index.php" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"

/var/log/syslog

Mar 26 16:23:24 ipsec01 zma_m2[29203]: INF [In mode 4/1, warming up]
Mar 26 16:23:28 ipsec01 zma_m2[29203]: FAT [Can't fopen events/2/50241/.50241: Permission denied]
Mar 26 16:23:28 ipsec01 zma_m2[29203]: INF [Got signal 6 (Aborted), exiting and forcing backtrace]
Mar 26 16:23:28 ipsec01 zmdc[1630]: ERR ['zma -m 2' exited abnormally, exit status 6]
Mar 26 16:23:34 ipsec01 zmwatch[1728]: INF [Restarting analysis daemon for 192168143, time since last analysis 6 seconds (1269645814-1269645808)]
Mar 26 16:23:34 ipsec01 zmdc[1630]: INF ['zma -m 2' starting at 10/03/26 16:23:34, pid = 29221]
Mar 26 16:23:34 ipsec01 zmdc[29221]: INF ['zma -m 2' started at 10/03/26 16:23:34]
Mar 26 16:23:34 ipsec01 zmwatch[1728]: INF ['zma -m 2' starting at 10/03/26 16:23:34, pid = 29221]
Mar 26 16:23:34 ipsec01 zma_m2[29221]: INF [Debug Level = 0, Debug Log = <none>]
Mar 26 16:23:34 ipsec01 zma_m2[29221]: INF [In mode 4/1, warming up]

I will check the post throughout the weekend...

Posted: Wed Jun 23, 2010 9:15 am
by moorsey
I am also having the same problem if you managed to solve this. Loads of threads on moving the events directory to another drive, but no solutions!