hassio-addons: 🐛 [zoneminder] cannot start (mysql startup timer expired)

Description

When I deploy homeassistant addon, it’s starting and then stopping

Reproduction steps

1. install zoneminder addon
2. Click on start

Addon Logs

Starting...
/etc/cont-init.d/00-banner.sh: executing
-----------------------------------------------------------
 Add-on: Zoneminder
 A full-featured, open source, state-of-the-art video surveillance software system
-----------------------------------------------------------
 Add-on version: 1.36.33
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.3  (amd64 / generic-x86-64)
 Home Assistant Core: 2023.6.3
 Home Assistant Supervisor: 2023.06.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
 https://github.com/alexbelgium/hassio-addons
-----------------------------------------------------------
/etc/cont-init.d/00-folders.sh: executing
/./etc/cont-init.d/00-folders.sh: line 9: bashio::config.has_value: command not found
... making sure /config/addons_config/zoneminder exists
... checking permissions
... making symlinks
/etc/cont-init.d/01-custom_script.sh: executing
[19:43:16] INFO: Execute /config/addons_autoscripts/zoneminder.sh if existing
[19:43:16] INFO: ... no script found
/etc/cont-init.d/99-run.sh: executing
[19:43:16] INFO: Defining database
[19:43:16] INFO: Using internal database
[19:43:16] INFO: Please wait while the app is loading !
 * First run of MYSQL, initializing DB.
 * Starting MySQL database server service   ...done.
 * Warning: Mysql startup timer expired!
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
 * First run of mysql in the container, creating ZoneMinder dB.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
 * Starting Apache http web server service   ...done.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Unable to connect to DB. ZM Cannot continue.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
Compilation failed in require at /usr/bin/zmupdate.pl line 74.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 74.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Unable to connect to DB. ZM Cannot continue.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
Compilation failed in require at /usr/bin/zmupdate.pl line 74.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 74.
 * Starting ZoneMinder video surveillance recorder   ...failed!
/etc/cont-init.d/99-run.sh: exiting 1

Architecture

amd64

OS

HAos

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (8 by maintainers)

Commits related to this issue

Most upvoted comments

I’m encountering one of the thing I love the most in IT … things are now working and I have no clue what solved it …

for the record, I started the container, it worked … I stopped it, uninstalled, remove /config/addons_config/zoneminder and reinstalled …and things are working fine now

thanks for your help, next time I’ll try some voodoo and sacrifice a chicken -_-

will try that later in a freshly deployed container to see if it helps, will let you know this evening (I guess)

database finally did accept to run with “mysqld --user=mysql --datadir=/var/lib/mysql/” and I was able to connect on webui but that’s not a solution (tinkering inside of a container is never a solution)