Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ambari 2.5 create cluster registration host failed (connection refused)

Ambari 2.5 create cluster registration host failed (connection refused)

New Contributor

I recently installed 3 hosts centos7 from scratch to create a hadoop cluster using Ambari - latest 2.5.x

ssh is checked. passwordless checked

I'm using postgres db

Ambari wizard:

to when I click on Install options | 3 hosts | ssh key | Click 'Confirm Hosts'

16498-reg.jpg

from the log:

Command start time 2017-06-19 23:50:16
('WARNING 2017-06-19 20:35:35,699 NetUtil.py:93 - Failed to connect to https://ambarisrv:8440/connection_info due to [Errno 111] Connection refused  
INFO 2017-06-19 20:35:35,700 security.py:100 - SSL Connect being called.. connecting to the server
ERROR 2017-06-19 20:35:35,701 Controller.py:415 - Unable to reconnect to https://ambarisrv:8441/agent/v1/heartbeat/host1.localdomain (attempts=21, details=Request to https://ambarisrv:8441/agent/v1/heartbeat/host1.localdomain failed due to [Errno 111] Connection refused)
INFO 2017-06-19 20:35:52,609 Controller.py:277 - Heartbeat with server is running...
INFO 2017-06-19 20:35:52,610 NetUtil.py:62 - Connecting to https://ambarisrv:8440/connection_info
WARNING 2017-06-19 20:35:52,612 NetUtil.py:93 - Failed to connect to https://ambarisrv:8440/connection_info due to [Errno 111] Connection refused  
INFO 2017-06-19 20:35:52,612 security.py:100 - SSL Connect being called.. connecting to the server
ERROR 2017-06-19 20:35:52,613 Controller.py:415 - Unable to reconnect to https://ambarisrv:8441/agent/v1/heartbeat/host1.localdomain (attempts=22, details=Request to https://ambarisrv:8441/agent/v1/heartbeat/host1.localdomain failed due to [Errno 111] Connection refused)
...

if I do from host1:

[root@host1 ~]# wget https://ambarisrv:8440 --2017-06-19 23:59:03

-- https://ambarisrv:8440/ Resolving ambarisrv (ambarisrv)... 192.168.xx.xx

Connecting to ambarisrv (ambarisrv)|192.168.xx.xx|:8440... connected.

ERROR: cannot verify ambarisrv's certificate, issued by ‘/C=XX/L=Default City/O=Default Company Ltd’: Self-signed certificate encountered.

ERROR: certificate common name ‘’ doesn't match requested host name ‘ambarisrv'.

To connect to ambarisrv insecurely, use `--no-check-certificate'.

#if I run it with --no-check-certificate, it works.

[root@host1 ~]# wget https://ambarisrv:8440 --no-check-certificate --2017-06-19 23:59:20-- https://ambarisrv:8440/ Resolving ambarisrv (ambarisrv)... 192.168.xx.xx Connecting to ambarisrv (ambarisrv)|192.168.xx.xx|:8440... connected.

WARNING: cannot verify shark's certificate, issued by ‘/C=XX/L=Default City/O=Default Company Ltd’: Self-signed certificate encountered. WARNING: certificate common name ‘’ doesn't match requested host name ‘shark’. HTTP request sent, awaiting response... 200 OK Length: 0 Saving to: ‘index.html.1’ [ <=> ] 0 --.-K/s in 0s 2017-06-19 23:59:20 (0.00 B/s) - ‘index.html.1’ saved [0/0]

I'm sure it's not related to a server certificate or something of the likes

I checked the agents have been installed on both hosts but it's failing on the registration

It worked before I upgraded from Ambari 2.4. with 2.5 it seems to react differently??

Any thoughts on that??

Thanks!!!

4 REPLIES 4

Re: Ambari 2.5 create cluster registration host failed (connection refused)

Super Mentor

@Frank Kam

Few things to check.

1. The FQDN is setup properly for all those Agent machines properly? Can you please check the host "host1.localdomain" and then verify if the FQDN is set correctly? Is that returning the correct desired hostname that you are trying to register from ambari UI ?

Example:

# hostname -f

.

2. Ambari uses it;s own default keys (certificates) for communication between agent and server. But it would be worth checking if the following communication is happening fine or not? Run the following command from Ambari Agent machine (host1.localdomain)

# openssl s_client -connect $AMBARI_FQDN:8440

.

3. Make sure that ambari server has the "/etc/hosts" file entries to resolve the Agent HostNames with their FQDN. (Or you should have DNS mapping to resolve those hosts with their FQDN). Similarly Ambari Agents also should communicate with the ambari server using it's FQDN so please check the agents "/etc/hosts" file entries as well.

.

Please see:

https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-installation/content/edit_the_hos...

https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-installation/content/edit_the_net...

.

Re: Ambari 2.5 create cluster registration host failed (connection refused)

New Contributor

Thanks for your tips @Jay SenSharma

In fact I did try it with and without DN. my /etc/hosts files are properly defined on all 3 servers. I don't have use a DNS

the openssl test reveals that it's working. Even with just the ambari server name - not the FQDN.

I'm suspecting the embedded DB is the cause. We I used mysql in the previous ambari version - 2.4.x it was working on this step of the process - Registering the hosts.

So I changed to mysql , reset everything and retried in vain...

Any suggestions please?

Thanks!

Re: Ambari 2.5 create cluster registration host failed (connection refused)

New Contributor

Last attempt is to install and configure ambari agents manually which is very simple but when I start the agent I got this error:

Verifying ambari-agent process status... ERROR: ambari-agent start failed. For more details, see /var/log/ambari-agent/am bari-agent.out: ==================== from resource_management.libraries.functions import * File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions /__init__.py", line 25, in <module> from resource_management.libraries.functions.default import * File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions /default.py", line 24, in <module> from resource_management.libraries.script import Script File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/__ init__.py", line 23, in <module> from resource_management.libraries.script.script import * File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/sc ript.py", line 36, in <module> from ambari_commons.constants import UPGRADE_TYPE_HOST_ORDERED ImportError: cannot import name UPGRADE_TYPE_HOST_ORDERED ==================== Agent out at: /var/log/ambari-agent/ambari-agent.out Agent log at: /var/log/ambari-agent/ambari-agent.log

Any idea??

Re: Ambari 2.5 create cluster registration host failed (connection refused)

Super Mentor

@Frank Kam

The following error indicates that either you have OLD packages of ambari-agents installed on the host Or the ambari agent upgrade/installation was not completely successful.

/resource_management/libraries/script/script.py",line 36, in from ambari_commons.constants import UPGRADE_TYPE_HOST_ORDERED ImportError: cannot import name UPGRADE_TYPE_HOST_ORDERED =

.

Please try to reinstall ambari-agent. This should fix any missing agent package (Specially the missing python modules). Verify if it is the correct ambari agent RPM?

# rpm -qa | grep ambari
# yum reinstall ambari-agent -y

.

Don't have an account?
Coming from Hortonworks? Activate your account here