Can't insert event: Field 'DefaultVideo'

Forum for questions and support relating to the 1.31.x releases only.
Locked
marcolino7
Posts: 73
Joined: Wed Sep 16, 2015 12:20 pm

Can't insert event: Field 'DefaultVideo'

Post by marcolino7 »

Hi,
I just upgraded from version 1.29.0 to 1.31.1.
All seems working fine, but ZM do not record because of this error:

Code: Select all

systemctl status zoneminder.service Can't insert event: Field 'DefaultVideo' doesn't have a default value. sql was (insert into Events ( MonitorId, Name, StartTime, Width, Height, Cause, Notes, StateId, Videoed ) values ( 12, 'New Event', from_unixtime( 1506348169 ), 640, 320, 'Continuous', '', '2', '0' ))
error is on file zm_event.cpp line 78

it happen on all monitor.
Database is Uptodate and all other functionality seems to work fine
Anyone can help me?

Thanks
Production Zoneminder 1.31.4 Ubuntu 16.04 LTS on VmWare ESXi
6 Cameras FOSCAM FI8918W
OpenHab Integration
marcolino7
Posts: 73
Joined: Wed Sep 16, 2015 12:20 pm

Re: Can't insert event: Field 'DefaultVideo'

Post by marcolino7 »

Hi,
I fixed. For who have my issue solution is:

nano /etc/mysql/my.cnf

In the [mysqld] section add the following
sql_mode = NO_ENGINE_SUBSTITUTION

Regards
Production Zoneminder 1.31.4 Ubuntu 16.04 LTS on VmWare ESXi
6 Cameras FOSCAM FI8918W
OpenHab Integration
clisthenes
Posts: 2
Joined: Mon Sep 25, 2017 12:53 pm

Re: Can't insert event: Field 'DefaultVideo'

Post by clisthenes »

Thanks for posting this! I am also running 1.31.1 (built from source) and I have similar symptoms. Basically, as far as I can tell, everything works perfectly, except for that events are not recorded for any monitors (they are not entered into the database, nor are any image files generated for them). I do believe I already have "sql_mode = NO_ENGINE_SUBSTITUTION" set, but there may be some issue there, based on your findings. From what I have seen so far with my setup, it is clear that ZoneMinder / Apache have permissions to read/write from the database, as well as full access to the events directory on disk (as I can see it has created the appropriate structure there for new monitors, but just no events are logged).

I am guessing the issue you saw was fairly similar to what I described above.

Unfortunately I am traveling right now and can't try to check on this fix in my setup for a few more days. But I'll report my findings back here once I do.
Baylink
Posts: 338
Joined: Sun Jun 19, 2005 3:19 am

Re: Can't insert event: Field 'DefaultVideo'

Post by Baylink »

There are a number of places where mysql might be looking for my.cnf; you have to make sure you're changing the one it's reading.
Locked