Mysql error on startup in latest docker image

Hello,
I have been on leave from work for 4.5 months, due the illness and eventual death of a family member.

However, I’m back now, and after trying to update the docker image and host system for the first time since mid January, the stack wouldn’t all come back up - everything works except mysql container.

Logs show only one error line that I can see:

[ERROR] [MY-000067] [Server] unknown variable ‘default-authentication-plugin=mysql_native_password’

In addition, bc-server says:

E(): Could not open database after 30 tries, aborting
bc-server exited with code 0

This seems to be causing mysql container to reboot constantly.

Any ideas as to how to fix?

Backup the ‘database’ directory in bluecherry-docker directory and then try to upgrade to the latest docker image. Edit docker-compose.yml and change bluecherrydvr/bluecherry:latest to bluecherrydvr/bluecherry:master

then run:

sudo docker compose down
sudo docker compose pull
sudo docker compose up -d

That should bring you up to Bluecherry 3.1.1, let me know if the issue is resolved.

Ok, just saw your response.

Just tried it, but gave the same message.

Did some more sleuthing.

Found my 256 GB SSD was full - it shouldn’t been nearly so full.

Somehow, the recordings mapping was changed from my manually set /mnt/recordings back to the default of ./recordings. I have a 2 TB drive specifically for recordings. The last recording on that drive was from January 17th. I’m not certain how I managed to screw that up.

Also, more annoying, is that the mysql server version specified in my compose file didn’t match the version specified in the github copy. My said mysql:latest. I might be tempted to try to downgrade my DB back to 8.0, but none of the recordings would survive, as the ssd where the recent recordings were only held about 24 hours of video.

Point here, is: How do I reset my database and recordings, without tossing out my camera setup and UI settings? I don’t want to restart completely from scratch. I just need to purge all recording data. Eh, or are my settings in the SQL DB also?

Ok. I blew away my entire setup. I re-setup by cloning the Github repo. I copied the example .env and .mailenv file and configured the parameters for each. I changed the docker-compose.yml file to specify the master bluecherry-docker branch, instead of latest. All containers go “up” just fine, but unable to access the WebUI after 12 hours.

Logs show only 1 error:

bc-server[31]: E(): Could not open database after 30 tries, aborting
bc-server Update MySQL’s my.cnf from environment variables passed in from docker
bc-server Writing /root/.my.cnf
bc-server Update bluecherry server’s bluecherry.conf from environment variables passed in from docker
bc-server Writing /etc/bluecherry.conf
bc-server chown bluecherry:bluecherry /var/lib/bluecherry/recordings
bc-server /usr/sbin/rsyslogd

Server container restarts about every 30 seconds or so.

This is what I get when I try to browse the IP address from another PC on the same LAN, on port 7001:

{“status”:“unavailable”,“msg”:[“Fatal error: could not connect to the database: “],“data”:””}

I got it working a few days ago. The problem was twofold: I was trying to run OnlyOffice community server in Docker also, which was running its own mysql 8 server on port 3306. I had to stop that stack until I have time to figure out either how to run one or the other on a different port, or use the same MySQL instance for both databases. The other issue was that I had forgotten the correct method to do a fresh install. There is an install script on the download page on Bluecherry’s main web site. I have tested out so many different projects, that I thought I was supposed to just clone the repo and then bring up the stack with “docker compose up -d” (after configuring env files).

Now, I just have to re-discover the RTSP path of the existing DVR from which I am pulling the streams.