aptalca / docker-zoneminder

DEPRECATED
GNU General Public License v2.0
22 stars 18 forks source link

Brand new container fails to start - mysql problems #17

Open jantman opened 6 years ago

jantman commented 6 years ago

I just pulled aptalca/zoneminder-1.29 from Docker Hub and am running it as instructed in the README, but MySQL fails to start:

# docker run -d --name=zoneminder --privileged=true -v /opt/zoneminder:/config:rw -v /etc/localtime:/etc/localtime:ro -p 8000:80 aptalca/zoneminder-1.29
a90176787503f6e59ad1acfc42f6c307b8ba4fa3d919de6893037fd8b60eefb9
# docker logs -f zoneminder
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/firstrun.sh...
copying php.ini
moving mysql to config folder
rm: cannot remove ‘/config/mysql’: No such file or directory
moving data folder to config folder
moving perl data folder to config folder
creating symbolink links
setting the correct local time
mv: cannot move ‘/etc/localtime.dpkg-new’ to ‘/etc/localtime’: Device or resource busy
increasing shared memory
starting services
 * Starting MySQL database server mysqld
   ...fail!
 * Starting web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
 * 
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 92.
Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 119.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 119.
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 48.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 48.
Starting ZoneMinder: failure

*** /etc/my_init.d/firstrun.sh failed with status 255

*** Killing all processes...

Any ideas? The README doesn't say anything about why this would happen... the image is 2 years old and has LOTS of pulls, so I don't really understand what the problem could be.

I restarted the container, and found the following in /var/log/mysql/error.log:

160326 14:55:05 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160326 14:55:05 [Note] Plugin 'FEDERATED' is disabled.
160326 14:55:05 InnoDB: The InnoDB memory heap is disabled
160326 14:55:05 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160326 14:55:05 InnoDB: Compressed tables use zlib 1.2.8
160326 14:55:05 InnoDB: Using Linux native AIO
160326 14:55:05 InnoDB: Initializing buffer pool, size = 128.0M
160326 14:55:05 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
160326 14:55:05  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
160326 14:55:05  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
160326 14:55:05  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
160326 14:55:06  InnoDB: Waiting for the background threads to start
160326 14:55:07 InnoDB: 5.5.47 started; log sequence number 0
160326 14:55:07  InnoDB: Starting shutdown...
160326 14:55:07  InnoDB: Shutdown completed; log sequence number 1595675
160326 14:55:07 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160326 14:55:07 [Note] Plugin 'FEDERATED' is disabled.
160326 14:55:07 InnoDB: The InnoDB memory heap is disabled
160326 14:55:07 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160326 14:55:07 InnoDB: Compressed tables use zlib 1.2.8
160326 14:55:07 InnoDB: Using Linux native AIO
160326 14:55:08 InnoDB: Initializing buffer pool, size = 128.0M
160326 14:55:08 InnoDB: Completed initialization of buffer pool
160326 14:55:08 InnoDB: highest supported file format is Barracuda.
160326 14:55:08  InnoDB: Waiting for the background threads to start
160326 14:55:09 InnoDB: 5.5.47 started; log sequence number 1595675
ERROR: 1064  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE user ADD column Show_view_priv enum('N','Y') CHARACTER SET utf8 NOT ' at line 1
160326 14:55:09 [ERROR] Aborting

160326 14:55:09  InnoDB: Starting shutdown...
160326 14:55:09  InnoDB: Shutdown completed; log sequence number 1595675
160326 14:55:09 [Note] /usr/sbin/mysqld: Shutdown complete

160326 14:55:09 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160326 14:55:09 [Note] Plugin 'FEDERATED' is disabled.
160326 14:55:09 InnoDB: The InnoDB memory heap is disabled
160326 14:55:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160326 14:55:09 InnoDB: Compressed tables use zlib 1.2.8
160326 14:55:09 InnoDB: Using Linux native AIO
160326 14:55:09 InnoDB: Initializing buffer pool, size = 128.0M
160326 14:55:09 InnoDB: Completed initialization of buffer pool
160326 14:55:09 InnoDB: highest supported file format is Barracuda.
160326 14:55:09  InnoDB: Waiting for the background threads to start
160326 14:55:10 InnoDB: 5.5.47 started; log sequence number 1595675
160326 14:55:10  InnoDB: Starting shutdown...
160326 14:55:11  InnoDB: Shutdown completed; log sequence number 1595675
160326 14:55:11 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160326 14:55:11 [Note] Plugin 'FEDERATED' is disabled.
160326 14:55:11 InnoDB: The InnoDB memory heap is disabled
160326 14:55:11 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160326 14:55:11 InnoDB: Compressed tables use zlib 1.2.8
160326 14:55:11 InnoDB: Using Linux native AIO
160326 14:55:11 InnoDB: Initializing buffer pool, size = 128.0M
160326 14:55:11 InnoDB: Completed initialization of buffer pool
160326 14:55:11 InnoDB: highest supported file format is Barracuda.
160326 14:55:11  InnoDB: Waiting for the background threads to start
160326 14:55:12 InnoDB: 5.5.47 started; log sequence number 1595675
ERROR: 1050  Table 'plugin' already exists
160326 14:55:12 [ERROR] Aborting

160326 14:55:12  InnoDB: Starting shutdown...
160326 14:55:13  InnoDB: Shutdown completed; log sequence number 1595675
160326 14:55:13 [Note] /usr/sbin/mysqld: Shutdown complete

160326 14:55:24 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160326 14:55:24 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160326 14:55:24 [Note] /usr/sbin/mysqld (mysqld 5.5.47-0ubuntu0.14.04.1) starting as process 7220 ...
160326 14:55:24 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160326 14:55:24 [Note] Plugin 'FEDERATED' is disabled.
160326 14:55:24 InnoDB: The InnoDB memory heap is disabled
160326 14:55:24 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160326 14:55:24 InnoDB: Compressed tables use zlib 1.2.8
160326 14:55:24 InnoDB: Using Linux native AIO
160326 14:55:24 InnoDB: Initializing buffer pool, size = 128.0M
160326 14:55:24 InnoDB: Completed initialization of buffer pool
160326 14:55:24 InnoDB: highest supported file format is Barracuda.
160326 14:55:24  InnoDB: Waiting for the background threads to start
160326 14:55:25 InnoDB: 5.5.47 started; log sequence number 1595675
160326 14:55:25 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
160326 14:55:25 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
160326 14:55:25 [Note] Server socket created on IP: '127.0.0.1'.
160326 14:55:25 [Note] Event Scheduler: Loaded 0 events
160326 14:55:25 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.47-0ubuntu0.14.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
160326 14:56:16 [Note] /usr/sbin/mysqld: Normal shutdown

160326 14:56:16 [Note] Event Scheduler: Purging the queue. 0 events
160326 14:56:16  InnoDB: Starting shutdown...
160326 14:56:17  InnoDB: Shutdown completed; log sequence number 2119629
160326 14:56:17 [Note] /usr/sbin/mysqld: Shutdown complete

160326 14:56:17 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
160326 14:56:18 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160326 14:56:18 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160326 14:56:18 [Note] /usr/sbin/mysqld (mysqld 5.5.47-0ubuntu0.14.04.1) starting as process 9533 ...
160326 14:56:18 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160326 14:56:18 [Note] Plugin 'FEDERATED' is disabled.
160326 14:56:18 InnoDB: The InnoDB memory heap is disabled
160326 14:56:18 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160326 14:56:18 InnoDB: Compressed tables use zlib 1.2.8
160326 14:56:18 InnoDB: Using Linux native AIO
160326 14:56:18 InnoDB: Initializing buffer pool, size = 128.0M
160326 14:56:18 InnoDB: Completed initialization of buffer pool
160326 14:56:18 InnoDB: highest supported file format is Barracuda.
160326 14:56:18  InnoDB: Waiting for the background threads to start
160326 14:56:19 InnoDB: 5.5.47 started; log sequence number 2119629
160326 14:56:19 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
160326 14:56:19 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
160326 14:56:19 [Note] Server socket created on IP: '127.0.0.1'.
160326 14:56:19 [Note] Event Scheduler: Loaded 0 events
160326 14:56:19 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.47-0ubuntu0.14.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
180610 10:48:05 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
180610 10:48:05 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
180610 10:48:05 [Note] /usr/sbin/mysqld (mysqld 5.5.47-0ubuntu0.14.04.1) starting as process 431 ...
180610 10:48:05 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
180610 10:48:05 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'plugin' is read only
180610 10:48:05 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
180610 10:48:05 InnoDB: The InnoDB memory heap is disabled
180610 10:48:05 InnoDB: Mutexes and rw_locks use GCC atomic builtins
180610 10:48:05 InnoDB: Compressed tables use zlib 1.2.8
180610 10:48:05 InnoDB: Using Linux native AIO
180610 10:48:05 InnoDB: Initializing buffer pool, size = 128.0M
180610 10:48:05 InnoDB: Completed initialization of buffer pool
180610 10:48:05 InnoDB: highest supported file format is Barracuda.
180610 10:48:05  InnoDB: Waiting for the background threads to start
180610 10:48:06 InnoDB: 5.5.47 started; log sequence number 2119629
180610 10:48:06 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
180610 10:48:06 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
180610 10:48:06 [Note] Server socket created on IP: '127.0.0.1'.
180610 10:48:06 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only
180610 10:48:06 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
180610 10:50:56 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
180610 10:50:56 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
180610 10:50:56 [Note] /usr/sbin/mysqld (mysqld 5.5.47-0ubuntu0.14.04.1) starting as process 418 ...
180610 10:50:56 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
180610 10:50:56 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'plugin' is read only
180610 10:50:56 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
180610 10:50:56 InnoDB: The InnoDB memory heap is disabled
180610 10:50:56 InnoDB: Mutexes and rw_locks use GCC atomic builtins
180610 10:50:56 InnoDB: Compressed tables use zlib 1.2.8
180610 10:50:56 InnoDB: Using Linux native AIO
180610 10:50:56 InnoDB: Initializing buffer pool, size = 128.0M
180610 10:50:56 InnoDB: Completed initialization of buffer pool
180610 10:50:56 InnoDB: highest supported file format is Barracuda.
180610 10:50:56  InnoDB: Waiting for the background threads to start
180610 10:50:57 InnoDB: 5.5.47 started; log sequence number 2119629
180610 10:50:57 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
180610 10:50:57 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
180610 10:50:57 [Note] Server socket created on IP: '127.0.0.1'.
180610 10:50:57 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only
180610 10:50:57 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended