[Partially solved] "Can't run query Select" after update to 1.36.35

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
barto.il.perso
Posts: 2
Joined: Fri Mar 07, 2025 7:33 am

[Partially solved] "Can't run query Select" after update to 1.36.35

Post by barto.il.perso »

Hello all. Hopefully someone can help or point me in the right direction. I attempted to do a simple system upgrade today, trying to fix some issues on my Ubuntu 20.04 server, and updating to the newest version of ZoneMinder was on my todo list.

I had some issues though, and for some reason, the install froze. After many, many, many attempts with using zmupdate.pl -f, as well as restarts and renaming the update files, as per another post I found (not that I can remember where, and my history is now a mess of trying to troubleshoot).

I now have ZoneMinder running - ish. I've got the web interface up, and in my MySQL tables I can see all the monitors that should be there, however in my logs I'm flooded with:
Can't use query result (zm_monitor.cpp line 904)
No monitors found (zmc.cpp line 214)
and the one I think is the root of the problem:

Code: Select all

	Can't run query: SELECT `Id`, `Name`, `ServerId`, `StorageId`, `Type`, `Function`+0, `Enabled`, `DecodingEnabled`, `LinkedMonitors`, `AnalysisFPSLimit`, `AnalysisUpdateDelay`, `MaxFPS`, `AlarmMaxFPS`,`Device`, `Channel`, `Format`, `V4LMultiBuffer`, `V4LCapturesPerFrame`, `Protocol`, `Method`, `Options`, `User`, `Pass`, `Host`, `Port`, `Path`, `SecondPath`, `Width`, `Height`, `Colours`, `Palette`, `Orientation`+0, `Deinterlacing`, `DecoderHWAccelName`, `DecoderHWAccelDevice`, `RTSPDescribe`, `SaveJPEGs`, `VideoWriter`, `EncoderParameters`, `OutputCodec`, `Encoder`, `OutputContainer`, `RecordAudio`, `Brightness`, `Contrast`, `Hue`, `Colour`, `EventPrefix`, `LabelFormat`, `LabelX`, `LabelY`, `LabelSize`,`ImageBufferCount`, `MaxImageBufferCount`, `WarmupCount`, `PreEventCount`, `PostEventCount`, `StreamReplayBuffer`, `AlarmFrameCount`, `SectionLength`, `MinSectionLength`, `FrameSkip`, `MotionFrameSkip`, `FPSReportInterval`, `RefBlendPerc`, `AlarmRefBlendPerc`, `TrackMotion`, `Exif`,`RTSPServer`, `RTSPStreamName`,`SignalCheckPoints`, `SignalCheckColour`, `Importance`-1 FROM `Monitors` WHERE Id=28 rc:1, reason:
with no reason listed. I've tried removing and reinstalling, as well as many other restarts, and attempts at fixing with running update scripts, but I'm very much at a loss. Hopefully someone has an idea?
Thanks!
Last edited by barto.il.perso on Fri Mar 07, 2025 8:16 pm, edited 1 time in total.
barto.il.perso
Posts: 2
Joined: Fri Mar 07, 2025 7:33 am

Re: "Can't run query Select" after update to 1.36.35

Post by barto.il.perso »

I partially got it working. Ended up running

Code: Select all

mysql -u zmuser -p zm <  /usr/share/zoneminder/db/zm_update-1.35.11
I'm sure there's a way to look this up, possibly grep, however is there an easily searchable changelog that I've missed somewhere that could help with the number of forum posts about something being broken, where running the sql update fixes the issue?

Also, I'm sure there is a downside to this, but in my quest to troubleshoot this at 2am (after being at work since noon haha) I ran pretty much every zm_update.sql there was after a certain point, looking for changes to my error logs with each one. How much could I break by having done such a thing?
User avatar
burger
Posts: 472
Joined: Mon May 11, 2020 4:32 pm

Re: [Partially solved] "Can't run query Select" after update to 1.36.35

Post by burger »

You should have nightly config database backups. And it's easy to restore/rebuild the database. You might've been able to do that, to save some time. See: https://wiki.zoneminder.com/MySQL
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Post Reply