Reply
Highlighted
New Contributor
Posts: 3
Registered: ‎07-20-2018

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

My cloudera manager reports hostname inconsistent error. The cloest thread is https://community.cloudera.com/t5/Cloudera-Manager-Installation/The-hostname-and-canonical-name-for-..., but it's for redhat dist. My dist is debian based.

 

/etc/hosts is configured with following content

 

 

# ip    hostname.domain    hostname
x.x.x.x myhost.mydomain.com myhost

 

With above setting, hostname -i, hostname -f, hostname can correctly interpete correct value.

 

If chaning to

 

# ip    hostname.domain    hostname
x.x.x.x myhost.mydomain.com myhost.mydomain.com

 

or

 

# ip    hostname.domain    hostname
x.x.x.x myhost myhost

 

Command hostname throws "hostname: Name or service not known" message.

 

Am I missing any configuration?

 

 

Posts: 749
Topics: 1
Kudos: 175
Solutions: 95
Registered: ‎04-22-2014

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

@willnopt,

 

The inconsistent notification message is generated based on the output of:

# java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest

 

Try running that on your host when your hosts file is configured with:


# ip    hostname.domain    hostname
x.x.x.x myhost.mydomain.com myhost

 

Announcements