Cycle issue

Forum for questions and support relating to the 1.30.x releases only.
Locked
nikc
Posts: 8
Joined: Tue Sep 27, 2016 8:30 am

Cycle issue

Post by nikc »

Hi

I have my cameras working nicely now in my lab, but there is one niggling issue .... when I go to cycle or Montage I get no image from the camera and the following error in the logs:

Code: Select all

2016-10-04 09:14:54.057918	zms		8870	ERR	Can't use query result:	zm_monitor.cpp	2692

2016-10-04 09:14:54.050068	zms		8870	ERR	Bogus number of lines return from query, 0 returned for query select Id, Name, ServerId, Type, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Protocol, Method, Host, Port, Path, Options, User, Pass, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, RTSPDescribe, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, LabelSize, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, AnalysisFPS, AnalysisUpdateDelay, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour, Exif from Monitors where Id = 0.	zm_db.cpp	10
I built from the guide that shows how to incorporate MariaDB here https://wiki.zoneminder.com/Ubuntu_Serv ... Zoneminder

I dont think part has ever worked.

Any ideas please ?

Thanks
bbunge
Posts: 2975
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Cycle issue

Post by bbunge »

By any chance did you forget to set PATH_ZMS to /zm/cgi-bin/nph-zms
bb
nikc
Posts: 8
Joined: Tue Sep 27, 2016 8:30 am

Re: Cycle issue

Post by nikc »

bbunge wrote:By any chance did you forget to set PATH_ZMS to /zm/cgi-bin/nph-zms
bb
Nope thats set correctly :(
bbunge
Posts: 2975
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Cycle issue

Post by bbunge »

Hmm... I have a test system running using the same procedure. No problems here...

Did you "fix" permissions in the two places cited?
Are you running any Apache customization's?
You did a fresh install and not an upgrade?

Just for kicks, go over the instructions to make sure you did not skip anything: https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.30.0
nikc
Posts: 8
Joined: Tue Sep 27, 2016 8:30 am

Re: Cycle issue

Post by nikc »

Went through the permissions on the install and validated all the settings again, still the same issue :(

100% clean install ...nothing else running on the box.
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Cycle issue

Post by knight-of-ni »

This sounds like one of the symptoms you get when you don't set NO_ENGINE_SUBSTITUTION per the instructions.

- Verify you really are running Mariadb
- Verify you have apt-get purged all the mysql packages, rather than simply uninstalled them
- Double check there are no config files from the mysql package still on your system under /etc/mysql
- Verify you can log into the database from the command line, using the zoneminder credentials, and verify you get valid results when you SELECT * FROM Monitors
- The instructions you referenced are for converting an existing mysql dB to mariadb. Try the other mariadb instructions for installing mariadb and then installing a new, empty database
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
nikc
Posts: 8
Joined: Tue Sep 27, 2016 8:30 am

Re: Cycle issue

Post by nikc »

All looks good:

Code: Select all

Database changed
[b]MariaDB [zm]>[/b] SELECT * FROM Monitors;
+----+---------+----------+--------+----------+---------+----------------+----------+-------------+---------+--------+----------------+---------------------+----------+---------+-------------------------------------------------+------+---------+--------------------------------------------+---------+------+------+-------+--------+---------+---------+-------------+---------------+--------------+------------+----------+-----+--------+-------------+------------------------+--------+--------+-----------+------------------+-------------+---------------+----------------+--------------------+-----------------+---------------+-----------+-----------------+-------------+---------------------+--------+-------------+-------------------+--------------+-------------------+--------------+-----------+---------------+----------------+-----------------+-------------+------------+----------------+-------------+-------------+-------------+--------------+-------------------+-----------+------+----------+
| Id | Name    | ServerId | Type   | Function | Enabled | LinkedMonitors | Triggers | Device      | Channel | Format | V4LMultiBuffer | V4LCapturesPerFrame | Protocol | Method  | Host                                            | Port | SubPath | Path                                       | Options | User | Pass | Width | Height | Colours | Palette | Orientation | Deinterlacing | RTSPDescribe | Brightness | Contrast | Hue | Colour | EventPrefix | LabelFormat            | LabelX | LabelY | LabelSize | ImageBufferCount | WarmupCount | PreEventCount | PostEventCount | StreamReplayBuffer | AlarmFrameCount | SectionLength | FrameSkip | MotionFrameSkip | AnalysisFPS | AnalysisUpdateDelay | MaxFPS | AlarmMaxFPS | FPSReportInterval | RefBlendPerc | AlarmRefBlendPerc | Controllable | ControlId | ControlDevice | ControlAddress | AutoStopTimeout | TrackMotion | TrackDelay | ReturnLocation | ReturnDelay | DefaultView | DefaultRate | DefaultScale | SignalCheckColour | WebColour | Exif | Sequence |
+----+---------+----------+--------+----------+---------+----------------+----------+-------------+---------+--------+----------------+---------------------+----------+---------+-------------------------------------------------+------+---------+--------------------------------------------+---------+------+------+-------+--------+---------+---------+-------------+---------------+--------------+------------+----------+-----+--------+-------------+------------------------+--------+--------+-----------+------------------+-------------+---------------+----------------+--------------------+-----------------+---------------+-----------+-----------------+-------------+---------------------+--------+-------------+-------------------+--------------+-------------------+--------------+-----------+---------------+----------------+-----------------+-------------+------------+----------------+-------------+-------------+-------------+--------------+-------------------+-----------+------+----------+
|  3 | hd      |        0 | Ffmpeg | Monitor  |       1 |                |          | /dev/video0 |       0 |    255 |              0 |                   1 |          | rtpRtsp | http://192.168.88.215:2000/onvif/device_service | 80   |         | rtsp://admin:****@192.168.88.215:554/av0_0 |         |      |      |  2560 |   1440 |       4 |       0 | 0           |             0 |            0 |         -1 |       -1 |  -1 |     -1 | Event-      | %N - %d/%m/%y %H:%M:%S |      0 |      0 |         2 |               50 |          25 |            25 |             25 |               1000 |               1 |           600 |         0 |               0 |        0.00 |                   0 |   0.00 |        0.00 |              1000 |            6 |                 6 |            0 |         0 | NULL          | NULL           |            NULL |           0 |          0 |             -1 |           0 | Events      |         100 |          100 | #0000c0           | red       |    0 |        1 |
|  4 | Camera2 |        0 | Ffmpeg | Monitor  |       1 |                |          | /dev/video0 |       0 |    255 |              0 |                   1 |          | rtpRtsp | http://192.168.88.213:2000/onvif/device_service | 80   |         | rtsp://admin:****@192.168.88.213:554/av0_0 |         |      |      |  2560 |   1440 |       4 |       0 | 0           |             0 |            0 |         -1 |       -1 |  -1 |     -1 | Event-      | %N - %d/%m/%y %H:%M:%S |      0 |      0 |         2 |               50 |          25 |            25 |             25 |               1000 |               1 |           600 |         0 |               0 |        0.00 |                   0 |   0.00 |        0.00 |              1000 |            6 |                 6 |            0 |         0 | NULL          | NULL           |            NULL |           0 |          0 |             -1 |           0 | Events      |         100 |          100 | #0000c0           | red       |    0 |        2 |
+----+---------+----------+--------+----------+---------+----------------+----------+-------------+---------+--------+----------------+---------------------+----------+---------+-------------------------------------------------+------+---------+--------------------------------------------+---------+------+------+-------+--------+---------+---------+-------------+---------------+--------------+------------+----------+-----+--------+-------------+------------------------+--------+--------+-----------+------------------+-------------+---------------+----------------+--------------------+-----------------+---------------+-----------+-----------------+-------------+---------------------+--------+-------------+-------------------+--------------+-------------------+--------------+-----------+---------------+----------------+-----------------+-------------+------------+----------------+-------------+-------------+-------------+--------------+-------------------+-----------+------+----------+
2 rows in set (0.00 sec)
I only have the 2 cameras.

NO_ENGINE_SUBSTITUTION is set, the instructions are followed where the ones to install the MariaDB opposed to upgrade.

Nik
bbunge
Posts: 2975
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Cycle issue

Post by bbunge »

NO_ENGINE_SUBSTITUTION is for MySQL 5.7 and later. Mariadb 10 needs no config changes at least at first.

If you are having issues with Ubuntu 16.04 drop back to 14.04-5 and install ZM 1.30.0 https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
nikc
Posts: 8
Joined: Tue Sep 27, 2016 8:30 am

Re: Cycle issue

Post by nikc »

Thanks.

I'd rather get to the bottom of the issue that start a fresh on an older version if I am honest.
sharkspear
Posts: 14
Joined: Mon Aug 08, 2016 3:07 pm

Re: Cycle issue

Post by sharkspear »

Thanks.

I'd rather get to the bottom of the issue that start a fresh on an older version if I am honest.
Have you solved it? Have the same issue know - appeared over night and eats all of my resources.
ubuntu 16.04 minimal with lamp-server and mysql 5.7

all suggested flaggs are set too.
rpress
Posts: 1
Joined: Thu Feb 09, 2017 6:50 pm

Re: Cycle issue

Post by rpress »

I have the same problem. I was able to fix the database error, but I still cannot see any video.

It was working fine before an update and then stopped working. I am using Debian sid.

The odd thing is that if I have a video window open, and then "killall nph-zms" it will show a couple frames of video before it dies. It's like it's getting stuck somehow.
sharkspear
Posts: 14
Joined: Mon Aug 08, 2016 3:07 pm

Re: Cycle issue

Post by sharkspear »

on debian I never had issues, but due to some gtkmm bugs and massive problems with x11 forwarding I needed to swap to ubuntu.
Feb 10 09:01:02 zms[32240]: ERR [Got empty memory map file size 0, is the zmc process for this monitor running?]
Feb 10 09:01:02 zms[32240]: ERR [Got signal 11 (Segmentation fault), crashing]
Feb 10 09:01:04 web_php[28567]: ERR [socket_sendto( /var/run/zm/zms-417255s.sock ) failed: No such file or directory]
Feb 10 09:01:04 web_php[28567]: ERR [getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-417255s.sock ) failed: No such file or directory - checkStreamForErrors()]
Feb 10 09:01:04 zms[32241]: ERR [Bogus number of lines return from query, 0 returned for query select Id, Name, ServerId, Type, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Protocol, Method, Host, Port, Path, Options, User, Pass, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, RTSPDescribe, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, LabelSize, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, AnalysisFPS, AnalysisUpdateDelay, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour, Exif from Monitors where Id = 4.]
Feb 10 09:01:04 zms[32241]: ERR [Can't use query result: ]
Feb 10 09:01:04 web_php[28567]: ERR [socket_sendto( /var/run/zm/zms-420726s.sock ) failed: Connection refused]
either socket_sendto error or zm_db errors .... and I tried all advices, played with shmmax, renice aso.

very frustrating.
Locked