Unknown Column ONVIF_URL (Solved)

Forum for questions and support relating to 1.35.x development only.
Post Reply
adtopkek
Posts: 3
Joined: Mon May 25, 2020 2:54 am

Unknown Column ONVIF_URL (Solved)

Post by adtopkek » Mon May 25, 2020 3:29 am

I tried adding a USB camera on a fresh install (Both OS and ZM). Fails to add and throws this error in the logs. What do?

Version: v1.35.4

Installed on Ubuntu Server 20.04 LTS
05/24/20 23:13:09.282725 web_php[2003].ERR [192.168.1.121] [SQL-ERR 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ONVIF_URL' in 'field list'', statement was 'INSERT INTO Monitors (`Id`, `Name`, `Notes`, `ServerId`, `StorageId`, `Type`, `Function`, `Enabled`, `LinkedMonitors`, `Triggers`, `ONVIF_URL`, `ONVIF_Username`, `ONVIF_Password`, `ONVIF_Options`, `Device`, `Channel`, `Format`, `V4LMultiBuffer`, `V4LCapturesPerFrame`, `Protocol`, `Method`, `Host`, `Port`, `SubPath`, `Path`, `Options`, `User`, `Pass`, `Width`, `Height`, `Colours`, `Palette`, `Orientation`, `Deinterlacing`, `DecoderHWAccelName`, `DecoderHWAccelDevice`, `SaveJPEGs`, `VideoWriter`, `OutputCodec`, `OutputContainer`, `EncoderParameters`, `RecordAudio`, `RTSPDescribe`, `Brightness`, `Contrast`, `Hue`, `Colour`, `EventPrefix`, `LabelFormat`, `LabelX`, `LabelY`, `LabelSize`, `ImageBufferCount`, `WarmupCount`, `PreEventCount`, `PostEventCount`, `StreamReplayBuffer`, `AlarmFrameCount`, `SectionLength`, `MinSectionLength`, `FrameSkip`, `MotionFrameSkip`, `AnalysisFPSLimit`, `AnalysisUpdateDelay`, `MaxFPS`, `AlarmMaxFPS`, `FPSReportInterval`, `RefBlendPerc`, `AlarmRefBlendPerc`, `Controllable`, `ControlId`, `ControlDevice`, `ControlAddress`, `AutoStopTimeout`, `TrackMotion`, `TrackDelay`, `ReturnLocation`, `ReturnDelay`, `DefaultRate`, `DefaultScale`, `SignalCheckPoints`, `SignalCheckColour`, `WebColour`, `Exif`, `Sequence`, `ZoneCount`, `Refresh`, `DefaultCodec`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' params:,Monitor-1,,0,0,Local,Mocord,1,,,,,,,/dev/video1,0,255,,1,,v4l2,,,,,,,,1280,800,4,1448695129,ROTATE_0,0,,,3,0,,,# Lines beginning with # are a comment
# For changing quality, use the crf option
# 1 is best, 51 is worst quality
#crf=23,0,0,-1,-1,-1,-1,Event-,%N - %d/%m/%y %H:%M:%S,0,0,1,20,0,5,5,0,1,600,10,0,0,,0,,,100,6,6,0,,,,,0,,-1,,100,100,0,#0000be,#1b46dc,0,1,0,,auto] at /usr/share/zoneminder/www/includes/database.php line 152
05/24/20 23:13:09.856026 web_php[2003].ERR [192.168.1.121] [Error saving new Monitor.] at /usr/share/zoneminder/www/includes/actions/monitor.php line 224
From MySQL:

Code: Select all

mysql> describe Monitors;
+------------------------+-----------------------------------------------------------------------------------+------+-----+------------------------+----------------+
| Field                  | Type                                                                              | Null | Key | Default                | Extra          |
+------------------------+-----------------------------------------------------------------------------------+------+-----+------------------------+----------------+
| Id                     | int unsigned                                                                      | NO   | PRI | NULL                   | auto_increment |
| Name                   | varchar(64)                                                                       | NO   |     |                        |                |
| Notes                  | text                                                                              | YES  |     | NULL                   |                |
| ServerId               | int unsigned                                                                      | YES  | MUL | NULL                   |                |
| StorageId              | smallint unsigned                                                                 | YES  |     | 0                      |                |
| Type                   | enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket','VNC') | NO   |     | Local                  |                |
| Function               | enum('None','Monitor','Modect','Record','Mocord','Nodect')                        | NO   |     | Monitor                |                |
| Enabled                | tinyint unsigned                                                                  | NO   |     | 1                      |                |
| LinkedMonitors         | varchar(255)                                                                      | YES  |     | NULL                   |                |
| Triggers               | set('X10')                                                                        | NO   |     |                        |                |
| Device                 | tinytext                                                                          | NO   |     | NULL                   |                |
| Channel                | tinyint unsigned                                                                  | NO   |     | 0                      |                |
| Format                 | int unsigned                                                                      | NO   |     | 0                      |                |
| V4LMultiBuffer         | tinyint unsigned                                                                  | YES  |     | NULL                   |                |
| V4LCapturesPerFrame    | tinyint unsigned                                                                  | YES  |     | NULL                   |                |
| Protocol               | varchar(16)                                                                       | YES  |     | NULL                   |                |
| Method                 | varchar(16)                                                                       | YES  |     |                        |                |
| Host                   | varchar(64)                                                                       | YES  |     | NULL                   |                |
| Port                   | varchar(8)                                                                        | NO   |     |                        |                |
| SubPath                | varchar(64)                                                                       | NO   |     |                        |                |
| Path                   | varchar(255)                                                                      | YES  |     | NULL                   |                |
| Options                | varchar(255)                                                                      | YES  |     | NULL                   |                |
| User                   | varchar(64)                                                                       | YES  |     | NULL                   |                |
| Pass                   | varchar(64)                                                                       | YES  |     | NULL                   |                |
| Width                  | smallint unsigned                                                                 | NO   |     | 0                      |                |
| Height                 | smallint unsigned                                                                 | NO   |     | 0                      |                |
| Colours                | tinyint unsigned                                                                  | NO   |     | 1                      |                |
| Palette                | int unsigned                                                                      | NO   |     | 0                      |                |
| Orientation            | enum('ROTATE_0','ROTATE_90','ROTATE_180','ROTATE_270','FLIP_HORI','FLIP_VERT')    | NO   |     | ROTATE_0               |                |
| Deinterlacing          | int unsigned                                                                      | NO   |     | 0                      |                |
| DecoderHWAccelName     | varchar(64)                                                                       | YES  |     | NULL                   |                |
| DecoderHWAccelDevice   | varchar(255)                                                                      | YES  |     | NULL                   |                |
| SaveJPEGs              | tinyint                                                                           | NO   |     | 3                      |                |
| VideoWriter            | tinyint                                                                           | NO   |     | 0                      |                |
| OutputCodec            | enum('h264','mjpeg','mpeg1','mpeg2')                                              | YES  |     | NULL                   |                |
| OutputContainer        | enum('auto','mp4','mkv')                                                          | YES  |     | NULL                   |                |
| EncoderParameters      | text                                                                              | YES  |     | NULL                   |                |
| RecordAudio            | tinyint                                                                           | NO   |     | 0                      |                |
| RTSPDescribe           | tinyint unsigned                                                                  | YES  |     | NULL                   |                |
| Brightness             | mediumint                                                                         | NO   |     | -1                     |                |
| Contrast               | mediumint                                                                         | NO   |     | -1                     |                |
| Hue                    | mediumint                                                                         | NO   |     | -1                     |                |
| Colour                 | mediumint                                                                         | NO   |     | -1                     |                |
| EventPrefix            | varchar(32)                                                                       | NO   |     | Event-                 |                |
| LabelFormat            | varchar(64)                                                                       | YES  |     | %N - %y/%m/%d %H:%M:%S |                |
| LabelX                 | smallint unsigned                                                                 | NO   |     | 0                      |                |
| LabelY                 | smallint unsigned                                                                 | NO   |     | 0                      |                |
| LabelSize              | smallint unsigned                                                                 | NO   |     | 1                      |                |
| ImageBufferCount       | smallint unsigned                                                                 | NO   |     | 100                    |                |
| WarmupCount            | smallint unsigned                                                                 | NO   |     | 25                     |                |
| PreEventCount          | smallint unsigned                                                                 | NO   |     | 10                     |                |
| PostEventCount         | smallint unsigned                                                                 | NO   |     | 10                     |                |
| StreamReplayBuffer     | int unsigned                                                                      | NO   |     | 1000                   |                |
| AlarmFrameCount        | smallint unsigned                                                                 | NO   |     | 1                      |                |
| SectionLength          | int unsigned                                                                      | NO   |     | 600                    |                |
| MinSectionLength       | int unsigned                                                                      | NO   |     | 10                     |                |
| FrameSkip              | smallint unsigned                                                                 | NO   |     | 0                      |                |
| MotionFrameSkip        | smallint unsigned                                                                 | NO   |     | 0                      |                |
| AnalysisFPSLimit       | decimal(5,2)                                                                      | YES  |     | NULL                   |                |
| AnalysisUpdateDelay    | smallint unsigned                                                                 | NO   |     | 0                      |                |
| MaxFPS                 | decimal(5,2)                                                                      | YES  |     | NULL                   |                |
| AlarmMaxFPS            | decimal(5,2)                                                                      | YES  |     | NULL                   |                |
| FPSReportInterval      | smallint unsigned                                                                 | NO   |     | 250                    |                |
| RefBlendPerc           | tinyint unsigned                                                                  | NO   |     | 6                      |                |
| AlarmRefBlendPerc      | tinyint unsigned                                                                  | NO   |     | 6                      |                |
| Controllable           | tinyint unsigned                                                                  | NO   |     | 0                      |                |
| ControlId              | int unsigned                                                                      | YES  |     | NULL                   |                |
| ControlDevice          | varchar(255)                                                                      | YES  |     | NULL                   |                |
| ControlAddress         | varchar(255)                                                                      | YES  |     | NULL                   |                |
| AutoStopTimeout        | decimal(5,2)                                                                      | YES  |     | NULL                   |                |
| TrackMotion            | tinyint unsigned                                                                  | NO   |     | 0                      |                |
| TrackDelay             | smallint unsigned                                                                 | YES  |     | NULL                   |                |
| ReturnLocation         | tinyint                                                                           | NO   |     | -1                     |                |
| ReturnDelay            | smallint unsigned                                                                 | YES  |     | NULL                   |                |
| DefaultRate            | smallint unsigned                                                                 | NO   |     | 100                    |                |
| DefaultScale           | smallint unsigned                                                                 | NO   |     | 100                    |                |
| DefaultCodec           | enum('auto','MP4','MJPEG')                                                        | NO   |     | auto                   |                |
| SignalCheckPoints      | int unsigned                                                                      | NO   |     | 0                      |                |
| SignalCheckColour      | varchar(32)                                                                       | NO   |     | #0000BE                |                |
| WebColour              | varchar(32)                                                                       | NO   |     | red                    |                |
| Exif                   | tinyint unsigned                                                                  | NO   |     | 0                      |                |
| Sequence               | smallint unsigned                                                                 | YES  |     | NULL                   |                |
| TotalEvents            | int                                                                               | YES  |     | NULL                   |                |
| TotalEventDiskSpace    | bigint                                                                            | YES  |     | NULL                   |                |
| HourEvents             | int                                                                               | YES  |     | NULL                   |                |
| HourEventDiskSpace     | bigint                                                                            | YES  |     | NULL                   |                |
| DayEvents              | int                                                                               | YES  |     | NULL                   |                |
| DayEventDiskSpace      | bigint                                                                            | YES  |     | NULL                   |                |
| WeekEvents             | int                                                                               | YES  |     | NULL                   |                |
| WeekEventDiskSpace     | bigint                                                                            | YES  |     | NULL                   |                |
| MonthEvents            | int                                                                               | YES  |     | NULL                   |                |
| MonthEventDiskSpace    | bigint                                                                            | YES  |     | NULL                   |                |
| ArchivedEvents         | int                                                                               | YES  |     | NULL                   |                |
| ArchivedEventDiskSpace | bigint                                                                            | YES  |     | NULL                   |                |
| ZoneCount              | tinyint                                                                           | NO   |     | 0                      |                |
| Refresh                | int unsigned                                                                      | YES  |     | NULL                   |                |
+------------------------+-----------------------------------------------------------------------------------+------+-----+------------------------+----------------+
96 rows in set (0.01 sec)
Last edited by adtopkek on Tue May 26, 2020 2:40 am, edited 1 time in total.

User avatar
iconnor
Posts: 1325
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Unknown Column ONVIF_URL

Post by iconnor » Mon May 25, 2020 1:22 pm

You need to do:
mysql -u zmuser -p zm < /usr/share/zoneminder/db/zm_update-1.35.4.sql

rockedge
Posts: 1154
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Unknown Column ONVIF_URL

Post by rockedge » Mon May 25, 2020 4:43 pm

Hello Ic0n,

once in awhile on some systems right after installing ZM and importing the zm_create.sql I also need to install the very last zm_update.sql manually and that fixes these errors. Only on some systems though and I thought since I'm mostly installing ZM on the outer fringes operating systems that this was the case occasionally. This will happen on these OS's even it the zm_create.sql runs is imported successfully..but only sometimes. It works in the end is what is important.

adtopkek
Posts: 3
Joined: Mon May 25, 2020 2:54 am

Re: Unknown Column ONVIF_URL

Post by adtopkek » Tue May 26, 2020 2:39 am

iconnor wrote:
Mon May 25, 2020 1:22 pm
You need to do:
mysql -u zmuser -p zm < /usr/share/zoneminder/db/zm_update-1.35.4.sql
Worked! Thanks!

Password can be found at: /etc/zm/zm.conf
Was set to zmpass by default.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest