Skip to content
This repository has been archived by the owner on Feb 7, 2021. It is now read-only.

mariadb crash #19

Closed
antoinemineau opened this issue Sep 16, 2016 · 5 comments
Closed

mariadb crash #19

antoinemineau opened this issue Sep 16, 2016 · 5 comments

Comments

@antoinemineau
Copy link

Hi,

I am trying to use the mariadb database but when I check the docker status, I see that mariadb keeps restarting. There is also a crash on the data container.

I read #16 and tried to pull latest mariadb as suggested but still got the same issue.

Here are the logs :

projectcom_data_1 exited with code 0
projectcom_mariadb_1 exited with code 1
mariadb_1     | MySQL root password (from /data/mysql/root_password): 4548rbBmL30mamsTbRYUMQHvfEczTO
mariadb_1     | error: database is uninitialized and password option is not specified 
mariadb_1     |   You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
mariadb_1     | MySQL root password (from /data/mysql/root_password): 4548rbBmL30mamsTbRYUMQHvfEczTO
mariadb_1     | error: database is uninitialized and password option is not specified 
mariadb_1     |   You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
mariadb_1     | MySQL root password (from /data/mysql/root_password): 4548rbBmL30mamsTbRYUMQHvfEczTO
mariadb_1     | error: database is uninitialized and password option is not specified 
mariadb_1     |   You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
mariadb_1     | MySQL root password (from /data/mysql/root_password): 4548rbBmL30mamsTbRYUMQHvfEczTO
mariadb_1     | error: database is uninitialized and password option is not specified 
mariadb_1     |   You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
projectcom_mariadb_1 exited with code 1
mariadb_1     | MySQL root password (from /data/mysql/root_password): 4548rbBmL30mamsTbRYUMQHvfEczTO
mariadb_1     | error: database is uninitialized and password option is not specified 
mariadb_1     |   You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
mariadb_1     | MySQL root password (from /data/mysql/root_password): 4548rbBmL30mamsTbRYUMQHvfEczTO
mariadb_1     | error: database is uninitialized and password option is not specified 
mariadb_1     |   You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
mariadb_1     | MySQL root password (from /data/mysql/root_password): 4548rbBmL30mamsTbRYUMQHvfEczTO
mariadb_1     | error: database is uninitialized and password option is not specified 
mariadb_1     |   You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
mariadb_1     | MySQL root password (from /data/mysql/root_password): 4548rbBmL30mamsTbRYUMQHvfEczTO
mariadb_1     | error: database is uninitialized and password option is not specified 
mariadb_1     |   You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
mariadb_1     | MySQL root password (from /data/mysql/root_password): 4548rbBmL30mamsTbRYUMQHvfEczTO
mariadb_1     | error: database is uninitialized and password option is not specified 
mariadb_1     |   You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
mariadb_1     | MySQL root password (from /data/mysql/root_password): 4548rbBmL30mamsTbRYUMQHvfEczTO
mariadb_1     | error: database is uninitialized and password option is not specified 
mariadb_1     |   You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
projectcom_mariadb_1 exited with code 1

So I added the following code in the mariadb block of the docker-compose.yml

  environment:
    - MYSQL_ROOT_PASSWORD=root

Here are the new logs :

mariadb_1     | MySQL root password (from /data/mysql/root_password): 4548rbBmL30mamsTbRYUMQHvfEczTO
mariadb_1     | Initializing database
php_1         | [16-Sep-2016 15:59:17] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/memcached.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20151012/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
php_1         | [16-Sep-2016 15:59:17] NOTICE: fpm is running, pid 1
php_1         | [16-Sep-2016 15:59:17] NOTICE: ready to handle connections
mariadb_1     | 2016-09-16 15:59:15 140550691461056 [Note] /usr/sbin/mysqld (mysqld 10.1.17-MariaDB-1~jessie) starting as process 63 ...
mariadb_1     | 2016-09-16 15:59:15 140550691461056 [ERROR] WSREP: rsync SST method requires wsrep_cluster_address to be configured on startup.
mariadb_1     | 2016-09-16 15:59:15 140550691461056 [Warning] You need to use --log-bin to make --binlog-format work.
phpmyadmin_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.6. Set the 'ServerName' directive globally to suppress this message
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: Using mutexes to ref count buffer pool pages
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: The InnoDB memory heap is disabled
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
phpmyadmin_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.6. Set the 'ServerName' directive globally to suppress this message
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: Compressed tables use zlib 1.2.8
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: Using Linux native AIO
projectcom_data_1 exited with code 0
phpmyadmin_1  | [Fri Sep 16 15:59:18.107357 2016] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.10 (Debian) PHP/5.6.25 configured -- resuming normal operations
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: Using SSE crc32 instructions
phpmyadmin_1  | [Fri Sep 16 15:59:18.107423 2016] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: Initializing buffer pool, size = 256.0M
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: Completed initialization of buffer pool
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: Database physically writes the file full: wait...
mariadb_1     | 2016-09-16 15:59:16 140550691461056 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
mariadb_1     | 2016-09-16 15:59:17 140550691461056 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
mariadb_1     | 2016-09-16 15:59:18 140550691461056 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
mariadb_1     | 2016-09-16 15:59:18 140550691461056 [Warning] InnoDB: New log files created, LSN=45883
mariadb_1     | 2016-09-16 15:59:18 140550691461056 [Note] InnoDB: Doublewrite buffer not found: creating new
mariadb_1     | 2016-09-16 15:59:18 140550691461056 [Note] InnoDB: Doublewrite buffer created
mariadb_1     | 2016-09-16 15:59:18 140550691461056 [Note] InnoDB: 128 rollback segment(s) are active.
mariadb_1     | 2016-09-16 15:59:18 140550691461056 [Warning] InnoDB: Creating foreign key constraint system tables.
mariadb_1     | 2016-09-16 15:59:18 140550691461056 [Note] InnoDB: Foreign key constraint system tables created
mariadb_1     | 2016-09-16 15:59:18 140550691461056 [Note] InnoDB: Creating tablespace and datafile system tables.
mariadb_1     | 2016-09-16 15:59:18 140550691461056 [Note] InnoDB: Tablespace and datafile system tables created.
mariadb_1     | 2016-09-16 15:59:18 140550691461056 [Note] InnoDB: Waiting for purge to start
mariadb_1     | 2016-09-16 15:59:18 140550691461056 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.31-77.0 started; log sequence number 0
mariadb_1     | 2016-09-16 15:59:18 140549902300928 [Note] InnoDB: Dumping buffer pool(s) not yet started
mariadb_1     | 2016-09-16 15:59:22 140401360205760 [Note] /usr/sbin/mysqld (mysqld 10.1.17-MariaDB-1~jessie) starting as process 92 ...
mariadb_1     | 2016-09-16 15:59:22 140401360205760 [ERROR] WSREP: rsync SST method requires wsrep_cluster_address to be configured on startup.
mariadb_1     | 2016-09-16 15:59:22 140401360205760 [Warning] You need to use --log-bin to make --binlog-format work.
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: Using mutexes to ref count buffer pool pages
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: The InnoDB memory heap is disabled
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: Compressed tables use zlib 1.2.8
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: Using Linux native AIO
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: Using SSE crc32 instructions
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: Initializing buffer pool, size = 256.0M
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: Completed initialization of buffer pool
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: Highest supported file format is Barracuda.
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: 128 rollback segment(s) are active.
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB: Waiting for purge to start
mariadb_1     | 2016-09-16 15:59:23 140401360205760 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.31-77.0 started; log sequence number 1616799
mariadb_1     | 2016-09-16 15:59:23 140400580855552 [Note] InnoDB: Dumping buffer pool(s) not yet started
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] /usr/sbin/mysqld (mysqld 10.1.17-MariaDB-1~jessie) starting as process 121 ...
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [ERROR] WSREP: rsync SST method requires wsrep_cluster_address to be configured on startup.
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Warning] You need to use --log-bin to make --binlog-format work.
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: Using mutexes to ref count buffer pool pages
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: The InnoDB memory heap is disabled
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: Compressed tables use zlib 1.2.8
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: Using Linux native AIO
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: Using SSE crc32 instructions
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: Initializing buffer pool, size = 256.0M
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: Completed initialization of buffer pool
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: Highest supported file format is Barracuda.
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: 128 rollback segment(s) are active.
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB: Waiting for purge to start
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.31-77.0 started; log sequence number 1616809
mariadb_1     | 2016-09-16 15:59:25 140662355756800 [Note] InnoDB: Dumping buffer pool(s) not yet started
mariadb_1     | ERROR: 1049  Unknown database 'test'
mariadb_1     | 2016-09-16 15:59:25 140663133943744 [ERROR] Aborting
mariadb_1     | 
mariadb_1     | 
mariadb_1     | WARNING: OPENGIS REQUIRED SP-S WERE NOT COMPLETELY INSTALLED!
mariadb_1     | GIS extentions might not work properly.
mariadb_1     | 
mariadb_1     | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
mariadb_1     | To do so, start the server, then issue the following commands:
mariadb_1     | 
mariadb_1     | '/usr/bin/mysqladmin' -u root password 'new-password'
mariadb_1     | '/usr/bin/mysqladmin' -u root -h  password 'new-password'
mariadb_1     | 
mariadb_1     | Alternatively you can run:
mariadb_1     | '/usr/bin/mysql_secure_installation'
mariadb_1     | 
mariadb_1     | which will also give you the option of removing the test
mariadb_1     | databases and anonymous user created by default.  This is
mariadb_1     | strongly recommended for production servers.
mariadb_1     | 
mariadb_1     | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
mariadb_1     | MySQL manual for more instructions.
mariadb_1     | 
mariadb_1     | Please report any problems at http://mariadb.org/jira
mariadb_1     | 
mariadb_1     | The latest information about MariaDB is available at http://mariadb.org/.
mariadb_1     | You can find additional information about the MySQL part at:
mariadb_1     | http://dev.mysql.com
mariadb_1     | Support MariaDB development by buying support/new features from MariaDB
mariadb_1     | Corporation Ab. You can contact us about this at sales@mariadb.com.
mariadb_1     | Alternatively consider joining our community based development effort:
mariadb_1     | http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
mariadb_1     | 
mariadb_1     | Database initialized
mariadb_1     | MySQL init process in progress...
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] mysqld (mysqld 10.1.17-MariaDB-1~jessie) starting as process 148 ...
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Warning] You need to use --log-bin to make --binlog-format work.
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: Using mutexes to ref count buffer pool pages
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: The InnoDB memory heap is disabled
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: Compressed tables use zlib 1.2.8
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: Using Linux native AIO
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: Using SSE crc32 instructions
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: Initializing buffer pool, size = 256.0M
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: Completed initialization of buffer pool
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: Highest supported file format is Barracuda.
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: 128 rollback segment(s) are active.
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB: Waiting for purge to start
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.31-77.0 started; log sequence number 1616819
mariadb_1     | 2016-09-16 15:59:28 140209198958336 [Note] InnoDB: Dumping buffer pool(s) not yet started
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] Plugin 'FEEDBACK' is disabled.
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Warning] 'user' entry 'root@4230632d0627' ignored in --skip-name-resolve mode.
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Warning] 'proxies_priv' entry '@% root@4230632d0627' ignored in --skip-name-resolve mode.
mariadb_1     | 2016-09-16 15:59:28 140209976375232 [Note] mysqld: ready for connections.
mariadb_1     | Version: '10.1.17-MariaDB-1~jessie'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
mariadb_1     | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
mariadb_1     | 2016-09-16 15:59:30 140209975810816 [Warning] 'proxies_priv' entry '@% root@4230632d0627' ignored in --skip-name-resolve mode.
mariadb_1     | 
mariadb_1     | /docker-entrypoint-init.sh: ignoring /docker-entrypoint-initdb.d/*
mariadb_1     | 
mariadb_1     | 2016-09-16 15:59:30 140209975507712 [Note] mysqld: Normal shutdown
mariadb_1     | 
mariadb_1     | 2016-09-16 15:59:30 140209975507712 [Note] Event Scheduler: Purging the queue. 0 events
mariadb_1     | 2016-09-16 15:59:30 140209182172928 [Note] InnoDB: FTS optimize thread exiting.
mariadb_1     | 2016-09-16 15:59:30 140209975507712 [Note] InnoDB: Starting shutdown...
mariadb_1     | 2016-09-16 15:59:32 140209975507712 [Note] InnoDB: Shutdown completed; log sequence number 1616829
mariadb_1     | 2016-09-16 15:59:32 140209975507712 [Note] mysqld: Shutdown complete
mariadb_1     | 
mariadb_1     | 
mariadb_1     | MySQL init process done. Ready for start up.
mariadb_1     | 
projectcom_mariadb_1 exited with code 0

Thanks.

@nazar-pc
Copy link
Owner

Probably, something has changed in upstream MariaDB image, will take a look.

@nazar-pc nazar-pc added the bug label Sep 16, 2016
@nazar-pc
Copy link
Owner

Should be good now, but let the images some time to build (https://hub.docker.com/r/nazarpc/webserver/builds/). and do not forget to pull fresh images after
There was some changes in upstream image (which I didn't follow close enough), which made it incompatible, so I've added few patches to make it compatible again.

Also data image doesn't crash.
From readme (about data image):

This container will start and stop immediately, that is OK.

When new images will be available give it a try and let me know if you experience any other issues.

@antoinemineau
Copy link
Author

Thanks !
I will check this when the build is done.

@antoinemineau
Copy link
Author

antoinemineau commented Sep 17, 2016

It works with latest fix !
However in my web application I have to specify the database_host, I found that I have to use the server ip specified in phpmyadmin.

screen shot 2016-09-17 at 11 52 30

When I restart the containers, the ip changes sometimes.
Any idea on how to fix ?

@nazar-pc
Copy link
Owner

Just like with PHP you need to specify the name of the service as host, not IP. IP will change on each restart/upgrade.

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

No branches or pull requests

2 participants