0034-CM启动报InnoDB engine not found分析

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了0034-CM启动报InnoDB engine not found分析相关的知识,希望对你有一定的参考价值。

温馨提示:要看高清无码套图,请使用手机打开并单击图片放大查看。

1.问题描述

cloudera-scm-server服务启动失败,日志报错如下:

2017-09-10 10:23:47,267 ERROR main:com.cloudera.enterprise.dbutil.DbUtil: InnoDB engine not found. Show engines reported: [MRG_MYISAM, CSV, MyISAM, MEMORY]
2017-09-10 10:23:47,268 ERROR main:com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean: InnoDb engine isn‘t present or enabled. SCM requires InnoDb mysql db engine.

技术分享图片

2.问题复现

测试环为CDH5.12.1,以下为复现步骤。

  1. 将/tmp目录修改为755权限
[[email protected] /]# chmod 755 tmp/
[[email protected] /]# ll
total 116
drwxr-xr-x. 231 root root 20480 Sep 10 15:48 tmp
[[email protected] /]# 

技术分享图片

2.重启mysql服务

[[email protected] /]# service mysqld restart
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
[[email protected] /]# 

技术分享图片

3.启动cloudera-scm-server服务

[[email protected] /]# service cloudera-scm-server restart
Stopping cloudera-scm-server:                               [  OK  ]
Starting cloudera-scm-server:                               [  OK  ]
[[email protected] /]#

4.查看启动日志报错如问题描述一致

技术分享图片

3.解决方法

将/tmp目录权限修改为777,重启mysql和cloudera-scm-server服务

  1. 修改/tmp目录权限为777
[[email protected] /]# chmod 777 tmp/
[[email protected] /]# ll
total 116
drwxrwxrwx. 231 root root 20480 Sep 10 15:48 tmp
[[email protected] /]# 

技术分享图片

2.重启msyql服务

[[email protected] /]# service mysqld restart
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
[[email protected] /]# 

技术分享图片

3.重启cloudera-scm-server服务

[[email protected] /]# service cloudera-scm-server restart
Stopping cloudera-scm-server:                               [  OK  ]
Starting cloudera-scm-server:                               [  OK  ]
[[email protected] /]#

CM正常启动,问题解决。

4.备注

  • 出现InnoDBengines not found

登录mysql通过show engines命令查看mysql引擎

mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                    | Transactions | XA   | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                      | NO           | NO   | NO         |
| CSV        | YES     | CSV storage engine                                         | NO           | NO   | NO         |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance     | NO           | NO   | NO         |
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys | YES          | YES  | YES        |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables  | NO           | NO   | NO         |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
5 rows in set (0.00 sec)

mysql> 

技术分享图片

注意:如果没有显示InnoDB Engine可能是/tmp目录权限不足导致,也可能是源码编译的时候未编译InnoDB引擎;

  • 可以通过showplugins命令查看mysql支持的插件
mysql> show plugins;
+------------+--------+----------------+---------+---------+
| Name       | Status | Type           | Library | License |
+------------+--------+----------------+---------+---------+
| binlog     | ACTIVE | STORAGE ENGINE | NULL    | GPL     |
| partition  | ACTIVE | STORAGE ENGINE | NULL    | GPL     |
| CSV        | ACTIVE | STORAGE ENGINE | NULL    | GPL     |
| MEMORY     | ACTIVE | STORAGE ENGINE | NULL    | GPL     |
| InnoDB     | ACTIVE | STORAGE ENGINE | NULL    | GPL     |
| MyISAM     | ACTIVE | STORAGE ENGINE | NULL    | GPL     |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL    | GPL     |
+------------+--------+----------------+---------+---------+
7 rows in set (0.00 sec)
mysql> 

技术分享图片

如果没有InnoDB则可以通过INSTALL命令安装

  • 使用INSTALL命令安装InnoDB

查看mysql插件安装目录

mysql> show variables like ‘plugin_dir‘; 
+---------------+-------------------------+
| Variable_name | Value                   |
+---------------+-------------------------+
| plugin_dir    | /usr/lib64/mysql/plugin |
+---------------+-------------------------+
1 row in set (0.00 sec)

技术分享图片

查看linux目录下是否有ha_innodb*.so的文件

[[email protected] ~]# cd /usr/lib64/mysql/plugin 
[[email protected] plugin]# ll
total 1416
lrwxrwxrwx 1 root root      25 Sep 10 15:47 ha_innodb_plugin.so -> ha_innodb_plugin.so.0.0.0
lrwxrwxrwx 1 root root      25 Sep 10 15:47 ha_innodb_plugin.so.0 -> ha_innodb_plugin.so.0.0.0
-rwxr-xr-x 1 root root 1259136 Jan 26  2017 ha_innodb_plugin.so.0.0.0
[[email protected] plugin]# 

技术分享图片

执行Install命令安装InnoDB引擎

mysql> INSTALL PLUGIN InnoDB SONAME ‘ha_innodb_plugin.so‘;
Query OK, 0 rows affected (0.23 sec)

mysql>

技术分享图片

如果没有ha_innodb_plugin.so文件则需要考虑重新编译InnoDB引擎。


醉酒鞭名马,少年多浮夸! 岭南浣溪沙,呕吐酒肆下!挚友不肯放,数据玩的花!

温馨提示:要看高清无码套图,请使用手机打开并单击图片放大查看。

推荐关注Hadoop实操,第一时间,分享更多Hadoop干货,欢迎转发和分享。

技术分享图片
原创文章,欢迎转载,转载请注明:转载自微信公众号Hadoop实操

以上是关于0034-CM启动报InnoDB engine not found分析的主要内容,如果未能解决你的问题,请参考以下文章

mysql数据库报错[Err] 1286 - Unknown storage engine 'InnoDB'

windows无法启动MySQL服务报错1067的解决方法是怎样?

Unknown/unsupported storage engine: InnoDB

无法启动 mysqld,引擎 InnoDB 不支持

mysql 启动报错

Activiti启动某个流程失败,页面报500