Reply
Contributor
Posts: 48
Registered: ‎04-26-2017

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

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

Expert Contributor
Posts: 109
Registered: ‎05-19-2016

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

I tried doing it. Indeed they match

Explorer
Posts: 6
Registered: ‎10-09-2018

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

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.

Expert Contributor
Posts: 109
Registered: ‎05-19-2016

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

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.

Explorer
Posts: 6
Registered: ‎10-09-2018

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

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.

Expert Contributor
Posts: 109
Registered: ‎05-19-2016

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

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

Explorer
Posts: 6
Registered: ‎10-09-2018

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

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.

Highlighted
Expert Contributor
Posts: 109
Registered: ‎05-19-2016

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

[ Edited ]

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 :)

Announcements