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

 

這個只是臨時方案吧,這種刪除還不夠,還要在基礎安裝程序里做進一步刪除,才能清理干凈,


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM