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.

ambari-server start exiting with code -1

Highlighted

ambari-server start exiting with code -1

New Contributor

Hi,


I just installed ambari-server on ubuntu 16.04.

However when I am trying to start the server using ambari-server start I am getting an error as below:-


Waiting for server start........................ERROR: Exiting with exit code -1.

REASON: Ambari Server java process has stopped. Please check the logs for more information.



The log file has logs as below:-


23 Mar 2019 13:34:14,203 INFO [main] ServiceModule:185 - Resolve service

23 Mar 2019 13:34:14,203 INFO [main] ServiceModule:198 - Display name service/parent: null/HBase

23 Mar 2019 13:34:14,203 INFO [main] ServiceModule:185 - Resolve service

23 Mar 2019 13:34:14,203 INFO [main] ServiceModule:198 - Display name service/parent: null/ZooKeeper

23 Mar 2019 13:34:14,203 INFO [main] ServiceModule:185 - Resolve service

23 Mar 2019 13:34:14,203 INFO [main] ServiceModule:198 - Display name service/parent: null/YARN

23 Mar 2019 13:34:14,204 INFO [main] ServiceModule:185 - Resolve service

23 Mar 2019 13:34:14,212 INFO [main] ServiceModule:198 - Display name service/parent: null/Pig

23 Mar 2019 13:34:14,254 INFO [Stack Version Loading Thread] RepoUrlInfoCallable:94 - Loading latest URL info from http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json for stacks HDP-2.3.GlusterFS,HDP-2.3.ECS,HDP-2.5,HDP-2.6,HDP-2.3,HDP-2.4,HDP-2.1.GlusterFS,HDP-2.1,HDP-2.2,HDP-2.0

23 Mar 2019 13:34:14,316 INFO [Stack Version Loading Thread] RepoUrlInfoCallable:110 - Loaded URI http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json for stacks HDP-2.3.GlusterFS,HDP-2.3.ECS,HDP-2.5,HDP-2.6,HDP-2.3,HDP-2.4,HDP-2.1.GlusterFS,HDP-2.1,HDP-2.2,HDP-2.0 in 64ms

23 Mar 2019 13:34:14,324 INFO [main] StackContext:208 - Loaded urlinfo in 85ms

23 Mar 2019 13:34:15,049 INFO [Stack Version Loading Thread] RepoVdfCallable:130 - Stack HDP-2.3 cannot resolve OS debian6 to the supported ones: suse11,redhat7,debian7,redhat6,ubuntu14,ubuntu12. Family: null

23 Mar 2019 13:34:15,583 INFO [Stack Version Loading Thread] RepoVdfCallable:130 - Stack HDP-2.4 cannot resolve OS debian6 to the supported ones: suse11,redhat7,debian7,redhat6,ubuntu14,ubuntu12. Family: null

23 Mar 2019 13:34:15,728 INFO [main] StackContext:250 - Loaded all VDF in 1403ms

23 Mar 2019 13:34:15,765 INFO [main] StackManager:252 - Creating links

23 Mar 2019 13:34:15,774 INFO [main] ActionDefinitionManager:130 - Added custom action definition for check_host

23 Mar 2019 13:34:15,775 INFO [main] ActionDefinitionManager:130 - Added custom action definition for update_repo

23 Mar 2019 13:34:15,775 INFO [main] ActionDefinitionManager:130 - Added custom action definition for clear_repocache

23 Mar 2019 13:34:15,775 INFO [main] ActionDefinitionManager:130 - Added custom action definition for validate_configs

23 Mar 2019 13:34:15,775 INFO [main] ActionDefinitionManager:130 - Added custom action definition for install_packages

23 Mar 2019 13:34:15,775 INFO [main] ActionDefinitionManager:130 - Added custom action definition for ru_execute_tasks

23 Mar 2019 13:34:15,776 INFO [main] ActionDefinitionManager:130 - Added custom action definition for remove_previous_stacks

23 Mar 2019 13:34:15,776 INFO [main] ActionDefinitionManager:130 - Added custom action definition for force_remove_packages

23 Mar 2019 13:34:15,790 INFO [main] UpdateActiveRepoVersionOnStartup:80 - Updating existing repo versions with service repos.

23 Mar 2019 13:34:15,797 INFO [main] CertificateManager:74 - Initialization of root certificate

23 Mar 2019 13:34:15,797 INFO [main] CertificateManager:76 - Certificate exists:true

23 Mar 2019 13:34:15,798 INFO [main] KerberosChecker:128 - Skipping Ambari Server Kerberos credentials check.

23 Mar 2019 13:34:16,405 INFO [main] Configuration:3183 - Credential provider creation failed. Reason: Master key initialization failed.

23 Mar 2019 13:34:16,916 INFO [main] CredentialStoreServiceImpl:59 - Initialized the temporary credential store. KeyStore entries will be retained for 90 minutes and will be actively purged

23 Mar 2019 13:34:16,917 INFO [main] AmbariManagementControllerImpl:370 - Initializing the AmbariManagementControllerImpl

23 Mar 2019 13:34:16,948 ERROR [main] AmbariServer:1078 - Failed to run the Ambari Server

com.google.inject.ProvisionException: Guice provision errors:


1) Error injecting constructor, java.net.UnknownHostException: ip-192-168-1-98: ip-192-168-1-98: Name or service not known

at org.apache.ambari.server.controller.AmbariManagementControllerImpl.<init>(AmbariManagementControllerImpl.java:364)

at org.apache.ambari.server.controller.AmbariManagementControllerImpl.class(AmbariManagementControllerImpl.java:229)

while locating org.apache.ambari.server.controller.AmbariManagementControllerImpl

while locating org.apache.ambari.server.controller.AmbariManagementController

at org.apache.ambari.server.agent.HeartBeatHandler.<init>(HeartBeatHandler.java:115)

at org.apache.ambari.server.agent.HeartBeatHandler.class(HeartBeatHandler.java:79)

while locating org.apache.ambari.server.agent.HeartBeatHandler


1 error

at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)

at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)

at org.apache.ambari.server.controller.AmbariServer.performStaticInjection(AmbariServer.java:903)

at org.apache.ambari.server.controller.AmbariServer.run(AmbariServer.java:307)

at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1072)

Caused by: java.net.UnknownHostException: ip-192-168-1-98: ip-192-168-1-98: Name or service not known

at java.net.InetAddress.getLocalHost(InetAddress.java:1505)

at org.apache.ambari.server.controller.AmbariManagementControllerImpl.<init>(AmbariManagementControllerImpl.java:371)

at org.apache.ambari.server.controller.AmbariManagementControllerImpl$$EnhancerByGuice$$41a297f2.<init>(<generated>)

at org.apache.ambari.server.controller.AmbariManagementControllerImpl$$EnhancerByGuice$$41a297f2$$FastClassByGuice$$8364e9c.newInstance(<generated>)

at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)

at com.google.inject.internal.ProxyFactory$ProxyConstructor.newInstance(ProxyFactory.java:260)

at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)

at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)

at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)

at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)

at com.google.inject.Scopes$1$1.get(Scopes.java:65)

at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)

at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)

at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)

at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)

at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)

at org.apache.ambari.server.agent.HeartbeatMonitor.<init>(HeartbeatMonitor.java:91)

at org.apache.ambari.server.agent.HeartBeatHandler.<init>(HeartBeatHandler.java:119)

at org.apache.ambari.server.agent.HeartBeatHandler$$FastClassByGuice$$710e5a0c.newInstance(<generated>)

at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)

at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)

at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)

at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)

at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)

at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)

at com.google.inject.Scopes$1$1.get(Scopes.java:65)

at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)

at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)

at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)

... 4 more

Caused by: java.net.UnknownHostException: ip-192-168-1-98: Name or service not known

at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)

at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)

at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)

at java.net.InetAddress.getLocalHost(InetAddress.java:1500)

... 36 more

root@ip-192-168-1-98:/var/log/ambari-server#


1 REPLY 1

Re: ambari-server start exiting with code -1

Super Mentor

@Mohanish Mahajan

The problem seems to be the FQDN / Hostname of the ambari server host. As we see the following Error:

Caused by: java.net.UnknownHostException: ip-192-168-1-98: ip-192-168-1-98: Name or service not known
        at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
        at org.apache.ambari.server.controller.AmbariManagementControllerImpl.<init>(AmbariManagementControllerImpl.java:371)

.

1. Can you please check if your FQDN is correctly set? Is it "ip-192-168-1-98" ?

2. What is the output of the following command?

# hostname -f
# hostname --fqdn

3. Can you please check if the hostname is correctly set inside the :

# cat /etc/hosts

.
Please refer to the following reference doc to know how to fix the FQDN on Ubuntu correctly?

https://unix.stackexchange.com/questions/322883/how-to-correctly-set-hostname-and-domain-name