Ambari部署中问题及解决方法

Ambari部署中问题及解决方法

问题:因集群互信或其他问题导致的Ambari集群部署时Confirm Hosts无法通过。

解决方法:通过对每台机器安装配置ambari-agent,在界面上选择手动安装和注册的方式通过验证

  1. 复制 ambari-server 机器的 yum.repo 到其他的节点机器上;
  2. 通过 yum install ambari-agent 安装 ambari-agent;
  3. 修改 /etc/ambari/conf/ambari.ini 的相关配置;
    1. 所有机器的配置只需要修改 hostName,其他的默认即可;
    2. 所有配置文件的 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
  1. 使用ambari-agent start 启动 ambari-agent 服务;
  2. 在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 步骤出现缺失基础包情况

解决方法:

  1. 确保 yum 包的版本与操作系统保持一致
  2. 所有节点机器与主节点机器使用的 yum 包保持一致
  3. 在 yum 包中缺失依赖包导致安装错误时,可以手动安装 rpm 包解决(例如:libtirpc-devel-0.2.1-15.el6.x86_64.rpm需要独立安装)

版权声明:本文为zx711166原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。