Saeed
Saeed

Reputation: 5488

Unable to Start Mariadb on Ubuntu Container

I Install mariadb-server on my ubuntu image container, when I want start mysql service it fails, the error.log file contains:

180228 16:41:24 [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.

180228 16:41:24 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 16:41:24 [Note] InnoDB: The InnoDB memory heap is disabled
180228 16:41:24 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 16:41:24 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 16:41:24 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 16:41:24 [Note] InnoDB: Using Linux native AIO
180228 16:41:24 [Note] InnoDB: Using CPU crc32 instructions
180228 16:41:24 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 16:41:24 [Note] InnoDB: Completed initialization of buffer pool
180228 16:41:24 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
180228 16:41:24 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
180228 16:41:24 [Note] InnoDB: Database physically writes the file full: wait...
180228 16:41:24 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
180228 16:41:26 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
180228 16:41:27 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
180228 16:41:27 [Warning] InnoDB: New log files created, LSN=45781
180228 16:41:27 [Note] InnoDB: Doublewrite buffer not found: creating new
180228 16:41:27 [Note] InnoDB: Doublewrite buffer created
180228 16:41:27 [Note] InnoDB: 128 rollback segment(s) are active.
180228 16:41:27 [Warning] InnoDB: Creating foreign key constraint system tables.
180228 16:41:27 [Note] InnoDB: Foreign key constraint system tables created
180228 16:41:27 [Note] InnoDB: Creating tablespace and datafile system tables.
180228 16:41:27 [Note] InnoDB: Tablespace and datafile system tables created.
180228 16:41:27 [Note] InnoDB: Waiting for purge to start
180228 16:41:27 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 0
180228 16:41:39 [Note] InnoDB: FTS optimize thread exiting.
180228 16:41:39 [Note] InnoDB: Starting shutdown...
180228 16:41:40 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 16:41:42 [Note] InnoDB: Shutdown completed; log sequence number 1616697
180228 16:41:42 [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.

180228 16:41:42 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 16:41:42 [Note] InnoDB: The InnoDB memory heap is disabled
180228 16:41:42 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 16:41:42 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 16:41:42 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 16:41:42 [Note] InnoDB: Using Linux native AIO
180228 16:41:42 [Note] InnoDB: Using CPU crc32 instructions
180228 16:41:42 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 16:41:42 [Note] InnoDB: Completed initialization of buffer pool
180228 16:41:42 [Note] InnoDB: Highest supported file format is Barracuda.
180228 16:41:42 [Note] InnoDB: 128 rollback segment(s) are active.
180228 16:41:42 [Note] InnoDB: Waiting for purge to start
180228 16:41:42 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616697
180228 16:41:42 [Note] InnoDB: FTS optimize thread exiting.
180228 16:41:42 [Note] InnoDB: Starting shutdown...
180228 16:41:43 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 16:41:45 [Note] InnoDB: Shutdown completed; log sequence number 1616707
180228 16:41:45 [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.

180228 16:41:45 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 16:41:45 [Note] InnoDB: The InnoDB memory heap is disabled
180228 16:41:45 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 16:41:45 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 16:41:45 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 16:41:45 [Note] InnoDB: Using Linux native AIO
180228 16:41:45 [Note] InnoDB: Using CPU crc32 instructions
180228 16:41:45 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 16:41:45 [Note] InnoDB: Completed initialization of buffer pool
180228 16:41:45 [Note] InnoDB: Highest supported file format is Barracuda.
180228 16:41:46 [Note] InnoDB: 128 rollback segment(s) are active.
180228 16:41:46 [Note] InnoDB: Waiting for purge to start
180228 16:41:46 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616707
180228 16:41:46 [Note] Plugin 'FEEDBACK' is disabled.
180228 16:41:46 [Note] InnoDB: FTS optimize thread exiting.
180228 16:41:46 [Note] InnoDB: Starting shutdown...
180228 16:41:47 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 16:41:48 [Note] InnoDB: Shutdown completed; log sequence number 1616717
180228 18:30:06 [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.

180228 18:30:06 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 18:30:06 [Note] InnoDB: The InnoDB memory heap is disabled
180228 18:30:06 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 18:30:06 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 18:30:06 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 18:30:06 [Note] InnoDB: Using Linux native AIO
180228 18:30:06 [Note] InnoDB: Using CPU crc32 instructions
180228 18:30:06 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 18:30:06 [Note] InnoDB: Completed initialization of buffer pool
180228 18:30:06 [Note] InnoDB: Highest supported file format is Barracuda.
180228 18:30:06 [Note] InnoDB: 128 rollback segment(s) are active.
180228 18:30:06 [Note] InnoDB: Waiting for purge to start
180228 18:30:06 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616747
180228 18:30:06 [Note] Plugin 'FEEDBACK' is disabled.
180228 18:30:06 [Note] Server socket created on IP: '127.0.0.1'.
180228 18:30:06 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
180228 18:30:06 [ERROR] Do you already have another mysqld server running on port: 3306 ?
180228 18:30:06 [ERROR] Aborting

180228 18:30:06 [Note] InnoDB: FTS optimize thread exiting.
180228 18:30:06 [Note] InnoDB: Starting shutdown...
180228 18:30:07 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 18:30:09 [Note] InnoDB: Shutdown completed; log sequence number 1616757
180228 18:30:09 [Note] mysqld: Shutdown complete

180228 18:32:22 [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.

180228 18:32:22 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 18:32:22 [Note] InnoDB: The InnoDB memory heap is disabled
180228 18:32:22 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 18:32:22 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 18:32:22 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 18:32:22 [Note] InnoDB: Using Linux native AIO
180228 18:32:22 [Note] InnoDB: Using CPU crc32 instructions
180228 18:32:22 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 18:32:22 [Note] InnoDB: Completed initialization of buffer pool
180228 18:32:22 [Note] InnoDB: Highest supported file format is Barracuda.
180228 18:32:22 [Note] InnoDB: 128 rollback segment(s) are active.
180228 18:32:22 [Note] InnoDB: Waiting for purge to start
180228 18:32:22 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616757
180228 18:32:22 [Note] Plugin 'FEEDBACK' is disabled.
180228 18:32:22 [Note] Server socket created on IP: '127.0.0.1'.
180228 18:32:22 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
180228 18:32:22 [ERROR] Do you already have another mysqld server running on port: 3306 ?
180228 18:32:22 [ERROR] Aborting

180228 18:32:22 [Note] InnoDB: FTS optimize thread exiting.
180228 18:32:22 [Note] InnoDB: Starting shutdown...
180228 18:32:23 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 18:32:25 [Note] InnoDB: Shutdown completed; log sequence number 1616767
180228 18:32:25 [Note] mysqld: Shutdown complete

180228 18:33:12 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 18:33:12 [Note] InnoDB: The InnoDB memory heap is disabled
180228 18:33:12 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 18:33:12 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 18:33:12 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 18:33:12 [Note] InnoDB: Using Linux native AIO
180228 18:33:12 [Note] InnoDB: Using CPU crc32 instructions
180228 18:33:12 [Note] InnoDB: Initializing buffer pool, size = 8.0G
180228 18:33:12 [Note] InnoDB: Completed initialization of buffer pool
180228 18:33:13 [Note] InnoDB: Highest supported file format is Barracuda.
180228 18:33:13 [Note] InnoDB: 128 rollback segment(s) are active.
180228 18:33:13 [Note] InnoDB: Waiting for purge to start
180228 18:33:13 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616777
180228 18:33:13 [Note] Plugin 'FEEDBACK' is disabled.
180228 18:33:13 [Note] Server socket created on IP: '127.0.0.1'.
180228 18:33:13 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
180228 18:33:13 [ERROR] Do you already have another mysqld server running on port: 3306 ?
180228 18:33:13 [ERROR] Aborting

180228 18:33:13 [Note] InnoDB: FTS optimize thread exiting.
180228 18:33:13 [Note] InnoDB: Starting shutdown...
180228 18:33:14 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 18:33:16 [Note] InnoDB: Shutdown completed; log sequence number 1616787
180228 18:33:16 [Note] mysqld: Shutdown complete

180228 18:41:32 [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.

180228 18:41:32 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 18:41:32 [Note] InnoDB: The InnoDB memory heap is disabled
180228 18:41:32 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 18:41:32 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 18:41:32 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 18:41:32 [Note] InnoDB: Using Linux native AIO
180228 18:41:32 [Note] InnoDB: Using CPU crc32 instructions
180228 18:41:32 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 18:41:32 [Note] InnoDB: Completed initialization of buffer pool
180228 18:41:32 [Note] InnoDB: Highest supported file format is Barracuda.
180228 18:41:32 [Note] InnoDB: 128 rollback segment(s) are active.
180228 18:41:32 [Note] InnoDB: Waiting for purge to start
180228 18:41:32 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616817
180228 18:41:32 [Note] Plugin 'FEEDBACK' is disabled.
180228 18:41:32 [Note] Server socket created on IP: '127.0.0.1'.
180228 18:41:32 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
180228 18:41:32 [ERROR] Do you already have another mysqld server running on port: 3306 ?
180228 18:41:32 [ERROR] Aborting

180228 18:41:32 [Note] InnoDB: FTS optimize thread exiting.
180228 18:41:32 [Note] InnoDB: Starting shutdown...
180228 18:41:33 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 18:41:35 [Note] InnoDB: Shutdown completed; log sequence number 1616827
180228 18:41:35 [Note] mysqld: Shutdown complete

first, the /run/mysqld directory was empty, and i got error below

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I create the mysqld.sock file with content 1773, the error changed from 'file or directory does not exist' to '111 connection refused'.

what is the problem?

Upvotes: 0

Views: 828

Answers (1)

ldg
ldg

Reputation: 9402

You have another instance Docker or otherwise (can't tell what your overall setup is) using the same port as it tells you:

Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
180228 18:41:32 [ERROR] Do you already have another mysqld server running on port: 3306 ?

Try docker ps -a to see if there are other containers left that might be using that port. If there are, you can remove them individually or all via:

docker rm $(docker ps -aq)

If you are trying to bind to the host (your computer's) port as well as the container, you can run a port scan (search for how based on your OS) to see if it's in use there.

Upvotes: 1

Related Questions