Database doesn’t exist

Support for the docker image maintained by dlandon
Post Reply
chuck8530
Posts: 94
Joined: Sun Nov 21, 2021 2:45 am

Database doesn’t exist

Post by chuck8530 »

Beelink SER4, Ubuntu 22.04, Docker 20.10.23, Zoneminder 1.36.4

Every morning between 6 AM and 7AM Zoneminder attempts to do a DB something and is told the DB zm doesn’t exist. Mysql is up and running, show databases returns the other 4 mysql DB’s but not zm. So, I’ve created a cron job, every 5 min, “select count(*) cameras…” - if == 0 docker restart zoneminder.
Google has been no help. I:m at a loss. Suggestions please.
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: Database doesn’t exist

Post by burger »

chuck8530 wrote: Sun Mar 05, 2023 3:33 pm Mysql is up and running, show databases returns the other 4 mysql DB’s but not zm.
But the database is accessible any time other than 6-7AM?
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
chuck8530
Posts: 94
Joined: Sun Nov 21, 2021 2:45 am

Re: Database doesn’t exist

Post by chuck8530 »

Everything runs fine until (my crontab check every 5 min) 6:25, 6:15, 6:40, 6:20 ... If it was the same time every day - but it's different every day 6:XX. "DB zm doesn't exist"
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: Database doesn’t exist

Post by burger »

Just curious, What is the crontab check command you are running? This is an unusual use case, I'm just trying to understand what you are doing.
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
chuck8530
Posts: 94
Joined: Sun Nov 21, 2021 2:45 am

Re: Database doesn’t exist

Post by chuck8530 »

docker exec zoneminder bash /root/bin/ck.sql
runs: echo "select count(*) from Monitors;" | mysql -s zm

should return "7" but at 06:xx it returns "ERROR 1049 (42000): Unknown database 'zm' "
chuck8530
Posts: 94
Joined: Sun Nov 21, 2021 2:45 am

Re: Database doesn’t exist

Post by chuck8530 »

zmdc.log
03/09/23 06:11:56.490429 zmdc[14210].INF [ZMServer:411] ['zmc -m 7' started at 23/03/09 06:11:56]
03/09/23 06:11:56.544327 zmdc[463].ERR [ZMServer:708] ['zmc -m 7' exited abnormally, exit status 255]
03/09/23 06:13:16.623873 zmdc[463].INF [ZMServer:411] [Starting pending process, zmc -m 7]
03/09/23 06:13:16.625734 zmdc[463].ERR [ZoneMinder::Database:113] [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
dougmccrary
Posts: 1215
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Database doesn’t exist

Post by dougmccrary »

Wild guess here. Maybe something to do with DST, or lack thereof? IOW, some time discrepancy?
That's all that would seem to involve a single hour. Yeah, I realize it's erratic, but still...
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Database doesn’t exist

Post by Magic919 »

What do the MySQL logs say?
-
Post Reply