cloudera-scm-server服务启动失败:
<pre style="margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(51, 51, 51); font-size: 17px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(43, 43, 43);">*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.</pre>
- 测试环为CDH5.12.1
- 将/tmp目录修改为755权限
[root@ip-186-31-6-148 /]# chmod 755 tmp/
[root@ip-186-31-6-148 /]# ll
total 116
drwxr-xr-x. 231 root root 20480 Sep 10 15:48 tmp
[root@ip-186-31-6-148 /]#
重启mysql服务
[root@ip-186-31-6-148 /]# service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[root@ip-186-31-6-148 /]#
启动cloudera-scm-server服务
[root@ip-186-31-6-148 /]# service cloudera-scm-server restart
Stopping cloudera-scm-server: [ OK ]
Starting cloudera-scm-server: [ OK ]
[root@ip-186-31-6-148 /]#
查看启动日志报错如上问题一致
解决方案
- 将/tmp目录权限修改为777,重启mysql和cloudera-scm-server服务
- 修改/tmp目录权限为777
[root@ip-186-31-6-148 /]# chmod 777 tmp/
[root@ip-186-31-6-148 /]# ll
total 116
drwxrwxrwx. 231 root root 20480 Sep 10 15:48 tmp
[root@ip-186-31-6-148 /]#
重启msyql服务
[root@ip-186-31-6-148 /]# service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[root@ip-186-31-6-148 /]#
重启cloudera-scm-server服务,即可解决问题
[root@ip-186-31-6-148 /]# service cloudera-scm-server restart
Stopping cloudera-scm-server: [ OK ]
Starting cloudera-scm-server: [ OK ]
[root@ip-186-31-6-148 /]#
总结
- 出现InnoDBengines not found
- 登录mysql通过show engines命令查看mysql引擎
- 如果没有显示InnoDB Engine可能是/tmp目录权限不足导致,也可能是源码编译的时候未编译InnoDB引擎;
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>
- 可以通过showplugins命令查看mysql支持的插件
- 如果没有InnoDB则可以通过INSTALL命令安装
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>
- 使用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的文件
[root@ip-186-31-6-148 ~]# cd /usr/lib64/mysql/plugin
[root@ip-186-31-6-148 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
[root@ip-186-31-6-148 plugin]#
- 执行Install命令安装InnoDB引擎
- 如果没有ha_innodb_plugin.so文件则需要考虑重新编译InnoDB引擎
mysql> INSTALL PLUGIN InnoDB SONAME 'ha_innodb_plugin.so';
Query OK, 0 rows affected (0.23 sec)
mysql>
大数据视频推荐:
CSDN
大数据语音推荐:
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通