ambari2.7 centos7 集群环境搭建 相关问题
参考的视频教程:https://www.bilibili.com/video/av80315899?from=search&seid=17212824355702368449
参考的资料:https://mp.weixin.qq.com/s?__biz=MzU3MTc1NzU0Mg==&mid=2247483940&idx=1&sn=7c35e51f61458ac5f92909a05012fb99&chksm=fcda04adcbad8dbbaa9d2ac970a502c70313ad8e7ab9e114c18a28573d70e8334e222dc4757f&scene=21#wechat_redirect
注意:这个中间下载的是ambari2.6版本后面遇到了非常大的问题,
建议跟着视频教程步骤做,一些语句可以参照图文教程的,
一、安装
执行ambari-server setup……的命令时并没有让配置数据库什么的信息,这种情况等你后面启动服务时就会报错了,
此时再执行一次setup操作就看到配置数据库了,
正常setup应该是这样的,
[root@hadoop1 hadoop]# ambari-server setup
Using python /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'enabled'
SELinux mode is 'permissive'
WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
OK to continue [y/n] (y)? y
Customize user account for ambari-server daemon [y/n] (n)? n
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Custom JDK
==============================================================================
Enter choice (1): 2
WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.
WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.
Path to JAVA_HOME: /usr/java/jdk1.8.0_151
Validating JDK on Ambari Server...done.
Check JDK version for Ambari Server...
JDK version found: 8
Minimum JDK version is 8 for Ambari. Skipping to setup different JDK for Ambari Server.
Checking GPL software agreement...
GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)? n
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? y
Configuring database...
==============================================================================
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL / MariaDB
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
[7] - BDB
==============================================================================
Enter choice (1): 3
Hostname (localhost): localhost
Port (3306): 3306
Database name (ambari): ambari
Username (ambari): ambari
Enter Database Password (bigdata):
Configuring ambari database...
Configuring remote database connection properties...
WARNING: Before starting Ambari Server, you must run the following DDL against the database to create the schema: /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
Proceed with configuring remote database connection properties [y/n] (y)? y
Extracting system views...
ambari-admin-2.7.1.0.169.jar
....
Ambari repo file doesn't contain latest json url, skipping repoinfos modification
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.
如果不是上面那样输出,会报以下错误:
启动服务时的报错信息:
ambari-server start
Using python /usr/bin/python
Starting ambari-server
ERROR: Exiting with exit code -1.
REASON: DB Name property not set in config file.
- If this is a new setup, then run the "ambari-server setup" command to create the user
- If this is an upgrade of an existing setup, run the "ambari-server upgrade" command.
Refer to the Ambari documentation for more information on setup and upgrade.
一般情况是数据库配置有问题,我这里是数据库登录密码错了,跟着教程配置的,结果配置启动链接数据库的信息时用了默认的登录密码,直接去数据库里改对密码就好了,
启动正确的命令行输出信息是这样的:
[root@hadoop1 hadoop]# ambari-server start
Using python /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start......................................
Server started listening on 8080
DB configs consistency check: no errors and warnings were found.
Ambari Server 'start' completed successfully.
二、Error executing bootstrap Cannot create /var/run/ambari-server/bootstrap【遇到的最大的坑,排查了两天了】
你能查到的解决办法应该是什么python版本要降到2.7以下,升级SSL等,
但有的人就说这种情况需要重装一下,ambari setup,反复安装重启不下五遍,问题依旧,
后来发现我要装ambari2.7,但是下载的版本却是2.6,然后yum卸载ambari,整个重新装,然后就没有这个问题了,
升级到2.7之后也遇到过一次这个问题,重置配置解决的:
ambari-server stop
ambari-server reset
如果是用的自己安装的数据库的话,需要删掉数据库的那个库,然后再建库,再用初始化文件进行初始化,
ambari-server setup (此时不要用类似ambari-server setup --jdbc-db=mysql --jdbc-driver=……带参数的命令,)
完成配置之后再
ambari-server start就行了,
三、那个java process 停止的问题
这个需要看一下server的日志,有可能是配置的数据库用户名密码不对,
四、ExecutionCommandWrapper:219 - Unable to lookup the cluster by ID; assuming t
如果日志里报了这个错,但是页面上能够正常安装完成,不报错和警告,那么就先不要管他,这是python2.6版本中某个函数循环有点问题,
五、删除SmartSense 服务
ambari-server stop
ambari主从节点上执行:
find / -name SMARTSENSE | xargs
rm-rf 删除其下文件
ambari-server start
这个只是临时方案吧,这种删除还不够,还要在基础安装程序里做进一步删除,才能清理干净,