当前位置: 首页 > 知识库问答 >
问题:

无法在Ubuntu容器上启动Mariadb

范豪
2023-03-14

我在我的ubuntu映像容器上安装了mariadb-server,当我想启动mysql服务时它失败了,error.log文件包含:

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

首先,/run/mysqld目录是空的,下面出现错误

我创建了内容为1773的mysqld.sock文件,错误从“文件或目录不存在”更改为“111连接拒绝”。

问题出在哪里?

共有1个答案

支嘉祥
2023-03-14

您有另一个实例Docker或其他(无法告诉您整个设置是什么)使用与它告诉您的相同的端口:

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 ?

尝试Docker ps-a查看是否还有其他容器可能正在使用该端口。如果存在,您可以通过以下方式单独或全部删除它们:

docker rm$(docker PS-AQ)

如果您正在尝试绑定到主机(计算机的)端口以及容器,您可以运行端口扫描(根据您的操作系统搜索如何),以查看它是否在那里使用。

 类似资料:
  • 我想设置两台运行jstatd的服务器,这样我就可以动态监控我的应用程序。web服务器已经启动并运行,但另一台服务器总是会出现这样的异常。 无法将/JStatRemoteHost绑定到RMI注册表java。rmi。ServerException:服务器线程中发生RemoteException;嵌套的例外是:java。rmi。解组异常:错误解组参数;嵌套的例外是:java。lang.ClassNotF

  • 我有一个Ubuntu Xenial容器,在我的Arch Linux计算机上安装了amd64体系结构。容器工作正常。但是,当我第二次尝试启动容器时,出现以下错误: 容器启动失败。 要获得更多详细信息,请在前台模式下运行容器。 其他信息可以通过设置--logfile和--log优先级选项获得。 是什么原因造成的? 在使用-F、-logfile和--logpriority选项运行后得到了这个。 lxc开

  • 我在我的Ubuntu VM上安装了Hive和Hadoop。 当我在终端上启动时,我会得到以下信息: SLF4J:类路径包含多个SLF4J绑定。slf4j:在[jar:file:/opt/apache-hive-2.3.5-bin/lib/log4j-Slf4j-impl-2.6.2.jar!/org/slf4j/impl/staticloggerbinder.class]中找到绑定slf4j:在[

  • 我通过C API使用LXC,并简单地复制和粘贴了示例代码(如链接所示,但用我自己的函数名替换了)。然后从程序中的另一个代码块中调用它,我无法使容器正常启动。 调用只会返回false。如果我将第二个参数更改为start为0(意味着应该使用而不是/sbin/init),则start“成功”,但容器状态立即设置为,因此我无法连接到容器。 正在尝试通过设置获取日志: 只生成空文件。 想到这可能与我看到的另

  • 无法启动nginx服务器OS:ubuntu服务器16.04 systemctl status nginx.status抛出此消息:nginx.service-高性能web服务器和反向代理服务器加载:加载(/lib/systemd/system/nginx.service;enabled;vendor preset:enabled)活动:失败(结果:exit-code)自UTC Thu 2016-1

  • 我尝试安装Laravel 5.6在我的正式服,但我有这个错误: [错误] 12364#12364:*6 FastCGI在stderr中发送:"PHP消息:PHP警告:需要(/var/www/laravel/Public/.../供应商/autoload.php):未能打开流: /var/www/laravel/public/index.php中没有这样的文件或目录在第24行PHP消息:PHP致命错