Page 1 of 2
Can't insert event - 1.30.10
Posted: Mon Jan 16, 2017 6:46 pm
by Matt84
Hi All
Using 1.30.10 , with storage areas from Iconnor ppa , Updated 2 hours ago ( not sure if related to update was working 10 days ago as i had events)
Ubuntu 16.04.1 LTS
When I force an alarm i get the following in the logs
Forced:
Jan 16 18:27:25 mx zma_m1[5033]: ERR [zma_m1] [Can't insert event: Column count doesn't match value count at row 1. sql was (insert into Events ( MonitorId, StorageId, Name, StartTime, Width, Height, Cause, Notes, StateId, Orientation, Videoed ) values ( 1, 0, 'New Event', from_unixtime( 1484591242 ), 1280, 720, 'Forced Web', 'Forced Web: ', 1, 1 ))]
Jan 16 18:27:25 mx zmdc[1386]: ERR ['zma -m 1' exited abnormally, exit status 112]
Jan 16 18:27:25 mx zmf[3833]: WAR [zmf] [Socket closed at remote end]
Modect:
Jan 16 18:34:16 mx zma_m1[5163]: INF [zma_m1] [Front: 397 - Gone into prealarm state]
Jan 16 18:34:16 mx zma_m1[5163]: INF [zma_m1] [Front: 406 - Gone into alarm state]
Jan 16 18:34:16 mx zma_m1[5163]: ERR [zma_m1] [Can't insert event: Column count doesn't match value count at row 1. sql was (insert into Events ( MonitorId, StorageId, Name, StartTime, Width, Height, Cause, Notes, StateId, Orientation, Videoed ) values ( 1, 0, 'New Event', from_unixtime( 1484591653 ), 1280, 720, 'Motion', 'Motion: Garden', 1, 1 ))]
Jan 16 18:34:16 mx zmdc[1386]: ERR ['zma -m 1' exited abnormally, exit status 112]
Jan 16 18:34:17 mx zmf[3833]: WAR [zmf] [Socket closed at remote end]
because of this no events are being events are being recorded in the system
Any suggestions?
Matt
Re: Can't insert event - 1.30.10
Posted: Tue Jan 17, 2017 2:16 am
by iconnor
Welcome to the bleeding edge!
Sorry about that. I am building new packages now.. should be available in a little bit. I bumped the priority up to high, so they should get built pretty fast.
Re: Can't insert event - 1.30.10
Posted: Tue Jan 17, 2017 6:21 pm
by Matt84
iconnor wrote:Welcome to the bleeding edge!
Sorry about that. I am building new packages now.. should be available in a little bit. I bumped the priority up to high, so they should get built pretty fast.
Thanks for this
Since doing the update today ( 2017011702)I have lost the Live feed of the camera, Page Keeps refreshing fro where the video is.,
I get the following error
Jan 17 15:45:14 mx zmc_m1[1722]: INF [zmc_m1] [Front: 137000 - Capturing at 20.00 fps]
Jan 17 15:45:19 mx zma_m1[1765]: INF [zma_m1] [Front: 137000 - Analysing at 20.00 fps]
Jan 17 15:45:27 mx zms[3765]: FAT [zms] [Can't mkdir events/1: No such file or directory]
Jan 17 15:45:28 mx web_php[1607]: ERR [Socket /var/run/zm/zms-316483s.sock does not exist.
Paths have not changed
DIR_EVENT = events
PATH_ZMS = /zm/cgi-bin/zms
PATH_Sockets = /var/run/zm
Looking at the
ls -l /var/cache/zoneminder/events/1
total 4
drwxr-xr-x 7 www-data www-data
Just updated to 2017011703, and its also the same.
Ta
Re: Can't insert event - 1.30.10
Posted: Tue Jan 17, 2017 10:02 pm
by iconnor
You may have to do the update manually
mysql -u zmuser -p zm < /usr/share/zoneminder/db/zm_update-1.30.11.sql
Re: Can't insert event - 1.30.10
Posted: Wed Jan 18, 2017 12:38 pm
by quian
Hi
I have the same problem..
Tried update manually
mysql -uroot -p zm < /usr/share/zoneminder/db/zm_update-1.30.11.sql (and got this ...)
Column StateId exists in Events
Column StateId exists in Events
Re: Can't insert event - 1.30.10
Posted: Wed Jan 18, 2017 12:58 pm
by iconnor
make sure you have a link from /usr/share/zoneminder/www/events to /var/cache/zoneminder/events
Or create & assign other storage areas. You will need to make sure that each is owned by www-data
Re: Can't insert event - 1.30.10
Posted: Wed Jan 18, 2017 1:21 pm
by Matt84
SQL script ran fine.
The symlink is good
matt@mx:~$ ls -la /usr/share/zoneminder/www/events
lrwxrwxrwx 1 www-data www-data 28 Apr 5 2016 /usr/share/zoneminder/www/events -> /var/cache/zoneminder/events
I am getting event when the camera are triggerd by modect, and can view the events via ZMNinja without issue.
Re: Can't insert event - 1.30.10
Posted: Wed Jan 18, 2017 1:40 pm
by quian
drwxrwxrwx 4 www-data www-data 4.0K Jan 16 17:43 storage
drwxrwxrwx 4 www-data www-data 4.0K Jan 16 17:45 storage2
ls -la /usr/share/zoneminder/www/events
lrwxrwxrwx 1 www-data www-data 28 Jan 3 16:06 /usr/share/zoneminder/www/events -> /var/cache/zoneminder/events
Same here...
I can see the events been created in storage and storage2. However cannot see any video...
Re: Can't insert event - 1.30.10
Posted: Wed Jan 18, 2017 1:44 pm
by iconnor
Screenshots of your console please.
Re: Can't insert event - 1.30.10
Posted: Wed Jan 18, 2017 2:01 pm
by quian
Screen Shots
Below
Re: Can't insert event - 1.30.10
Posted: Wed Jan 18, 2017 2:19 pm
by Matt84
- Console.PNG (29.3 KiB) Viewed 7613 times
Re: Can't insert event - 1.30.10
Posted: Wed Jan 18, 2017 2:30 pm
by iconnor
You so neither of you can write to /var/cache/zoneminder/events/ check permissions there.
Re: Can't insert event - 1.30.10
Posted: Wed Jan 18, 2017 3:04 pm
by quian
sudo chown -R www-data:www-data /var/cache/zoneminder/events/
sudo chmod 775 /var/cache/zoneminder/events/
ls -hla /var/cache/zoneminder/events/
total 16K
drwxrwxr-x 4 www-data www-data 4.0K Jan 18 15:24 .
drwxr-xr-x 5 www-data www-data 4.0K Jan 16 17:14 ..
drwxr-xr-x 2 www-data www-data 4.0K Jan 16 17:43 1
drwxr-xr-x 2 www-data www-data 4.0K Jan 16 17:45 2
lrwxrwxrwx 1 www-data www-data 1 Jan 16 17:43 Dahua on Storage 1 -> 1
lrwxrwxrwx 1 www-data www-data 1 Jan 16 17:45 Dahua on Storage 2 -> 2
lrwxrwxrwx 1 www-data www-data 32 Jan 18 15:24 events -> /usr/share/zoneminder/www/events
sudo chown -R www-data:www-data /usr/share/zoneminder/www/events/
sudo chmod -R 775 /usr/share/zoneminder/www/events
ls -hla /var/cache/zoneminder/events/
total 16K
drwxrwxr-x 4 www-data www-data 4.0K Jan 18 15:24 .
drwxr-xr-x 5 www-data www-data 4.0K Jan 16 17:14 ..
drwxr-xr-x 2 www-data www-data 4.0K Jan 16 17:43 1
drwxr-xr-x 2 www-data www-data 4.0K Jan 16 17:45 2
lrwxrwxrwx 1 www-data www-data 1 Jan 16 17:43 Dahua on Storage 1 -> 1
lrwxrwxrwx 1 www-data www-data 1 Jan 16 17:45 Dahua on Storage 2 -> 2
lrwxrwxrwx 1 www-data www-data 32 Jan 18 15:24 events -> /usr/share/zoneminder/www/events
Still no luck
Re: Can't insert event - 1.30.10
Posted: Wed Jan 18, 2017 3:36 pm
by Matt84
www-data@mx:/usr/share/zoneminder/www/events$ ls
1 2 3 Back-Garden Front Side
www-data@mx:/usr/share/zoneminder/www/events$ cd 1
www-data@mx:/usr/share/zoneminder/www/events/1$ mkdir test
www-data@mx:/usr/share/zoneminder/www/events/1$ ls
16 17 test
www-data@mx:/usr/share/zoneminder/www/events/1$ cd /var/cache/zoneminder/events
www-data@mx:/var/cache/zoneminder/events$ cd /var/cache/zoneminder/events
www-data@mx:/var/cache/zoneminder/events$ ls
1 2 3 Back-Garden Front Side
www-data@mx:/var/cache/zoneminder/events$ ls 1
16 17 test
www-data@mx:/var/cache/zoneminder/events$
Logging is as www-data I can create a folder , Just to make sure
Re: Can't insert event - 1.30.10
Posted: Sat Jan 21, 2017 10:47 am
by quian
Hi
Matt84 did you manage to get your video stream to show yet on 1.30.11?
Thanks
Quian