Can't insert event - 1.30.10

Forum for questions and support relating to the 1.30.x releases only.
Matt84
Posts: 14
Joined: Thu Jul 28, 2016 12:18 pm

Can't insert event - 1.30.10

Post 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
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Can't insert event - 1.30.10

Post 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.
Matt84
Posts: 14
Joined: Thu Jul 28, 2016 12:18 pm

Re: Can't insert event - 1.30.10

Post 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
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Can't insert event - 1.30.10

Post 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
quian
Posts: 46
Joined: Tue Dec 27, 2016 6:58 am

Re: Can't insert event - 1.30.10

Post 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
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Can't insert event - 1.30.10

Post 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
Matt84
Posts: 14
Joined: Thu Jul 28, 2016 12:18 pm

Re: Can't insert event - 1.30.10

Post 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.
quian
Posts: 46
Joined: Tue Dec 27, 2016 6:58 am

Re: Can't insert event - 1.30.10

Post 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...
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Can't insert event - 1.30.10

Post by iconnor »

Screenshots of your console please.
quian
Posts: 46
Joined: Tue Dec 27, 2016 6:58 am

Re: Can't insert event - 1.30.10

Post by quian »

Screen Shots
Below
Attachments
ss2.png
ss2.png (340.55 KiB) Viewed 5962 times
ss1.png
ss1.png (125.05 KiB) Viewed 5962 times
Matt84
Posts: 14
Joined: Thu Jul 28, 2016 12:18 pm

Re: Can't insert event - 1.30.10

Post by Matt84 »

Console.PNG
Console.PNG (29.3 KiB) Viewed 5958 times
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Can't insert event - 1.30.10

Post by iconnor »

You so neither of you can write to /var/cache/zoneminder/events/ check permissions there.
quian
Posts: 46
Joined: Tue Dec 27, 2016 6:58 am

Re: Can't insert event - 1.30.10

Post 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
Matt84
Posts: 14
Joined: Thu Jul 28, 2016 12:18 pm

Re: Can't insert event - 1.30.10

Post 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 :)
quian
Posts: 46
Joined: Tue Dec 27, 2016 6:58 am

Re: Can't insert event - 1.30.10

Post by quian »

Hi

Matt84 did you manage to get your video stream to show yet on 1.30.11?

Thanks

Quian
Locked