Ambari部署中問題及解決方法
問題:因集羣互信或其他問題導致的Ambari集羣部署時Confirm Hosts無法通過。
解決方法:通過對每臺機器安裝配置ambari-agent,在界面上選擇手動安裝和註冊的方式通過驗證
- 複製 ambari-server 機器的 yum.repo 到其他的節點機器上;
- 通過 yum install ambari-agent 安裝 ambari-agent;
- 修改 /etc/ambari/conf/ambari.ini 的相關配置;
- 所有機器的配置只需要修改 hostName,其他的默認即可;
- 所有配置文件的 hostname 配置項 填寫主節點的 hostName(主機名,系統上可以通過 hostname 命令查詢)。
[server]
hostname=masterHostName
url_port=8440
secured_url_port=8441
connect_retry_delay=10
max_reconnect_retry_delay=30
[agent]
logdir=/var/log/ambari-agent
piddir=/var/run/ambari-agent
prefix=/var/lib/ambari-agent/data
;loglevel=(DEBUG/INFO)
loglevel=INFO
data_cleanup_interval=86400
data_cleanup_max_age=2592000
data_cleanup_max_size_MB = 100
ping_port=8670
cache_dir=/var/lib/ambari-agent/cache
tolerate_download_failures=true
run_as_user=root
parallel_execution=0
alert_grace_period=5
status_command_timeout=5
alert_kinit_timeout=14400000
system_resource_overrides=/etc/resource_overrides
; memory_threshold_soft_mb=400
; memory_threshold_hard_mb=1000
; ignore_mount_points=/mnt/custom1,/mnt/custom2
[security]
keysdir=/var/lib/ambari-agent/keys
server_crt=ca.crt
passphrase_env_var_name=AMBARI_PASSPHRASE
ssl_verify_cert=0
credential_lib_dir=/var/lib/ambari-agent/cred/lib
credential_conf_dir=/var/lib/ambari-agent/cred/conf
credential_shell_cmd=org.apache.hadoop.security.alias.CredentialShell
[network]
; this option apply only for Agent communication
use_system_proxy_settings=true
[services]
pidLookupPath=/var/run/
[heartbeat]
state_interval_seconds=60
dirs=/etc/hadoop,/etc/hadoop/conf,/etc/hbase,/etc/hcatalog,/etc/hive,/etc/oozie,
/etc/sqoop,
/var/run/hadoop,/var/run/zookeeper,/var/run/hbase,/var/run/templeton,/var/run/oozie,
/var/log/hadoop,/var/log/zookeeper,/var/log/hbase,/var/run/templeton,/var/log/hive
; 0 - unlimited
log_lines_count=300
idle_interval_min=1
idle_interval_max=10
[logging]
syslog_enabled=0
- 使用ambari-agent start 啓動 ambari-agent 服務;
- 在Ambari的配置界面上選擇 Perform manual rgistration on hosts and do not use SSH 選項即可,然後點擊 Register and Confirm 進行下一步。
[外鏈圖片轉存失敗,源站可能有防盜鏈機制,建議將圖片保存下來直接上傳(img-NVZ1ldwj-1579059563963)(/image/7b2ca3a2-e03b-489f-8894-e0391cd33f4b)]
問題:Ambari在Install, Start and Test 步驟出現缺失基礎包情況
解決方法:
- 確保 yum 包的版本與操作系統保持一致
- 所有節點機器與主節點機器使用的 yum 包保持一致
- 在 yum 包中缺失依賴包導致安裝錯誤時,可以手動安裝 rpm 包解決(例如:libtirpc-devel-0.2.1-15.el6.x86_64.rpm需要獨立安裝)