addons icon indicating copy to clipboard operation
addons copied to clipboard

MariaDB not starting on 2022.8.2 , 3, & 4 betas

Open bschatzow opened this issue 3 years ago • 17 comments

Describe the issue you are experiencing

After the install the system reboots. When it comes back on line the Maria DB is not running. I need to manually restart MariaDB and then restart HA.

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

MariaDB

What is the version of the add-on?

2.5.1

Steps to reproduce the issue

  1. Install 2022.8 (beta 2 and beyond)
  2. After restart, Mariadb is not starting.
  3. Not sure why it stopped?

...

Anything in the Supervisor logs that might be useful for us?

Nothing in logs other than recorder related stuff.

Anything in the add-on logs that might be useful for us?

Logs are empty.

Additional information

No response

bschatzow avatar Aug 01 '22 01:08 bschatzow

Same. Mosquitoes won't start either

JoshWobbles avatar Aug 03 '22 16:08 JoshWobbles

If you're on the beta then you're also on the beta version of supervisor (2022.07.1 right?). If so this issue was reported, where some addon appear to not be running but are actually running: https://github.com/home-assistant/supervisor/issues/3761

I just put in a fix for it and will be putting out a new beta for supervisor momentarily. Does that describe your situation? Is MariaDB actually running just the UI shows it is not?

For reference if MariaDB was actually not running you would know immediately assuming you have set up recorder to use it. Your core logs would be absolutely swamped with errors about failing to write history.

mdegat01 avatar Aug 04 '22 16:08 mdegat01

Maria was not started or running. Lots of errors in the logs. I think maybe it was a corruption in the DB as I had other issues. I am in the process of rebuilding my installation. First time in a very long time that restoring my backup didn't get me running quickly.

bschatzow avatar Aug 04 '22 17:08 bschatzow

i am not on betas versions, but i have the same problem and there is an error message : ERROR: Got unexpected response from the API: There is already a MySQL service in use from core_mariadb

the addon doent start anymore automaticaly i have to manually start the addon, then restart Ha, and it work for a few hours then crash again.

my config :

recorder: db_url: mysql://your_login:your_password@core-mariadb/hadb?charset=utf8mb4 db_max_retries: 1 include: domains: - sensor - binary_sensor - switch - light - fan - media_player - alarm_control_panel

Electronlibre2012 avatar Aug 14 '22 06:08 Electronlibre2012

The same issue, it stops every few hours and when you start it again it shows the error mentioned above.

Wampukas avatar Aug 15 '22 06:08 Wampukas

Here the same issue.

kipfel avatar Aug 15 '22 08:08 kipfel

hello, the addon crash every day at 2 am when its backing up...i use google drive backup addon

Electronlibre2012 avatar Aug 15 '22 19:08 Electronlibre2012

Seems to be a Google Drive Backup problem: https://github.com/sabeechen/hassio-google-drive-backup/issues/682

sniner avatar Aug 15 '22 20:08 sniner

I still have this bug with the latest vestion of Google Drive Backup as mentionned above, when I reboot Home Assistant host I have to restart manually MariaDB and then restart Home Assistant

ghost58400 avatar Aug 20 '22 16:08 ghost58400

@bschatzow if the db is corrupted in the backup then restoring it isn't going to go well. But there should definitely be something in the addons logs if that's the case. If you can't see the logs in the UI then could you give this a try: https://community.home-assistant.io/t/how-to-get-to-your-log-after-restart-restore/387662 . It works for addons as well as core logs.

For those using the Google drive addon, do you tell that addon to stop the Mariadb addon before taking a backup? If so then don't do that. That is the solution on the linked bug. There's no reason to stop the addon prior to backing it up, the addon already has a freeze feature for that and it's more efficient.

mdegat01 avatar Aug 22 '22 13:08 mdegat01

@mdegat01 Thank you for responding. I have no idea if the db was corrupt or not. I do know that on each restart of HA after 8.2 I had to manually restart Mariadb, then restart HA and that fixed the issue. I was not seeing errors in the Mariadb log or HA log relating to this. The errors in HA had to do with recorder as the DB was not started.

I have started a clean install (again) (not from a backup) and I'll get back to this issue on the next update (either now working, or not working)

As to the Google drive addon, I was stopping the MariaDB addon as that was the suggestion to keep the DB from getting corrupted. Per your suggestion I will make sure it is not stopped prior to the backup.

bschatzow avatar Aug 22 '22 19:08 bschatzow

Same issue here...on reboot MariaDB does not successfully start causing also Nginx, mosquitto and z2m to fail. The error it throws in the logs is just a generic "unknown HTTP error occured". Manually restarting MariaDB and all the other addons afterwards is the only temporary fix i found. I also use google drive backup on latest version...but i never activated "stop addons before backup"

ob1w4nken0b1 avatar Aug 24 '22 10:08 ob1w4nken0b1

Same issue, moreover database purge 100% load one of cpu cores for a days!!! If I restart addon - cpu utilisation back to normal, but any next attempt of purge - same problem. Nothing critical in logs btw. Screenshot_2022-08-31-08-00-54-396_com android chrome Screenshot_2022-08-31-08-04-41-168_com android chrome Screenshot_2022-08-31-08-32-46-013_com android chrome

DmytroKorniienko avatar Aug 31 '22 04:08 DmytroKorniienko

Having the same/similar issue. Getting crashes every so often due to MariaDB becoming unavailable. Add-on shows that MariaDB is not running and can't get it to "start" but HA IS using it. Reinstalling MariaDB doesn't work; no error logs from MariaDB either.

Same time frame. Not in beta. Home Assistant 2022.8.7 Supervisor 2022.08.5 Operating System 8.5 Frontend 20220802.0 - latest

MariaDB Current version: 2.5.1

Edit: Just had VS code Add-on do the same thing but it is not running. Studio Code ServerCurrent version: 5.3.0

Same with SSH & Web Terminal Current version: 12.0.2

KoleBarnes avatar Aug 31 '22 19:08 KoleBarnes

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Sep 30 '22 20:09 github-actions[bot]

Will test again on next restore. I have no idea if anyone has looked at this issue.

bschatzow avatar Oct 04 '22 18:10 bschatzow

I had the issue yesterday with fully up-to-date system so I think it is not fixed

ghost58400 avatar Oct 04 '22 18:10 ghost58400

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 03 '22 19:11 github-actions[bot]