Support Questions
Find answers, ask questions, and share your expertise

Host not found, hostname=

Highlighted

Re: Host not found, hostname=

Super Mentor

@Tom Burke

You can also open the same URL from the Browser where you have logged in the Ambari UI as well.

http://ambari.example.com:8443/api/v1/clusters/cluster-name/hosts?fields=Hosts/ip,Hosts/host_name

.

(OR) You can use the following curl call to produce the JSON output to some file like "/tmp/hosts.json". Also pleas emake sure to use the correct cluster name in the same URL.

# curl -k -H "X-Requested-By: ambari" -u admin:admin "http://ambari.example.com:8443/api/v1/clusters/cluster-name/hosts?fields=Hosts/ip,Hosts/host_name" -o "/tmp/hosts.json"

.

Highlighted

Re: Host not found, hostname=

Expert Contributor

hi @Jay Kumar SenSharma,

i am upgrading from HDP 2.6.2 to HDP 3.1, i am using Ambari 2.7.3.0 and currently stuck on (generate missing principal ), my cluster is kerberized, the machine hosting ambari server doesn't have ambari agent, and i am also getting the same error (host not found) for the ambari master machine , below is the exact error from ambari server log


2019-05-07 16:55:58,023  WARN [Server Action Executor Worker 3611] ServerActionExecutor:471 - Task #3611 failed to complete execution due to thrown exception: org.apache.ambari.server.HostNotFoundException:Host not found, hostname=MYHOSTNAME.com
org.apache.ambari.server.HostNotFoundException: Host not found, hostname=MYHOSTNAME.com
        at org.apache.ambari.server.state.cluster.ClustersImpl.getHost(ClustersImpl.java:456)
        at org.apache.ambari.server.state.ConfigHelper.getEffectiveDesiredTags(ConfigHelper.java:189)
        at org.apache.ambari.server.state.ConfigHelper.getEffectiveDesiredTags(ConfigHelper.java:173)
        at org.apache.ambari.server.controller.AmbariManagementControllerImpl.findConfigurationTagsWithOverrides(AmbariManagementControllerImpl.java:2371)
        at sun.reflect.GeneratedMethodAccessor424.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:50)
        at com.sun.proxy.$Proxy131.findConfigurationTagsWithOverrides(Unknown Source)
        at org.apache.ambari.server.state.ConfigHelper.calculateExistingConfigurations(ConfigHelper.java:2158)
        at org.apache.ambari.server.controller.KerberosHelperImpl.calculateConfigurations(KerberosHelperImpl.java:1725)
        at org.apache.ambari.server.controller.KerberosHelperImpl.getActiveIdentities(KerberosHelperImpl.java:1800)
        at org.apache.ambari.server.serveraction.kerberos.KerberosServerAction.calculateServiceIdentities(KerberosServerAction.java:511)
        at org.apache.ambari.server.serveraction.kerberos.KerberosServerAction.processIdentities(KerberosServerAction.java:455)
        at org.apache.ambari.server.serveraction.kerberos.CreatePrincipalsServerAction.execute(CreatePrincipalsServerAction.java:92)
        at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.execute(ServerActionExecutor.java:550)
        at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.run(ServerActionExecutor.java:466)
        at java.lang.Thread.run(Thread.java:745)


can you please suggest what to do?

Highlighted

Re: Host not found, hostname=

Contributor

@jsensharma This issue has been observed in the internal lab cluster as well.

 

curl -H "X-Requested-By: ambari" -u admin:pnarayanasamy"http://c2237-node1.labs.support.hortonworks.com:8080/api/v1/clusters/c2237/hosts"

 

ambari server & kdc host c2237-node1.labs.support.hortonworks.com is not listed in the items array response.

 

/etc/hosts having only one fqdn for all the ip's.

 

 


Screenshot 2019-10-24 at 7.52.31 PM.png
Highlighted

Re: Host not found, hostname=

New Contributor

Hi all,

 

I had faced the same issue while kerberizing a HDP 3.1.0 cluster integrated with Iislon.

The Ambari serer is a built on a Postgres DB cluster, hence it was NOT in the hadoop cluster.

so it was NOT on the host list.

[root@hdpdb ~]# curl -H "X-Requested-By: ambari" -u admin:admin "http://hdpdb.gz.local:8080/api/v1/clusters/Panyu/hosts"

 

 

I had to add the ambari server from adding host wizard and just install the clients.

It worked around the "Host not found, hostname= xxxx" issue in my case. 

jakezhang_0-1593645522241.png

 

 

Hope it will help, cheer! 

Don't have an account?