The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

HDP on Linux – Installation Forum

Confirming and registering hosts fails

  • #34054

    I am installing HDP 1.2.1 on a virtual machine with centOS 6.4 using ambari.(a single node cluster)
    I am stuck in step 3 of Hadoop Installation,”confirm hosts”.
    It passes the “installing” successfully but fails during “registering”.
    I get these results on different log files:

    no log files exist in path : /var/log/ambari-server/
    I removed the “ambari-server.log” before running the step3 again.but after it,nothing was generated here.

    in path: /var/log/ambari-agent/

    the file “ambari-agent.out” is empty (i.e. 0 Lines)

    the file: “ambari-agent.log”:
    the part in which error starts is here:
    INFO 2013-08-28 21:32:02,251 Controller.py:87 – Registering with the server ‘{“hardwareProfile”: {“lsbrelease”: “:base-4.0-amd64:base-4.0-noarch:core-4.0-a(this line contains server info…)
    INFO 2013-08-28 21:32:02,251 security.py:48 – SSL Connect being called.. connecting to the server
    INFO 2013-08-28 21:32:02,329 Controller.py:103 – Unable to connect to: https://localhost:8441/agent/v1/register/CentOS-DM-VM
    Traceback (most recent call last):
    File “/usr/lib/python2.6/site-packages/ambari_agent/Controller.py”, line 88, in registerWithServer
    response = self.sendRequest(self.registerUrl, data)
    File “/usr/lib/python2.6/site-packages/ambari_agent/Controller.py”, line 235, in sendRequest
    self.cachedconnect = security.CachedHTTPSConnection(self.config)
    File “/usr/lib/python2.6/site-packages/ambari_agent/security.py”, line 76, in __init__
    self.connect()
    File “/usr/lib/python2.6/site-packages/ambari_agent/security.py”, line 81, in connect
    self.httpsconn.connect()
    File “/usr/lib/python2.6/site-packages/ambari_agent/security.py”, line 65, in connect
    ca_certs=server_crt)
    File “/usr/lib64/python2.6/ssl.py”, line 338, in wrap_socket
    suppress_ragged_eofs=suppress_ragged_eofs)
    File “/usr/lib64/python2.6/ssl.py”, line 120, in __init__
    self.do_handshake()
    File “/usr/lib64/python2.6/ssl.py”, line 279, in do_handshake
    self._sslobj.do_handshake()
    SSLError: [Errno 8] _ssl.c:490: EOF occurred in violation of protocol

    I have installed ambari 1.2.4.9.and using ambari 1.2.0.1 as local repository.(since 1.2.4.9 package does not include the /1.x/GA subdirectory but,this directory is introduced in “ambari.repo” & “hdp.repo” and “‘hdp-util.repo” files)

    another error that I got in log files was:
    “nio:651 – javax.net.ssl.SSLHandshakeException: General SSLEngine problem”

    What’s the problem? Can any one help?
    tnx.

  • Author
    Replies
  • #34064

    The other errors I get is:

    in the path: “/var/run/ambari-server/bootstrap/3/ ”
    the file: “bootstrap.out” => 0 Lines
    the file: “bootstrap.err” contains some data that seems to explain a successful operation.
    the file: “localhost.localdomain.done” contains only 1 line: “0”
    and the file: “localhost.localdomain.log” contains following data:

    STDOUT

    STDERR
    STDOUT
    Cluster primary OS type is redhat6 and local OS type is centos6

    STDERR
    tcgetattr: Invalid argument
    Connection to localhost.localdomain closed.
    STDOUT
    sudo-1.8.6p3-7.el6.x86_64

    STDERR
    tcgetattr: Invalid argument
    Connection to localhost.localdomain closed.
    STDOUT

    STDERR
    STDOUT

    STDERR
    tcgetattr: Invalid argument
    Connection to localhost.localdomain closed.
    STDOUT

    STDERR
    STDOUT
    Repository HDP-UTILS-1.1.0.15 is listed more than once in the configuration
    Repository HDP-UTILS-1.1.0.15 is listed more than once in the configuration
    Error: No matching Packages to list
    Repository HDP-UTILS-1.1.0.15 is listed more than once in the configuration
    Repository HDP-UTILS-1.1.0.15 is listed more than once in the configuration
    Error: No matching Packages to list
    Repository HDP-UTILS-1.1.0.15 is listed more than once in the configuration
    Repository HDP-UTILS-1.1.0.15 is listed more than once in the configuration
    Repository HDP-UTILS-1.1.0.15 is listed more than once in the configuration
    Repository HDP-UTILS-1.1.0.15 is listed more than once in the configuration
    Verifying Python version compatibility…
    Using python /usr/bin/python2.6
    Checking for previously running Ambari Agent…
    Starting ambari-agent
    Verifying ambari-agent process status…
    tput: unknown terminal “unknown”
    Ambari Agent successfully started
    tput: unknown terminal “unknown”
    Agent PID at: /var/run/ambari-agent/ambari-agent.pid
    Agent log at: /var/log/ambari-agent/ambari-agent.out
    (‘INFO 2013-08-28 21:31:57,118 shell.py:50 – Killing stale processes\nINFO 2013-08-28 21:31:57,137 shell.py:58 – Killed stale processes\nINFO 2013-08-28 21:31:57,138 main.py:141 – Connecting to the server at: https://localhost:8440\nINFO 2013-08-28 21:31:57,138 NetUtil.py:68 – DEBUG: Trying to connect to the server at https://localhost:8440\nINFO 2013-08-28 21:31:57,138 NetUtil.py:44 – DEBUG:: Connecting to the following url https://localhost:8440/cert/ca\nINFO 2013-08-28 21:31:57,459 NetUtil.py:51 – DEBUG: Calling url received 200\nINFO 2013-08-28 21:31:57,459 main.py:149 – Creating certs\nINFO 2013-08-28 21:31:57,460 security.py:136 – Server certicate exists, ok\nINFO 2013-08-28 21:31:57,460 security.py:144 – Agent key exists, ok\nINFO 2013-08-28 21:31:57,460 security.py:152 – Agent certificate exists, ok\nINFO 2013-08-28 21:31:57,501 Hardware.py:140 – Using facter home as: /usr/lib/ambari-agent/lib/facter-1.6.10\nINFO 2013-08-28 21:31:57,519 Hardware.py:153 – Setting RUBYLIB as: :/usr/lib/ambari-agent/lib/facter-1.6.10/lib/\n’, None)

    STDERR
    tcgetattr: Invalid argument
    Connection to localhost.localdomain closed.

    what should I do to solve these errors?

    #35852

    Thank God!
    I Solved this issue!
    for those who may encounter the same problem.I share my experience:

    Since I was trying to set up a single node cluster,In the “Install Options” step,I used these names as the host name:
    either this one:
    “localhost”
    or this:
    “localhost.localdomain”
    which are resolved into 127.0.0.1 by the etc/hosts file.
    The problem is exactly here!
    You should not use a name that is resolved to 127.0.0.1!
    Since I am not using a DNS server,I added my arbitrary FQDN to hosts file as below:
    192.168.0.75 centos6.local
    and I tried the whole process of ambari installation from scratch(just to make sure that nothing is wrong with name resolution.in fact,I am not sure whether it is necessary) ,and in the “install options” step, I used “centos6.local” as the hostname, and it passed the “Confirm Hosts” step successfully.

    #54238
    William Degnan
    Participant

    I dont think changing the host name fixed the problem, but you bypassed the real issue in doing what you did by switching to centos6.local. During the confirm hosts step a python script is called that reads ambari-agent.ini to look up the host name. It seems as if this script or something else appends to the host name the host extension value AGAIN making it impossible to find the host and thus bombing. I was tracing through the install and I found the issue.

    What worked for me – Before you run the Ambari installation, check ambari-agent.ini in /etc/ambari-agent.conf you’ll should expect to see a line that matches your HOST (for example):
    hostname=localhost.localdomain

    Mine was incorrectly written-
    hostname=localhost.localdomain.localdomain.localdomain

    …so, after I cleaned up the script and re-ran the install I was able to get past the CONFIRM HOSTS step

    I am running CentOS 6.5 Ambari 1.5 HD 2.2

    #64659
    David Novogrodsky
    Participant

    I am having a problem with Ambari.
    I am trying to use Ambari to install Hadoop to a three node cluster. the name node is where the Ambari server is located. I am getting this error:
    ERROR 2014-12-12 17:39:56,963 main.py:137 – Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (namenode). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly
    ‘, None)

    Here is the contents of my hosts file:
    127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 localhost.namenode namenode
    ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
    xxx.xxx.200.144 localhost.datanode10
    xxx.xxx.200.107 localhost.datanode01
    xxx.xxx.200.143 localhost.namenode namenode

    I am not sure what the problem is. Since there are only four steps to run ambari there is not a lot of background to determine the cause of this problem.

    #78507
    Jenny Tam
    Participant

    I hit the exact same error during installation. Can someone help please?

    Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (namenode). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly

    #78994
    John Luko
    Participant

    Confirm in the /etc/hosts file that all of the nodes have been entered:

    xxx.xxx.xxx.xxx <hostname>

    Enter hostname and hostname -f to make sure that for both the fqdn is coming back correctly.

    Go into /etc/sysconfig/network and confirm the hostname has been properly setup there.  If you make a change there, just be sure to restart your network service.

    From each of the nodes make sure you can ping each of the hosts via their hostnames

    Finally, verify that the reverse dns is coming back correctly as well (hostname <ip address>) should return the hostname for the machine (properly in reverse)

    On your Ambari host confirm all of the above is working.

    I know when I first started my impression was that if I had DNS setup properly you didn’t need to worry about /etc/hosts , but that was not the case.

The forum ‘HDP on Linux – Installation’ is closed to new topics and replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.