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 server: registration with the server failed

Solved Go to solution
Highlighted

Re: Ambari server: registration with the server failed

Mentor

@Kou_Bou 

Is this problem still persisting? Please let me know  tag me !

Highlighted

Re: Ambari server: registration with the server failed

Explorer

Hello @Shelton Yes the problem persists, any solutions please, I think the java version is causing this issue but I don't know how to change it 

Highlighted

Re: Ambari server: registration with the server failed

Explorer

Hello @sagarshimpi thank you for your reply, you find below information that you recommended, Sorry for been late to reply I reinstall all from beginning but I have the same issue:

[root@ambari ~]# java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)

  

[root@ambari ~]# ls -ltr `which java`
lrwxrwxrwx 1 root root 22 Nov 18 13:33 /usr/bin/java -> /etc/alternatives/java

 

[root@ambari /]# /usr/sbin/alternatives --config java

There is 1 program that provides 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64/jre/bin/java)

Enter to keep the current selection[+], or type selection number:
[root@ambari /]# rpm -qa |grep openssl
openssl-1.0.2k-19.el7.x86_64
xmlsec1-openssl-1.2.20-7.el7_4.x86_64
openssl-libs-1.0.2k-19.el7.x86_64

 

[root@ambari /]# rpm -qa |grep ambari
ambari-metrics-grafana-2.4.0.1-1.x86_64
ambari-metrics-monitor-2.4.0.1-1.x86_64
ambari-metrics-hadoop-sink-2.4.0.1-1.x86_64
ambari-metrics-collector-2.4.0.1-1.x86_64
ambari-agent-2.4.0.1-1.x86_64
ambari-server-2.4.0.1-1.x86_64

 

[root@ambari /]# telnet ambari.server   8440
Trying 192.168.253.45...
Connected to ambari.server.
Escape character is '^]'.

ambari-agent.log

WARNING 2019-11-24 11:57:11,522 NetUtil.py:116 - Server at <a href="https://ambari.server:8440" target="_blank">https://ambari.server:8440</a> is not reachable, sleeping for 10 seconds...
INFO 2019-11-24 11:57:21,522 NetUtil.py:62 - Connecting to <a href="https://ambari.server:8440/ca" target="_blank">https://ambari.server:8440/ca</a>
ERROR 2019-11-24 11:57:21,527 NetUtil.py:88 - EOF occurred in violation of protocol (_ssl.c:618)
ERROR 2019-11-24 11:57:21,527 NetUtil.py:89 - SSLError: Failed to connect. Please check openssl library versions.
Refer to: <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1022468" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1022468</a> for more details.
WARNING 2019-11-24 11:57:21,528 NetUtil.py:116 - Server at <a href="https://ambari.server:8440" target="_blank">https://ambari.server:8440</a> is not reachable, sleeping for 10 seconds...
INFO 2019-11-24 11:57:31,528 NetUtil.py:62 - Connecting to <a href="https://ambari.server:8440/ca" target="_blank">https://ambari.server:8440/ca</a>
ERROR 2019-11-24 11:57:31,533 NetUtil.py:88 - EOF occurred in violation of protocol (_ssl.c:618)
ERROR 2019-11-24 11:57:31,534 NetUtil.py:89 - SSLError: Failed to connect. Please check openssl library versions.
Refer to: <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1022468" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1022468</a> for more details.
WARNING 2019-11-24 11:57:31,534 NetUtil.py:116 - Server at <a href="https://ambari.server:8440" target="_blank">https://ambari.server:8440</a> is not reachable, sleeping for 10 seconds...
Highlighted

Re: Ambari server: registration with the server failed

Expert Contributor

@Kou_Bou  Thank you for the detailed output. As suspected the issue is with Java.

You need to try using Oracle Java and test.

Also as highlighted by @Shelton i too agree to use supported version and change java as per suggested steps.

Do revert if you still face issue.

 

 

Highlighted

Re: Ambari server: registration with the server failed

Mentor

@Kou_Bou 

 

Okay, now since you are having problems I would like first to confirm your HDP version I see you are on RHEL 7 I hope it's not higher than 7.6 as RHEL 7.7 is not yet certified with HDP or HDF see compatibility matrix 

To successfully deploy HDP you need to have strictly followed the Hortonworks stack installation document  please confirm that you executed every step therein.

I suspect a couple of issues like Firewall or passwordless ssh config issues but that can be overcome with manual registration of the hosts, the following step is valid for a single/multinode cluster let's get started.

In the below steps, I am assuming you ex3cuted the steps in the above 2 documents

First I would like you to use a fictitious domain name [hadoop.com]for you cluster this will help me eliminate other possible issues, I am assuming you have 2 servers and enough RAM at least 12-16 GB with 2 CPUs

Servers

master                         [Ambari-server + database + other component]
node1                          [datanode ] + n

 

But the above step is valid for even a single node cluster to execute all the below steps as root

Set hostname on Ambari server

# hostnamectl set-hostname master.hadoop.com
Verify the hostname

# hostnamectl
The desired output should be master.hadoop.com

If not using single node do this on the subsequent hosts do the same for the remaining hosts

Set hostname on other hosts

# hostnamectl set-hostname nodex.hadoop.com

Get the IP's

On all the hosts get the IP using
# ifconfig
Note all the IP's including that of the Ambari server, now get the hostname of all the hosts in the cluster using


Note all the output should be an FQDN. Edit the /etc/hosts on the Ambari server

[master.hadoop.com] and the IP or IP's in the format IP FQDN ALIAS in case of multinode i.e

 

192.168.1.20 master.hadoop.com master
192.168.1.21 nodex.hadoop.com nodex

 

If it's a multinode make sure you copy the hosts file to all other nodes !!!

Check the repos are well set

# ls -al /etc/yum.repos.d/
.....
ambari.repo
hdp.repo

The hdp and ambari repos should be accessible

# yum repolist

 

Install Ambari server

# yum install -y ambari-server

 

Setup Ambari

In the below step I preparing the Ambari for Mysql or MAriaDB and NOT the embedde postgres database. I realise you were using embedded change to Mysql or MariaDB open source version of MySQL for this step I will use MariaDB but the connector is the same

# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar

Backup the ambari.properties

# cp /etc/ambari-server/conf/ambari.properties /etc/ambari-server/conf/ambari.properties.bak

 

To change the default timeout of the ambari server run the below snippets

# echo 'server.startup.web.timeout=120' >> /etc/ambari-server/conf/ambari.properties
# echo 'server.jdbc.connection-pool.acquisition-size=5' >> /etc/ambari-server/conf/ambari.properties
# echo 'server.jdbc.connection-pool.max-age=0' >> /etc/ambari-server/conf/ambari.properties
# echo 'server.jdbc.connection-pool.max-idle-time=14400' >> /etc/ambari-server/conf/ambari.properties
# echo 'server.jdbc.connection-pool.max-idle-time-excess=0' >> /etc/ambari-server/conf/ambari.properties
# echo 'server.jdbc.connection-pool.idle-test-interval=7200' >> /etc/ambari-server/conf/ambari.properties

update OS and restart  the server 

# yum update
# init 6

Install MariaDB 10.x compatibile with HDP 2.6.x - 3.x

# yum install -y MariaDB-server

 

Startup mariaDB and configure auto-start at boot

# systemctl enable mariadb.service
# systemctl start mariadb.service

 

Check MariaDB is up

# systemctl status mariadb

 

Secure the MariaDB and change password important to change the default password 

# /usr/bin/mysql_secure_installation

You already have a root password set, so you can safely answer 'n'. If you answer Y then set a new password for MariaDB

Change the root password? [Y/n] Y   

Most important the rest just answer y ]

Remove anonymous users? [Y/n] y
... Success

Disallow root login remotely? [Y/n] y
... Success!

Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reload privilege tables now? [Y/n] y
... Success!
....

Thanks for using MariaDB!

 

Assuming you changed the root password to welcome1 and I am using ambari as the user,password and database name

mysql -u root -pwelcome1
CREATE USER 'ambari'@'%' IDENTIFIED BY 'ambari';
GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'%';
CREATE USER 'ambari'@'localhost' IDENTIFIED BY 'ambari';
GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'localhost';
CREATE USER 'ambari'@'tokyo.com' IDENTIFIED BY 'ambari';
GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'master.hadoop.com';
FLUSH PRIVILEGES;

 

Log on as Ambari user and create the Ambari DB

mysql -u ambari -pambari
CREATE DATABASE ambari;
USE ambari;
SOURCE /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;
exit;

 

Create the hive, ranger, oozie, rangerkms as required again here I am simplifying by using hive as the user, password and name you database an do the same for ranger,oozie,rangerkms

# mysql -u root -pwelcome1
CREATE USER 'hive'@'localhost' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost';
CREATE USER 'hive'@'%' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%';
CREATE USER 'hive'@'master.hadoop.com' IDENTIFIED BY '[HIVE_PASSWORD]';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'master.hadoop.com';
FLUSH PRIVILEGES;
CREATE DATABASE hive;
quit;

Run the Ambari DB setup

# ambari-server setup

 

To use MariaDB database, and select the ambari database name, user name, and password created earlier for that database, so enter 3.
When asked do not enable Ambari to automatically download and install LZO !!!

After finalizing the setup start

# yum install -y ambari-agent

 

Edit the ambari-agent.ini on all the node including the ambari server,change the entry below,hostname should be the name of the ambari host master.hadoop.com

vi /etc/ambari-agent/conf/ambari-agent.ini


[server]
hostname=master.hadoop.com
url_port=8440
secured_url_port=8441
connect_retry_delay=10
max_reconnect_retry_delay=30

 

Save


On the Ambari server and any other node install ambari-agent and start it


Start the ambari server

# ambari-server start

 

Hit the Ambari UI

http://master.hadoop.com:8080


This time use the option manual registration see screenshot

 

ambari.PNG

 

The host(s) should register successfully!

Highlighted

Re: Ambari server: registration with the server failed

Mentor

@Kou_Bou 
If you want to change the java here is the procedure, I just test the link works so just copy and paste as other links are broken.

I see you are using OpenJDK

 

Remove OpenJDK 

# yum list java*
# yum -y remove java*
# java -version


Install latest Oracle Java JDK

# cd /opt/

wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=yippi ka yei madafaka;" "http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-lin..."

tar xzf jdk-8u144-linux-x64.tar.gz
cd /opt/jdk1.8.0_144/
alternatives --install /usr/bin/java java /opt/jdk1.8.0_144/bin/java 2
alternatives --config java
alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_144/bin/jar 2
alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_144/bin/javac 2
alternatives --set jar /opt/jdk1.8.0_144/bin/jar
alternatives --set javac /opt/jdk1.8.0_144/bin/javac

 

Check the new  default java

# java -version

java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b11, mixed mode)

That now should work 

 

Highlighted

Re: Ambari server: registration with the server failed

Explorer

Hello @Shelton , thank you for your reply, I'm trying to change the version of java according to steps that you gave for me but I have a problem with the file jdk-8u144-linux-x64.tar.gz :

 This is the error : ( I think the problem in the file ?? I trying other links but there are no links valid 

[root@ambari opt]# tar xzf jdk-8u144-linux-x64.tar.gz

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
[root@ambari opt]#

 

Highlighted

Re: Ambari server: registration with the server failed

Expert Contributor

@Kou_Bou 

 

I suspect the file is not fully downloaded or corrupted either. You can check the size or checksum of the downloaded file.

 

You can try downloading the file from - https://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html

 

The size display on link is

176.92 MB jdk-8u144-linux-x64.tar.gz

Re: Ambari server: registration with the server failed

Explorer

Hello @Shelton  and @Shelton  thank you for your help, changing java version didn't give a result , in my ambari-server.log I have this warning, is it may be have a relation with the agent registration ?: 

The error: 

25 Nov 2019 13:01:04,738  WARN [ambari-client-thread-28] nio:720 - javax.net.ssl.SSLException: Received fatal alert: certificate_unknow

 

Highlighted

Re: Ambari server: registration with the server failed

Explorer

Hello @Shelton thank for this reply, a sad news that my OS version "CentOS Linux release 7.7.1908 (Core)", so what is the solution ( downgrade the OS but how ?)

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