Page 1 of 1

Can't insert event: Field 'DefaultVideo'

Posted: Mon Sep 25, 2017 2:18 pm
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

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

Posted: Mon Sep 25, 2017 3:38 pm
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

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

Posted: Tue Sep 26, 2017 9:54 pm
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.

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

Posted: Wed Sep 27, 2017 1:16 am
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.