Support Questions
Find answers, ask questions, and share your expertise

Ambari fails when registering node (Amazon EC2)

Ambari fails when registering node (Amazon EC2)

New Contributor

Hi, I am trying to use Apache Ambari to configure a Hadoop cluster on EC2.

During the registration phase I get this error:

Command start time 2016-11-23 20:25:12
('Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 312, in <module>
    main(heartbeat_stop_callback)
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 248, in main
    stop_agent()
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 198, in stop_agent
    sys.exit(1)
SystemExit: 1
INFO 2016-11-23 20:25:18,716 ExitHelper.py:53 - Performing cleanup before exiting...
INFO 2016-11-23 20:25:18,907 main.py:74 - loglevel=logging.INFO
INFO 2016-11-23 20:25:18,907 DataCleaner.py:39 - Data cleanup thread started
INFO 2016-11-23 20:25:18,908 DataCleaner.py:120 - Data cleanup started
INFO 2016-11-23 20:25:18,909 DataCleaner.py:122 - Data cleanup finished
INFO 2016-11-23 20:25:18,930 PingPortListener.py:50 - Ping port listener started on port: 8670
INFO 2016-11-23 20:25:18,931 main.py:289 - Connecting to Ambari server at https://IPADDRESS.us-west-2.compute.internal:8440 (172.31.37.172)
INFO 2016-11-23 20:25:18,931 NetUtil.py:59 - Connecting to https://IPADDRESS.us-west-2.compute.internal:8440/ca
ERROR 2016-11-23 20:25:18,983 NetUtil.py:77 - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
ERROR 2016-11-23 20:25:18,983 NetUtil.py:78 - SSLError: Failed to connect. Please check openssl library versions. 
Refer to: https://bugzilla.redhat.com/show_bug.cgi?id=1022468 for more details.
WARNING 2016-11-23 20:25:18,983 NetUtil.py:105 - Server at https://IPADDRESS.us-west-2.compute.internal:8440 is not reachable, sleeping for 10 seconds...
', None)
('Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 312, in <module>
    main(heartbeat_stop_callback)
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 248, in main
    stop_agent()
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 198, in stop_agent
    sys.exit(1)
SystemExit: 1
INFO 2016-11-23 20:25:18,716 ExitHelper.py:53 - Performing cleanup before exiting...
INFO 2016-11-23 20:25:18,907 main.py:74 - loglevel=logging.INFO
INFO 2016-11-23 20:25:18,907 DataCleaner.py:39 - Data cleanup thread started
INFO 2016-11-23 20:25:18,908 DataCleaner.py:120 - Data cleanup started
INFO 2016-11-23 20:25:18,909 DataCleaner.py:122 - Data cleanup finished
INFO 2016-11-23 20:25:18,930 PingPortListener.py:50 - Ping port listener started on port: 8670
INFO 2016-11-23 20:25:18,931 main.py:289 - Connecting to Ambari server at https://IPADDRESS.us-west-2.compute.internal:8440 (172.31.37.172)
INFO 2016-11-23 20:25:18,931 NetUtil.py:59 - Connecting to https://IPADDRESS.us-west-2.compute.internal:8440/ca
ERROR 2016-11-23 20:25:18,983 NetUtil.py:77 - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
ERROR 2016-11-23 20:25:18,983 NetUtil.py:78 - SSLError: Failed to connect. Please check openssl library versions. 
Refer to: https://bugzilla.redhat.com/show_bug.cgi?id=1022468 for more details.
WARNING 2016-11-23 20:25:18,983 NetUtil.py:105 - Server at https://IPADDRESS.us-west-2.compute.internal:8440 is not reachable, sleeping for 10 seconds...
', None)


Connection to IPADDRESS.us-west-2.compute.internal closed.
SSH command execution finished
host=IPADDRESS.us-west-2.compute.internal, exitcode=0
Command end time 2016-11-23 20:25:21


Registering with the server...
Registration with the server failed.

I think it is something basic, but I was not able to solve.

Any advice?

Thank you

6 REPLIES 6

Re: Ambari fails when registering node (Amazon EC2)

There are two ways to get to a successful registration in Ambari:

  1. Provide an ssh key in Ambari UI: This allows Ambari Server to install Ambari-Agent on all machines (Installation...) and add its address into all the /etc/ambari-agent/conf/ambari-agent.ini so that the comnmunication between Ambari Server and Agents will work. Finally Ambari checks whether the communication between all nodes and Ambari Server works (Registration ...)
  2. Manually install Amabri Agent on all machines (including Ambari Server machine) and edit "hostname=" under "[server]" in /etc/ambari-agent/conf/ambari-agent.ini on each machine. Now ssh key is not necessary in UI and Ambari Server will only check for working communication (Registration ...)

For both scenarios ensure that Ambari server can reach all nodes and all nodes can reach Ambari Server machine (any firewall running?)

Re: Ambari fails when registering node (Amazon EC2)

... and be sure to check reachability with the hostnames you enter into Ambari UI

Re: Ambari fails when registering node (Amazon EC2)

New Contributor

Hi, thanks for your answer!

I get the same error. Actually I have only one machine and I can SSH to itself using the hostname that I am passing to the Ambari UI.

I also tried the manual installation with no luck. I disabled the firewall using `sudo ufw disable`.

Re: Ambari fails when registering node (Amazon EC2)

Super Collaborator

check hostnames are properly configured in all the machines.

Re: Ambari fails when registering node (Amazon EC2)

Mentor

@Andrea Ialenti

The contents of /etc/ambari-agent/conf/ambari-agent.ini

[server]
hostname=<ambari_server FQDN> 
url_port=8440 
secured_url_port=8441

And I hope you executed the below steps

- Generated ssh with 
- Set perimssion 700 for .ssh and 640 for the contents in .ssh
- Disabled the Firewall/iptables
- Disable SELinux
- Disabled THP
- Configured NTPD service 

Re: Ambari fails when registering node (Amazon EC2)

New Contributor

I didn't think about SELinux. I'll try tomorrow. Thanks for the hint!