Created 09-29-2014 12:52 AM
Hi All,
When I added a new node in cloudera cluster, The node went to bad health and shows error message like "The hostname and canonical name for this host are not consistent when checked from a Java process" Can any one help us to fix this issue.
Thanks,
Sathishkumar M
Created 09-29-2014 12:58 AM
Created 09-29-2014 01:23 AM
Created 06-21-2017 09:14 AM
Created 02-07-2017 06:34 PM
Hi , I also had the same issue in RHEL 7 . As suggested I modified the "HOSTNAME" attribute in /etc/sysconfig/network file to FQDN. Following that I also modified the hostname to FQDN using the following command:
hostnamectl set-hostname "<your hostname FQDN>" --static
Followed by this I restarted cloudera-scm-agent . This worked for me , there were no more critical warnings on hostname and canonical hostname .
Created 07-11-2018 04:16 PM
Created 07-12-2018 08:17 AM
Hi,
I see you are posting on a lot of different old threads. In the future, please create a new thread and explain the issue you are seeing like you did here. Thank you.
If you google "server IP address could not be found" you will find information that helps point you in the right direction about what that means. You are getting that in Chrome, I presume, so I also guess that you are attempting to connect to the Job History Server UI from a browser that is on a different host than nstance-1.c.12345678.internal
That means your local host (where your browser is installed) cannot resolve the hostname "nstance-1.c.12345678.internal". You will need to ensure your client host has hosts file or DNS configured to allow it to resolve the host to IP address.
Created on 05-21-2018 06:15 AM - edited 05-21-2018 06:24 AM
error still persists even after restarting
am using centOs 6
[root@instance-1 Admin]# hostname -f
instance-1.c.sacred-evening-197206.internal
[root@instance-1 Admin]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=instance-1.c.sacred-evening-197206.internal
[root@instance-1 Admin]#
what to do kindly suggest.
Created 05-21-2018 10:09 AM
hi @prabhat10,
Since this is an old thread, we should make sure you are indeed seeing the same issue that is described.
Please let us know what you are doing when you see the problem and what the problem is.
If you are seeing the message that is in the initial comment of this thread, then to get some more insight, I recommend running the DNSTest manually like this on a cluster host:
(make sure java is in your path or specify the full path to the java file)
# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest
The output will be a JSON format file like this:
{"status": "0", "ip": "122.168.100.211", "hostname": "host.example.com", "canonicalname": "host.example.com", "localhostDuration": "4", "canonicalnameDuration": "0" }
This might shed some light on what is going on. I'd check your hosts file or DNS depending on how your host resolution is configured on that host.
Regards,
Ben
Created on 05-21-2018 11:32 PM - edited 05-22-2018 12:23 AM
hello@bgooley
i have run this command
# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest
and get this as a output :
[root@instance-1 Admin]# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest
{"status": "0", "ip": "10.142.0.4", "hostname": "instance-1", "canonicalname": "instance-1.c.sacred-evening-197206.internal", "localhostDuration": "4", "canonicalnameDuration": "0" }
[root@instance-1 Admin]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=instance-1.c.sacred-evening-197206.internal
[root@instance-1 Admin]# java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)
[root@instance-1 Admin]# javac -version
bash: javac: command not found
do i need to run the above command on each hosts and other hosts java is not installed, do i need to instaal it manually. On doing java -version its showing command not found.
[root@instance-1 jdk1.7.0_67-cloudera]# alternatives --display java| grep Current
Current `best' version is /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java.
[root@instance-1 jdk1.7.0_67-cloudera]# ls /usr/java/
jdk1.7.0_67-cloudera
[root@instance-1 jdk1.7.0_67-cloudera]# ls /usr/java/jdk1.7.0_67-cloudera/
bin lib src.zip
COPYRIGHT LICENSE THIRDPARTYLICENSEREADME-JAVAFX.txt
db man THIRDPARTYLICENSEREADME.txt
include README.html
jre release
kindly suggest!!
Created on 05-23-2018 02:54 AM - edited 05-23-2018 03:00 AM
i have run this command on all hosts
# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest
and get this as a output :
[root@instance-1 Admin]# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest
{"status": "0", "ip": "10.142.0.4", "hostname": "instance-1", "canonicalname": "instance-1.c.sacred-evening-197206.internal", "localhostDuration": "4", "canonicalnameDuration": "0" }
[root@instance-2 Admin]# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest
{"status": "0", "ip": "10.142.0.5", "hostname": "instance-2", "canonicalname": "instance-2.c.sacred-evening-197206.internal", "localhostDuration": "5", "canonicalnameDuration": "0" }
[root@instance-3 Admin]# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.c loudera.cmon.agent.DnsTest
{"status": "0", "ip": "10.142.0.2", "hostname": "instance-3", "canonicalname": " instance-3.c.sacred-evening-197206.internal", "localhostDuration": "4", "canonic alnameDuration": "0" }
but in my /etc/sysconfig/network and /etc/hosts file i have mentioned FQDN then why its showing instance-1, instance-2, instance-3 while running above command.
What to do next kindly suggest.
Created 06-20-2018 10:06 AM
@prabhat10, I'm sorry that I couldn't reply sooner.
The DnsTest command is what Cloudera Manager runs to check your host and canonical host names.
The problem is that your hostname and canonical names are not the same:
"hostname": "instance-1",
"canonicalname": "instance-1.c.sacred-evening-197206.internal
My guess is this has to do with your /etc/hosts file or general DNS resolution
Have you defined the host in /etc/hosts?
If so, make sure it is in the following format:
IP FQDN
The FQDN name must be first
Created 05-23-2018 03:11 AM
i have run this command on all hosts
# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest
and get this as a output :
[root@instance-1 Admin]# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest
{"status": "0", "ip": "10.142.0.4", "hostname": "instance-1", "canonicalname": "instance-1.c.sacred-evening-197206.internal", "localhostDuration": "4", "canonicalnameDuration": "0" }
[root@instance-2 Admin]# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest
{"status": "0", "ip": "10.142.0.5", "hostname": "instance-2", "canonicalname": "instance-2.c.sacred-evening-197206.internal", "localhostDuration": "5", "canonicalnameDuration": "0" }
[root@instance-3 Admin]# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.c loudera.cmon.agent.DnsTest
{"status": "0", "ip": "10.142.0.2", "hostname": "instance-3", "canonicalname": " instance-3.c.sacred-evening-197206.internal", "localhostDuration": "4", "canonic alnameDuration": "0" }
but in my /etc/sysconfig/network and /etc/hosts file i have mentioned FQDN then why its showing instance-1, instance-2, instance-3 while running above command.
What to do next?
Kindly suggest