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.

hostname and canonical name for this host are not consistent when checked from a Java process

Re: hostname and canonical name for this host are not consistent when checked from a Java process

Rising Star

I had this problem in the past.  Turns out a DNA record was set up correctly.  Try doing a nslookup on the machine to get ip, then do a nslookup on the IP.  Ensure both the machine names displayed are the same

Re: hostname and canonical name for this host are not consistent when checked from a Java process

Expert Contributor

I tried doing it. Indeed they match

Re: hostname and canonical name for this host are not consistent when checked from a Java process

Explorer

I am having similar issue. We are using cloudera on GCP VM using Centos 7.

 

The problem is even when i have set the hostname to FQDN using hostname from root, looks like gcp reverts back the hostname to shortname causing the dnsTest to fail. Does anyone knows how to resolve this problem? Seems google is running a cron job that sets the hostname to short name.

Re: hostname and canonical name for this host are not consistent when checked from a Java process

Expert Contributor

It happened to us when we ported our servers from AWS to GCP using cloud endure. Created GCP VM instance directly and it got fixed.

Re: hostname and canonical name for this host are not consistent when checked from a Java process

Explorer

We did not use endure, we are creating new GCP VMs using terraform and installing fresh cloudera manager on top of it. However, the hostname keeps changing to shortname even after setting the hostname to fqdn manually.

Re: hostname and canonical name for this host are not consistent when checked from a Java process

Expert Contributor

sad. Basically, hostname gets reset on network restart that happens every few hours in GCP hence the issue. GCP support suggested us to reset it using cron but that completely f**ed up our server communication. Suggest you to get in touch with GCP support since Cloudera or any other entity won't be able to help with this as far as I know

Re: hostname and canonical name for this host are not consistent when checked from a Java process

Explorer

Thanks much for the response. We are thinking of creating a cron job that sets it back, but agree it may impact our cluster. We will get in touch with GCP support to understand alternatives. Thank you.

Re: hostname and canonical name for this host are not consistent when checked from a Java process

Expert Contributor

Setting the cron job will take this particular error away but eventually, you are bound to run into a lot of other issues.

 

Feel free to try though. Also, let me know your experience after trying that :)