Cannot start Mariadb again, and getting error

Hi all,

cannot start Mariadb again, and getting ERROR: Got unexpected response from the API: There is already a MySQL service in use from core mariadb

I tried uninstalled and install again, same thing

any help please on this issue

1 Like

Same problem : when i restart HA, MariaDb doesnt start, i have to manually start it.

EDIT : i unsinstall, reinstall, restart 2 times and all is ok.

@nawafbana perhaps you need to uninstall, restart HA, reinstall, and restart again.

What is your MariaDb config?

mine is :

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

Strange, it is working fine now without doing anything…

I have not configure it yet for history recording, actually I am using it for remote access using Nginx Proxy Manager & DuckDNS for both http & https :slight_smile:

not good from myside…recorder stop working…

need to manually start it from addon page and then restart HA…

dont understand what happened

still the error in the log :

ERROR: Got unexpected response from the API: There is already a MySQL service in use from core_mariadb

Started having the same exact problem on my end out of the blue

Same here. It started last December. I have the feeling that there are to many records in the recorder.

I have the same error but I’m not using MariaDB for the recorder (just for NginxProxyManager). So I don’t think it’s the size of the recorder. I don’t actually know what would happen if I used the recorder, NPM works fine though despite the error.
The error is further discussed here There is already a MySQL service in use from core_mariadb · Issue #2742 · home-assistant/addons · GitHub but no solution has been found yet. No word from the developers yet.
For me the error appears when I stop/restart MariaDB from within HA. If I reboot the whole machine, the error does not appear. I don’t know what to make of it.

1 Like

I just ran into this problem on an old install that keeps the database fairly small (I use influx for longer storage). The first thing I noticed was HA starting to fail at taking a full snapshot. Today I dug into it and found several errors in mariadb logs like this:

[Warning] Aborted connection 27 to db: 'homeassistant' user: 'meh' host: '172.30.32.1' (Got an error reading communication packets)

So I uninstalled mariadb, reinstalled it, copy/pasted my config over, restarted, and noticed access errors in the logs. After more digging I find it’s from a misconfiguration:

databases:
  - homeassistant
logins:
  - username: "!secrets mariadb_user"
    password: "!secrets mariadb_password"
rights:
  - username: "!secrets mariadb_user"
    database: homeassistant

Weird how it worked before… regardless, changing the secrets to secret got mariadb, recorder, history, etc working again and surviving restarts. However, now every time I restart I see a single error line in MariaDB logs, the same one everyone else is posting about on this thread.

ERROR: Got unexpected response from the API: There is already a MySQL service in use from core mariadb

I also have no clue if this error should be ignored or what. Any advice or insight is much appreciated.

[edit: Oops… I think I posted too soon. I just noticed that error line was almost an hour old, and restarting mariadb just kept bringing the same lines in the webui. So I rebooted, and now the error no longer appears. Case closed on my end.]