Support Questions

Find answers, ask questions, and share your expertise

Ambari server starting error

avatar
Explorer

Hi All,

My ambari server is not coming up. please find the error below.

30 May 2018 08:58:44,155 ERROR [main] AmbariServer:1074 - Failed to run the Ambari Server com.google.inject.ProvisionException: Guice provision errors: 1) Error injecting method, java.lang.RuntimeException: Trying to create a ServiceComponent not recognized in stack info, clusterName=NIFA, serviceName=HDFS, componentName=NFS_GATEWAY, stackInfo=HDP-2.6 at org.apache.ambari.server.state.cluster.ClustersImpl.loadClustersAndHosts(ClustersImpl.java:173) at org.apache.ambari.server.state.cluster.ClustersImpl.class(ClustersImpl.java:95) while locating org.apache.ambari.server.state.cluster.ClustersImpl while locating org.apache.ambari.server.state.Clusters for parameter 0 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:899) at org.apache.ambari.server.controller.AmbariServer.run(AmbariServer.java:307)

30 May 2018 08:58:43,800 ERROR [main] StackContext:217 - Could not load repo results java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.net.NetworkClient.doConnect(NetworkClient.java:175)

11 REPLIES 11

avatar
Explorer

Hi all,

Any inputs on this issue. I am unable to access my cluster.

avatar
Master Mentor

@Mohamed Farook

Can you please share the complete ambari-server.log the complete stacktrace of the error helps.

In the above case we see some errors but that may or may not be related to your issue. So we will need to see the complete ambari-server.log 9and ambari-server.out)

avatar
Explorer

Server.out file:

==================

cat /var/log/ambari-server/ambari-server.out Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 An unexpected error occured during starting Ambari Server. com.google.inject.ProvisionException: Guice provision errors: 1) Error injecting method, java.lang.RuntimeException: Trying to create a ServiceComponent not recognized in stack info, clusterName=NIFA, serviceName=HDFS, componentName=NFS_GATEWAY, stackInfo=HDP-2.6 at org.apache.ambari.server.state.cluster.ClustersImpl.loadClustersAndHosts(ClustersImpl.java:173) at org.apache.ambari.server.state.cluster.ClustersImpl.class(ClustersImpl.java:95) while locating org.apache.ambari.server.state.cluster.ClustersImpl while locating org.apache.ambari.server.state.Clusters for parameter 0 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:899) at org.apache.ambari.server.controller.AmbariServer.run(AmbariServer.java:307) at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1068) Caused by: java.lang.RuntimeException: Trying to create a ServiceComponent not recognized in stack info, clusterName=NIFA, serviceName=HDFS, componentName=NFS_GATEWAY, stackInfo=HDP-2.6 at org.apache.ambari.server.state.ServiceComponentImpl.updateComponentInfo(ServiceComponentImpl.java:141) at org.apache.ambari.server.state.ServiceComponentImpl.<init>(ServiceComponentImpl.java:170) 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.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.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:632) at com.sun.proxy.$Proxy19.createExisting(Unknown Source) at org.apache.ambari.server.state.ServiceImpl.<init>(ServiceImpl.java:162) 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.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.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:632) at com.sun.proxy.$Proxy15.createExisting(Unknown Source) at org.apache.ambari.server.state.cluster.ClusterImpl.loadServices(ClusterImpl.java:427) at org.apache.ambari.server.state.cluster.ClusterImpl.<init>(ClusterImpl.java:318) 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.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.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:632) at com.sun.proxy.$Proxy11.create(Unknown Source) at org.apache.ambari.server.state.cluster.ClustersImpl.loadClustersAndHosts(ClustersImpl.java:181) at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:128) at org.apache.ambari.server.state.cluster.ClustersImpl$FastClassByGuice$7d58855f.invoke(<generated>) at com.google.inject.internal.cglib.reflect.$FastMethod.invoke(FastMethod.java:53) at com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:56) at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:90) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:94) 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.SingleParameterInjector.inject(SingleParameterInjector.java:38) at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84) 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 Exception in thread "main" org.apache.ambari.server.AmbariException: Error stopping the server at org.apache.ambari.server.controller.AmbariServer.stop(AmbariServer.java:880) at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1076)

avatar
Explorer

My server.log is huge I cant able to attach it here.

avatar
Master Mentor

@Mohamed Farooke

Based on the stackTrace that you posted here it looks like you have the "HDFS" directory missing in the following location:

# ls -ld /var/lib/ambari-server/resources/common-services/HDFS
(OR)
# ls -ld /var/lib/ambari-server/resources/common-services/HDFS/2.1.0.2.0
(OR)
# ls /var/lib/ambari-server/resources/common-services/HDFS/2.1.0.2.0
alerts.json  configuration  kerberos.json  metainfo.xml  metrics.json  package  widgets.json

.

Please check if the directory is present and has proper permission for the user who is running ambari server to read contents of this directory?

avatar
Explorer

~]# ls /var/lib/ambari-server/resources/common-services/HDFS/2.1.0.2.0 alerts.json configuration kerberos.json metainfo.xml metrics.json package widgets.json

avatar
Master Mentor

@Mohamed Farook

Please check if the directory is present and has proper permission for the user who is running ambari server to read contents of this directory?

Are you starting ambari-server as "root" user?

# ls -ld /var/lib/ambari-server/resources/common-services/HDFS
# ls -ld /var/lib/ambari-server/resources/common-services/HDFS/2.1.0.2.0

avatar
New Contributor

Then downgrade ambari server. now Ambari server could not start with this error: 29 Nov 2016 18:17:56297 ERROR [main] AmbariServer:819 .. or contatc us in Lenovo support number

avatar
Explorer

I have removed and re-installed the ambari-server package alone. Its working fine now.

ambari-server status Using python /usr/bin/python Ambari-server status Ambari Server running Found Ambari Server PID: 23648 at: /var/run/ambari-server/ambari-server.pid

Will it be any data loss if I re-installed the ambari-server?. How to find whtether data is lost or not?