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

Starting MariaDB database server mysqld ...fail! #19

Closed
dmachtey opened this issue Jan 31, 2019 · 4 comments
Closed

Starting MariaDB database server mysqld ...fail! #19

dmachtey opened this issue Jan 31, 2019 · 4 comments

Comments

@dmachtey
Copy link

Hello.
I'm quite new to docker. but have ran other images with some issues that I was able to fix.

  I'm trying to run  dlandon/zoneminder through your docker-run.sh script as root but always get the same errors and then it get closed.  (Bellow the logs)

  How can I solve this?

Best Regards.
DM

Setting shared memory to : 50% of 16294700 bytes
Starting services
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
/usr/sbin/policy-rc.d returned 101, not running 'stop zoneminder.service'
Detected db service is mysql.service
Failed to connect to bus: No such file or directory
Failed to connect to bus: No such file or directory
/usr/sbin/policy-rc.d returned 101, not running 'start mysql.service'
Failed to connect to bus: No such file or directory
NOTE: MySQL/MariaDB not running; please start mysql and run dpkg-reconfigure zoneminder when it is running.
/usr/sbin/policy-rc.d returned 101, not running 'restart zoneminder.service'
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.

  • /etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz
    Jan 31 22:01:26 galacticempire /etc/init.d/mysql[453]: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz
  • Starting MariaDB database server mysqld
    ...fail!
    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/Config.pm line 117.
    Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 166.
    BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 166.
    Compilation failed in require at /usr/bin/zmupdate.pl line 71.
    BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 71.
    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/Config.pm line 117.
    Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 166.
    BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 166.
    Compilation failed in require at /usr/bin/zmupdate.pl line 71.
    BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 71.
  • Starting Apache httpd web server apache2

Starting ZoneMinder:
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/Config.pm line 117.
Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 166.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 166.
Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Compilation failed in require at /usr/bin/zmpkg.pl line 34.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 34.
ZoneMinder failed to start

*** /etc/my_init.d/40_firstrun.sh failed with status 255

*** Killing all processes...
Jan 31 22:02:06 galacticempire syslog-ng[16]: syslog-ng shutting down; version='3.5.6'

@nate131
Copy link

nate131 commented Feb 23, 2019

I am having this exact same issue. mysql error.log says its permissions based however i see that the permissions have been set just fine. Would this be due to not being run on unRAID?

190224  2:59:20 [Note] /usr/sbin/mysqld (mysqld 10.0.38-MariaDB-0ubuntu0.16.04.1) starting as process 587 ...
190224  2:59:20 [Warning] **Can't create test file /var/lib/mysql/a6a0fd115662.lower-test**
190224  2:59:20 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
190224  2:59:20 [Note] InnoDB: Using mutexes to ref count buffer pool pages
190224  2:59:20 [Note] InnoDB: The InnoDB memory heap is disabled
190224  2:59:20 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
190224  2:59:20 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
190224  2:59:20 [Note] InnoDB: Compressed tables use zlib 1.2.8
190224  2:59:20 [Note] InnoDB: Using Linux native AIO
190224  2:59:20 [Note] InnoDB: Using CPU crc32 instructions
190224  2:59:20 [Note] InnoDB: Initializing buffer pool, size = 128.0M
190224  2:59:20 [Note] InnoDB: Completed initialization of buffer pool
**190224  2:59:20 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode**
190224  2:59:20 [ERROR] InnoDB: The system tablespace must be writable!
190224  2:59:20 [ERROR] Plugin 'InnoDB' init function returned error.
190224  2:59:20 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190224  2:59:20 [ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
190224  2:59:20 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
190224  2:59:20 [ERROR] Plugin 'Aria' init function returned error.
190224  2:59:20 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
190224  2:59:20 [Note] Plugin 'FEEDBACK' is disabled.
190224  2:59:20 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
190224  2:59:20 [ERROR] Unknown/unsupported storage engine: InnoDB
190224  2:59:20 [ERROR] Aborting
190224  2:59:20 [Note] /usr/sbin/mysqld: Shutdown complete

Permissions:

root@a6a0fd115662:/var/lib# ls -ltr mysql
lrwxrwxrwx 1 mysql mysql 13 Feb 24 02:59 mysql -> /config/mysql

root@a6a0fd115662:/var/lib# ls -ltr mysql/
total 176168
-rw-r--r-- 1 mysql mysql        0 Feb 24 02:51 debian-10.0.flag
-rw-rw---- 1 mysql mysql 50331648 Feb 24 02:51 ib_logfile1
-rw-rw---- 1 mysql mysql       52 Feb 24 02:51 aria_log_control
-rw-rw---- 1 mysql mysql    16384 Feb 24 02:51 aria_log.00000001
-rw-rw---- 1 mysql mysql        0 Feb 24 02:58 multi-master.info
drwx------ 2 mysql mysql     4096 Feb 24 02:58 mysql
drwx------ 2 mysql mysql     4096 Feb 24 02:58 performance_schema
-rw------- 1 mysql mysql       15 Feb 24 02:58 mysql_upgrade_info
drwx------ 2 mysql mysql     4096 Feb 24 02:58 zm
-rw-rw---- 1 mysql mysql 79691776 Feb 24 02:58 ibdata1
-rw-rw---- 1 mysql mysql 50331648 Feb 24 02:58 ib_logfile0

root@a6a0fd115662:/var/lib# ls -ltr /config/mysql/
total 176168
-rw-r--r-- 1 mysql mysql        0 Feb 24 02:51 debian-10.0.flag
-rw-rw---- 1 mysql mysql 50331648 Feb 24 02:51 ib_logfile1
-rw-rw---- 1 mysql mysql       52 Feb 24 02:51 aria_log_control
-rw-rw---- 1 mysql mysql    16384 Feb 24 02:51 aria_log.00000001
-rw-rw---- 1 mysql mysql        0 Feb 24 02:58 multi-master.info
drwx------ 2 mysql mysql     4096 Feb 24 02:58 mysql
drwx------ 2 mysql mysql     4096 Feb 24 02:58 performance_schema
-rw------- 1 mysql mysql       15 Feb 24 02:58 mysql_upgrade_info
drwx------ 2 mysql mysql     4096 Feb 24 02:58 zm
-rw-rw---- 1 mysql mysql 79691776 Feb 24 02:58 ibdata1
-rw-rw---- 1 mysql mysql 50331648 Feb 24 02:58 ib_logfile0

@dlandon
Copy link
Owner

dlandon commented Feb 23, 2019

Where do you have these volumes mapped?
-v "/mnt/cache/appdata/Zoneminder":"/config":rw
-v "/mnt/cache/appdata/Zoneminder/data":"/var/cache/zoneminder":rw \

These are Unraid specific and would need to be changed for your system,.

@nate131
Copy link

nate131 commented Feb 24, 2019

same location - they exist on the host in /mnt/cache/appdata/Zoneminder and exist in the container as /config and /var/cache/zoneminder for the .../data volume

Also just tried creating the host folders in the users home directory. same deal.

on the host the mysql folder is owned by "messagebus:syslog"

~/docker/volumes/zoneminder/mysql$ ls -ltr
total 176176
-rw-r--r-- 1 messagebus syslog        0 Feb 24 17:57 debian-10.0.flag
-rw-rw---- 1 messagebus syslog 50331648 Feb 24 17:57 ib_logfile1
-rw-rw---- 1 messagebus syslog       52 Feb 24 17:57 aria_log_control
-rw-rw---- 1 messagebus syslog    16384 Feb 24 17:57 aria_log.00000001
-rw-rw---- 1 messagebus syslog        0 Feb 24 18:04 multi-master.info
drwx------ 2 messagebus syslog     4096 Feb 24 18:05 mysql
drwx------ 2 messagebus syslog     4096 Feb 24 18:05 performance_schema
-rw------- 1 messagebus syslog       15 Feb 24 18:05 mysql_upgrade_info
drwx------ 2 messagebus syslog     4096 Feb 24 18:05 zm
-rw-rw---- 1 messagebus syslog 79691776 Feb 24 18:05 ibdata1
-rw-rw---- 1 messagebus syslog 50331648 Feb 24 18:05 ib_logfile0

@elsieej
Copy link

elsieej commented Feb 24, 2020

have anyone fixed this issues ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants