Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MariaDB not starting on 2022.8.2 , 3, & 4 betas #2607

Closed
bschatzow opened this issue Aug 1, 2022 · 18 comments
Closed

MariaDB not starting on 2022.8.2 , 3, & 4 betas #2607

bschatzow opened this issue Aug 1, 2022 · 18 comments
Labels

Comments

@bschatzow
Copy link

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

@JoshWobbles
Copy link

Same. Mosquitoes won't start either

@mdegat01
Copy link
Contributor

mdegat01 commented Aug 4, 2022

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:
home-assistant/supervisor#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.

@bschatzow
Copy link
Author

bschatzow commented Aug 4, 2022

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.

@Electronlibre2012
Copy link

Electronlibre2012 commented Aug 14, 2022

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:https://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

@Wampukas
Copy link

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

@kipfel
Copy link

kipfel commented Aug 15, 2022

Here the same issue.

@Electronlibre2012
Copy link

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

@sniner
Copy link

sniner commented Aug 15, 2022

Seems to be a Google Drive Backup problem: sabeechen/hassio-google-drive-backup#682

@ghost58400
Copy link

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

@mdegat01
Copy link
Contributor

@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.

@bschatzow
Copy link
Author

@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.

@ob1w4nken0b1
Copy link

ob1w4nken0b1 commented Aug 24, 2022

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"

@DmytroKorniienko
Copy link

DmytroKorniienko commented Aug 31, 2022

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

@KoleBarnes
Copy link

KoleBarnes commented Aug 31, 2022

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

@github-actions
Copy link

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 github-actions bot added the stale label Sep 30, 2022
@bschatzow
Copy link
Author

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

@github-actions github-actions bot removed the stale label Oct 4, 2022
@ghost58400
Copy link

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

@github-actions
Copy link

github-actions bot commented Nov 3, 2022

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 github-actions bot added the stale label Nov 3, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests