addon-phpmyadmin icon indicating copy to clipboard operation
addon-phpmyadmin copied to clipboard

Unable to start phpmyadmin

Open TimovT opened this issue 1 year ago • 12 comments

Hello,

I have installed the phpmyadmin add on but it is not starting. See below log file.


Add-on: phpMyAdmin A web interface for the official MariaDB add-on

Add-on version: 0.11.1 You are running the latest version of this add-on. System: Home Assistant OS 14.2 (aarch64 / yellow) Home Assistant Core: 2025.3.3 Home Assistant Supervisor: 2025.03.3

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service init-phpmyadmin: starting s6-rc: info: service init-nginx: starting s6-rc: info: service init-nginx successfully started [08:42:29] ERROR: Got unexpected response from the API: Service not enabled s6-rc: warning: unable to start service init-phpmyadmin: command exited 128 /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information. /run/s6/basedir/scripts/rc.init: fatal: stopping the container. s6-rc: info: service init-nginx: stopping s6-rc: info: service init-nginx successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service base-addon-log-level: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

TimovT avatar Mar 17 '25 07:03 TimovT

Same issue here Please see logs below, if more information needed, feel free to ask!

`Add-on: phpMyAdmin A web interface for the official MariaDB add-on

Add-on version: 0.11.1 You are running the latest version of this add-on. System: Home Assistant OS 15.0 (aarch64 / raspberrypi4-64) Home Assistant Core: 2025.3.4 Home Assistant Supervisor: 2025.03.3

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service init-phpmyadmin: starting s6-rc: info: service init-nginx: starting s6-rc: info: service init-nginx successfully started [15:42:33] ERROR: Got unexpected response from the API: Service not enabled s6-rc: warning: unable to start service init-phpmyadmin: command exited 128 /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information. /run/s6/basedir/scripts/rc.init: fatal: stopping the container. s6-rc: info: service init-nginx: stopping s6-rc: info: service init-nginx successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service base-addon-log-level: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped`

Oldertarl avatar Mar 27 '25 14:03 Oldertarl

Hello, Same issue for me after a first installation with HAOS:

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service base-addon-banner: starting

Add-on: phpMyAdmin A web interface for the official MariaDB add-on

Add-on version: 0.11.1 You are running the latest version of this add-on. System: Home Assistant OS 15.2 (amd64 / qemux86-64) Home Assistant Core: 2025.4.2 Home Assistant Supervisor: 2025.04.0

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service init-phpmyadmin: starting s6-rc: info: service init-nginx: starting [18:48:51] ERROR: Got unexpected response from the API: Service not enabled s6-rc: info: service init-nginx successfully started s6-rc: warning: unable to start service init-phpmyadmin: command exited 128 /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information. /run/s6/basedir/scripts/rc.init: fatal: stopping the container. s6-rc: info: service init-nginx: stopping s6-rc: info: service init-nginx successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service base-addon-log-level: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

vryf avatar Apr 15 '25 17:04 vryf

[08:42:29] ERROR: Got unexpected response from the API: Service not enabled

This means the MariaDB isn't started; the supervisor is reporting the service request isn't there.

../Frenck

                       

Blogging my personal ramblings at frenck.dev

frenck avatar Nov 15 '25 06:11 frenck

I'm getting the same error and MariaDB is definitely running. phpMyAdmin was also working the last time I used it a few months back, so it's possibly something to do with an HA update:

-----------------------------------------------------------
 Add-on: phpMyAdmin
 A web interface for the official MariaDB add-on
-----------------------------------------------------------
 Add-on version: 0.13.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 15.1  (amd64 / generic-x86-64)
 Home Assistant Core: 2025.12.2
 Home Assistant Supervisor: 2025.12.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-phpmyadmin: starting
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-nginx successfully started
[20:06:10] ERROR: Got unexpected response from the API: Service not enabled
[20:06:10] ERROR: Failed to get services from Supervisor API
s6-rc: warning: unable to start service init-phpmyadmin: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service init-nginx: stopping
[...]

fencepost-error avatar Dec 11 '25 07:12 fencepost-error

I'm getting the same error and MariaDB is definitely running. phpMyAdmin was also working the last time I used it a few months back, so it's possibly something to do with an HA update:

-----------------------------------------------------------
 Add-on: phpMyAdmin
 A web interface for the official MariaDB add-on
-----------------------------------------------------------
 Add-on version: 0.13.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 15.1  (amd64 / generic-x86-64)
 Home Assistant Core: 2025.12.2
 Home Assistant Supervisor: 2025.12.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-phpmyadmin: starting
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-nginx successfully started
[20:06:10] ERROR: Got unexpected response from the API: Service not enabled
[20:06:10] ERROR: Failed to get services from Supervisor API
s6-rc: warning: unable to start service init-phpmyadmin: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service init-nginx: stopping
[...]

same error here phpMyAdmin wont start

tmh88 avatar Dec 17 '25 21:12 tmh88

Hello everyone,

I’m experiencing the same issue. MariaDB is running correctly, but phpMyAdmin fails to start.

Here are the logs:

-----------------------------------------------------------
 Add-on: phpMyAdmin
 A web interface for the official MariaDB add-on
-----------------------------------------------------------
 Add-on version: 0.13.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 16.3 (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2025.12.5
 Home Assistant Supervisor: 2026.01.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-phpmyadmin: starting
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-nginx successfully started
[22:17:09] ERROR: Got unexpected response from the API: Service not enabled
[22:17:09] ERROR: Failed to get services from Supervisor API
s6-rc: warning: unable to start service init-phpmyadmin: command exited 1
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.

CokACola44 avatar Jan 10 '26 21:01 CokACola44

Is anyone who speaks PHP able to have a look at this? The original developer contributes to a huge number of HA projects so may not have the time to look into this themselves.

fencepost-error avatar Jan 11 '26 02:01 fencepost-error

I have run into a similar issue when MariaDB is up and running and phpMyAdmin refused to start.

From the log: Image ghcr.io/hassio-addons/phpmyadmin/aarch64:0.13.0 does not exist for addon_a0d7b954_phpmyadmin

followed by [supervisor.addons.addon] Could not start container for addon a0d7b954_phpmyadmin: Image ghcr.io/hassio-addons/phpmyadmin/aarch64:0.13.0 does not exist for addon_a0d7b954_phpmyadmin

so I proceeded to uninstall the add-on and tried to install it again, but then the log goes like:

[supervisor.docker.interface] Downloading docker image ghcr.io/hassio-addons/phpmyadmin/aarch64 with tag 0.13.0. [supervisor.docker.manager] failed to register layer: rename /mnt/data/docker/image/overlay2/layerdb/tmp/write-set-3579950589 /mnt/data/docker/image/overlay2/layerdb/sha256/0d72709e880c291b9ebd192e00abb78b5833964f60900499de1b21cf4bdab95d: file exists [supervisor.jobs] Removing incomplete job Pulling container image layer from job manager [supervisor.addons.addon] Could not pull image to update addon a0d7b954_phpmyadmin: failed to register layer: rename /mnt/data/docker/image/overlay2/layerdb/tmp/write-set-3579950589 /mnt/data/docker/image/overlay2/layerdb/sha256/0d72709e880c291b9ebd192e00abb78b5833964f60900499de1b21cf4bdab95d: file exists

So as of now, I think I have uninstalled the add-on with some data still persisted and thus unable to reinstall it back again. Is there any way how to purge the image/add-on completely and pull the new image for aarch64? My understanding is that the very last change should not affect anything in my case.

wejto avatar Jan 23 '26 15:01 wejto

I was helping a friend out with some database issues a few days ago and mentioned phpMyAdmin, which on his HA system started and ran normally. We couldn't find any significant difference between his setup and mine, same hardware, same HA config, same HA release, but it works with his setup but not mine.

If anyone has any suggestions for something to look for for A/B testing between the two systems I'd be interested to hear them.

fencepost-error avatar Jan 30 '26 04:01 fencepost-error

EDIT: i can connect to mariaDB from docker phpmyadmin on different machine.

Same problem here, running the latest of everything, MariaDB is running for sure, restarts don`t help:

`Add-on: phpMyAdmin A web interface for the official MariaDB add-on

Add-on version: 0.13.0 You are running the latest version of this add-on. System: Home Assistant OS 17.1 (amd64 / qemux86-64) Home Assistant Core: 2026.3.3 Home Assistant Supervisor: 2026.03.2

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service init-phpmyadmin: starting s6-rc: info: service init-nginx: starting [20:29:25] ERROR: Got unexpected response from the API: Service not enabled s6-rc: info: service init-nginx successfully started [20:29:25] ERROR: Failed to get services from Supervisor API s6-rc: warning: unable to start service init-phpmyadmin: command exited 1 /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information. /run/s6/basedir/scripts/rc.init: fatal: stopping the container. s6-rc: info: service init-nginx: stopping s6-rc: info: service init-nginx successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service base-addon-log-level: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped Live `

BassBoi avatar Mar 21 '26 19:03 BassBoi

I have a fix for this. I don't speak PHP so at best would have ended up trying various trial-and-error kludges, so asked Claude for help. After some back-and-forth the fix is:

"Service not enabled" means the supervisor has no provider for the mysql service right then. The MariaDB add-on registers itself as that provider when it starts (Set core_mariadb as service provider for MySQL). After an HA/Supervisor update that registration can get dropped even though MariaDB is still running — which matches the v0.13.0 / 2025.12+ wave in the issue, and your June 2026 date. Try in order:

Restart the official MariaDB add-on, then start phpMyAdmin. This re-registers mysql with the supervisor and clears the most common case.

Manually restarting the MariaDB add-on and then restarting phpMyAdmin fixed the problem.

The underlying problem is a race condition in the phpMyAdmin startup:

The brittleness is real and fixable in the repo: init-phpmyadmin/run calls bashio::services "mysql" exactly once and has no tolerance for the service not being ready. Even with mysql:need, the supervisor only guarantees MariaDB is started before phpMyAdmin — not that the service is registered or accepting connections, so there's an inherent startup race. A retry/wait loop around the service lookup (and around the initial mariadb connection, which is the next thing that can fail under set -e) would turn a hard container-halt into a recoverable wait.

fencepost-error avatar Jun 27 '26 05:06 fencepost-error

This is the suggested diff from Claude, which replaces the all-or-nothing connect with a version that retries on failure:

--- a/phpmyadmin/rootfs/etc/s6-overlay/s6-rc.d/init-phpmyadmin/run
+++ b/phpmyadmin/rootfs/etc/s6-overlay/s6-rc.d/init-phpmyadmin/run
@@ -9,7 +9,16 @@
 declare port
 declare username
 declare database
+declare attempt
 
+# Number of attempts and the delay between them, per wait stage.
+# Total wait per stage = MAX_TRIES * RETRY_DELAY seconds.
+readonly MAX_TRIES=30
+readonly RETRY_DELAY=5
+
+# ------------------------------------------------------------------------------
+# Generate the blowfish secret used for cookie based auth (only once).
+# ------------------------------------------------------------------------------
 if ! bashio::fs.file_exists "/data/config.secret.inc.php"; then
     cat > /data/config.secret.inc.php <<EOT
 <?php
@@ -18,11 +27,65 @@
 fi
 chmod 644 /data/config.secret.inc.php
 
+# ------------------------------------------------------------------------------
+# Wait for the MariaDB service to be registered with the Supervisor.
+#  ... (see file)
+# ------------------------------------------------------------------------------
+attempt=1
+until bashio::services.available "mysql"; do
+    if [[ "${attempt}" -ge "${MAX_TRIES}" ]]; then
+        bashio::exit.nok \
+            "The MariaDB service is not available. Make sure the official \
+MariaDB add-on is installed and running, then restart this add-on."
+    fi
+    bashio::log.notice \
+        "MariaDB service not registered yet, retrying in ${RETRY_DELAY}s" \
+        "(attempt ${attempt}/${MAX_TRIES})"
+    attempt=$((attempt + 1))
+    sleep "${RETRY_DELAY}"
+done
+
 host=$(bashio::services "mysql" "host")
 ...
+attempt=1
+until \
+    mariadb -u "${username}" -p"${password}" -h "${host}" -P "${port}" \
+        --skip-ssl -e "SELECT 1;" > /dev/null 2>&1
+do
+    if [[ "${attempt}" -ge "${MAX_TRIES}" ]]; then
+        bashio::exit.nok "Could not connect to the MariaDB server at ${host}:${port}."
+    fi
+    bashio::log.notice "Waiting for MariaDB to accept connections..." \
+        "(attempt ${attempt}/${MAX_TRIES})"
+    attempt=$((attempt + 1))
+    sleep "${RETRY_DELAY}"
+done

Given my no habla PHP status, can someone who does give it a try? I've also attached the full updated init-phpmyadmin/run if that's easier to work with. You may need to rename it to remove the .txt suffix because Firefox silently fails when trying to upload a file without a suffix so I couldn't upload it as is.

run

fencepost-error avatar Jun 27 '26 06:06 fencepost-error