Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Ambari host registration issue

Rising Star

I have installed Ambari-server and agent on the same host but not able to add them as part of the ambari cluster as it fails to register. Below is the output of Ambari-agent.log file. 

 

Screen Shot 2020-02-28 at 5.44.15 PM.png

 

 

INFO 2020-02-28 02:59:33,768 PingPortListener.py:50 - Ping port listener started on port: 8670

INFO 2020-02-28 02:59:33,771 main.py:439 - Connecting to Ambari server at https://hdp.0lw5ekcxj3kufbug3aze5gfphe.bx.internal.cloudapp.net:8440 (127.0.0.1)

INFO 2020-02-28 02:59:33,771 NetUtil.py:70 - Connecting to https://hdp.0lw5ekcxj3kufbug3aze5gfphe.bx.internal.cloudapp.net:8440/ca

INFO 2020-02-28 02:59:33,841 main.py:449 - Connected to Ambari server hdp.0lw5ekcxj3kufbug3aze5gfphe.bx.internal.cloudapp.net

INFO 2020-02-28 02:59:33,852 hostname.py:67 - agent:hostname_script configuration not defined thus read hostname 'HDP' using socket.getfqdn().

INFO 2020-02-28 02:59:33,853 threadpool.py:58 - Started thread pool with 3 core threads and 20 maximum threads

WARNING 2020-02-28 02:59:33,853 AlertSchedulerHandler.py:280 - [AlertScheduler] /var/lib/ambari-agent/cache/alerts/definitions.json not found or invalid. No alerts will be scheduled until registration occurs.

"/var/log/ambari-agent/ambari-agent.log" [readonly] 414L, 50499C

2 REPLIES 2

Rising Star

Some more info:

 

INFO 2020-02-28 02:59:33,768 PingPortListener.py:50 - Ping port listener started on port: 8670

INFO 2020-02-28 02:59:33,771 main.py:439 - Connecting to Ambari server at https://hdp.0lw5ekcxj3kufbug3aze5gfphe.bx.internal.cloudapp.net:8440 (127.0.0.1)

INFO 2020-02-28 02:59:33,771 NetUtil.py:70 - Connecting to https://hdp.0lw5ekcxj3kufbug3aze5gfphe.bx.internal.cloudapp.net:8440/ca

INFO 2020-02-28 02:59:33,841 main.py:449 - Connected to Ambari server hdp.0lw5ekcxj3kufbug3aze5gfphe.bx.internal.cloudapp.net

INFO 2020-02-28 02:59:33,852 hostname.py:67 - agent:hostname_script configuration not defined thus read hostname 'HDP' using socket.getfqdn().

INFO 2020-02-28 02:59:33,853 threadpool.py:58 - Started thread pool with 3 core threads and 20 maximum threads

WARNING 2020-02-28 02:59:33,853 AlertSchedulerHandler.py:280 - [AlertScheduler] /var/lib/ambari-agent/cache/alerts/definitions.json not found or invalid. No alerts will be scheduled until registration occurs.

INFO 2020-02-28 02:59:33,853 AlertSchedulerHandler.py:175 - [AlertScheduler] Starting <ambari_agent.apscheduler.scheduler.Scheduler object at 0x7fe60a61cfd0>; currently running: False

INFO 2020-02-28 02:59:33,865 hostname.py:106 - Read public hostname 'hdp' using socket.getfqdn()

INFO 2020-02-28 02:59:33,865 Hardware.py:68 - Initializing host system information.

INFO 2020-02-28 02:59:33,874 Hardware.py:188 - Some mount points were ignored: /dev/shm, /run, /sys/fs/cgroup, /run/user/1000

INFO 2020-02-28 02:59:33,894 hostname.py:67 - agent:hostname_script configuration not defined thus read hostname 'HDP' using socket.getfqdn().

INFO 2020-02-28 02:59:33,900 Facter.py:202 - Directory: '/etc/resource_overrides' does not exist - it won't be used for gathering system resources.

INFO 2020-02-28 02:59:33,905 Hardware.py:73 - Host system information: {'kernel': 'Linux', 'domain': '', 'physicalprocessorcount': 2, 'kernelrelease': '3.10.0-1062.9.1.el7.x86_64', 'uptime_days': '0', 'memorytotal': 7990252, 'swapfree': '2.00 GB', 'memorysize': 7990252, 'osfamily': 'redhat', 'swapsize': '2.00 GB', 'processorcount': 2, 'netmask': '255.255.255.0', 'timezone': 'UTC', 'hardwareisa': 'x86_64', 'memoryfree': 1985308, 'operatingsystem': 'redhat', 'kernelmajversion': '3.10', 'kernelversion': '3.10.0', 'macaddress': '00:0D:3A:8A:DE:15', 'operatingsystemrelease': '7.7', 'ipaddress': '10.0.0.8', 'hostname': 'hdp', 'uptime_hours': '12', 'fqdn': 'hdp', 'id': 'root', 'architecture': 'x86_64', 'selinux': True, 'mounts': [{'available': '3983556', 'used': '0', 'percent': '0%', 'device': 'devtmpfs', 'mountpoint': '/dev', 'type': 'devtmpfs', 'size': '3983556'}, {'available': '2016956', 'used': '69956', 'percent': '4%', 'device': '/dev/mapper/rootvg-rootlv', 'mountpoint': '/', 'type': 'xfs', 'size': '2086912'}, {'available': '8762208', 'used': '1713312', 'percent': '17%', 'device': '/dev/mapper/rootvg-usrlv', 'mountpoint': '/usr', 'type': 'xfs', 'size': '10475520'}, {'available': '384244', 'used': '121336', 'percent': '24%', 'device': '/dev/sda2', 'mountpoint': '/boot', 'type': 'xfs', 'size': '505580'}, {'available': '501824', 'used': '9896', 'percent': '2%', 'device': '/dev/sda1', 'mountpoint': '/boot/efi', 'type': 'vfat', 'size': '511720'}, {'available': '2053688', 'used': '33224', 'percent': '2%', 'device': '/dev/mapper/rootvg-tmplv', 'mountpoint': '/tmp', 'type': 'xfs', 'size': '2086912'}, {'available': '4209180', 'used': '4169188', 'percent': '50%', 'device': '/dev/mapper/rootvg-varlv', 'mountpoint': '/var', 'type': 'xfs', 'size': '8378368'}, {'available': '1005240', 'used': '33096', 'percent': '4%', 'device': '/dev/mapper/rootvg-homelv', 'mountpoint': '/home', 'type': 'xfs', 'size': '1038336'}, {'available': '1943884', 'used': '143028', 'percent': '7%', 'device': '/dev/mapper/rootvg-optlv', 'mountpoint': '/opt', 'type': 'xfs', 'size': '2086912'}, {'available': '46685624', 'used': '2150432', 'percent': '5%', 'device': '/dev/sdb1', 'mountpoint': '/mnt/resource', 'type': 'ext4', 'size': '51473824'}], 'hardwaremodel': 'x86_64', 'uptime_seconds': '46242', 'interfaces': 'eth0,lo'}

@                                                                                                                                                                                    @                                                                                                                                                                                    @                                                                                                                                                     

You need to set the hostname as FQDN for the machine.  Then map this in ETC hosts to the server ip.   Next Setup Password less SSH Keys (ssh-keygen cmd).  Once you do this the agent will register w/o issues.

 

For example:

     hostnamectl set-hostname  hdp.cloudera.com 

and add this to host file /etc/hosts

     10.0.0.8 hdp.cloudera.com

then:

      ssh-keygen

Next cat the keys:

     cat ~/.ssh/id_rsa.pub

     cat ~/.ssh.id_rsa 

 

 

 

Put the key (~/.ssh/id_rsa.pub) for the same server in ~/.ssh/authorized keys.  Next you can ssh from root to root@hostname.   Do this the first time then accept YES to login.  Next go to ambari, and register the agent to ambari server using the FQDN hostname not the IP address or "hdp".  You can use the ssh key here (~/.ssh/id_rsa) during registration.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.