Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

The hostname and canonical name for this host are not consistent

avatar
Expert Contributor

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

Thanks,
Sathish (Satz)
2 ACCEPTED SOLUTIONS

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
25 REPLIES 25

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Expert Contributor

Thanks Gautam, It  is working. 

 

But, Other nodes in the same cluster dont have this FQDN in that path /etc/sysconfig/network and those are working fine.Is there any specific reason?

Thanks,
Sathish (Satz)

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Expert Contributor

Yes,The onliner diplaying the FQDN in both the nodes.  But we tried after removing that FQDN in /etc/sysconfig/network file also and we got the same output.

Thanks,
Sathish (Satz)

avatar
Just editing the entry won't suffice. Changes to that file need a reboot to
take effect.

Regards,
Gautam Gopalakrishnan

avatar
Expert Contributor

Thanks Gautam for your reply. We checked only after the reboot.

Thanks,
Sathish (Satz)

avatar
From what I understand, you have some hosts with HOSTNAME=server1 and some with HOSTNAME=server1.example.com. CM does not complain about all hosts which have HOSTNAME=server1. Is this right?

Are you able to provide the python script output from both types of hosts? What OS are these hosts running?
Regards,
Gautam Gopalakrishnan

avatar
Expert Contributor

Network file for that node which is in bad health before change 

cat /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=node10

 

Output of Python code

 

python -c "import socket; print socket.getfqdn(); print
socket.gethostbyname(socket.getfqdn())"

 

node10.cluster1.com

 

Network file for that node which is already in good health

 

cat /etc/sysconfig/network

 

python -c "import socket; print socket.getfqdn(); print
socket.gethostbyname(socket.getfqdn())"

 

node6.cluster1.com

 

 

 

Thanks

Sathishkumar M

 

Thanks,
Sathish (Satz)

avatar
Satish, I am failing to see the problem here. Maybe I'm missing something obvious?

You were getting warnings for node10 earlier but don't any more. Does node6 have "HOSTNAME=node6" and still doesn't generate warnings?
Regards,
Gautam Gopalakrishnan