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.

Unable to start Ambari

Highlighted

Unable to start Ambari

Explorer

[hadoop@omiprihdp01ap ~]$ sudo ambari-server restart
Using python /usr/bin/python
Restarting ambari-server
Ambari Server is not running
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start........................................ERROR: Exiting with exit code -1.
REASON: Ambari Server java process has stopped. Please check the logs for more information.
[hadoop@omiprihdp01ap ~]$ cd /var/log/ambari-server/

[hadoop@omiprihdp01ap ambari-server]$ tail -50 /var/log/ambari-server/ambari-server.log
at org.apache.ambari.server.orm.DBAccessorImpl$$FastClassByGuice$$86dbc63e.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.FactoryProxy.get(FactoryProxy.java:54)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53)
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.SingleFieldInjector.inject(SingleFieldInjector.java:53)
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.SingleFieldInjector.inject(SingleFieldInjector.java:53)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:75)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:73)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:73)
at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:147)
at com.google.inject.internal.Initializer.injectAll(Initializer.java:92)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:173)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1045)
Caused by: java.net.UnknownHostException: host
at java.net.InetAddress.getAllByName0(InetAddress.java:1280)
at java.net.InetAddress.getAllByName(InetAddress.java:1192)
at java.net.InetAddress.getAllByName(InetAddress.java:1126)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:249)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:307)
... 57 more

6 REPLIES 6

Re: Unable to start Ambari

Super Mentor

@Sherrine Green Thompson

As we see the error as following:

Caused by: java.net.UnknownHostException: host
    at java.net.InetAddress.getAllByName0(InetAddress.java:1280)
    at java.net.InetAddress.getAllByName(InetAddress.java:1192)
    at java.net.InetAddress.getAllByName(InetAddress.java:1126)
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:249)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:307)


It indicates that you might have not executed the # ambari-server setup command properly hence your Ambari server's Database setup is not done properly.

We see that MySQL Db url might not be set properly hence you are getting this error "UnknownHostException: host" Here ambari is expecting that mysql server hostname is 'host' instead of actual hostname.

So please check your ambari server property file to see what is wrong. Hence please check and share the output of the following command

# grep 'jdbc' /etc/ambari-server/conf/ambari.properties 


And also verify if you have performed the steps mentioned in the following doc properly?
https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.0/bk_ambari-administration/content/using_amba...

**NOTE:** Please check if the MySQL database host name is properly set inside the "ambari.properties" properties of your ambari.properties or not? Please correct it and then restart ambari server.

server.jdbc.url

.

Highlighted

Re: Unable to start Ambari

Explorer
Highlighted

Re: Unable to start Ambari

Super Mentor

@Sherrine Green Thompson

Please provide the information which is requested, so that we can verify of you have missed anything while following the doc.

Specially the output of the following command:

# grep 'jdbc' /etc/ambari-server/conf/ambari.properties <br>

.

We want to see what is th value you have set for "server.jdbc.url" and "server.jdbc.hostname" What is the host name specified in these properties and are those correct?

The following error clearly indicates that you have specified Wrong Host name for your MySQL database. So you will basically need to check if you have incorrectly specified MySQL hostname by looking at your "ambari.properties"

Caused by: java.net.UnknownHostException: host<strong></strong>

.

Highlighted

Re: Unable to start Ambari

Explorer

$ grep 'jdbc' /etc/ambari-server/conf/ambari.properties
server.jdbc.connection-pool=c3p0
server.jdbc.connection-pool.acquisition-size=5
server.jdbc.connection-pool.idle-test-interval=7200
server.jdbc.connection-pool.max-age=0
server.jdbc.connection-pool.max-idle-time=14400
server.jdbc.connection-pool.max-idle-time-excess=0
server.jdbc.database=mysql
server.jdbc.database_name=ambari_db
server.jdbc.driver=com.mysql.jdbc.Driver
server.jdbc.hostname=localhost
server.jdbc.port=3306
server.jdbc.rca.driver=com.mysql.jdbc.Driver
server.jdbc.rca.url=jdbc:mysql://omiprihdp01ap.mufep.net:3306/ambari_db
server.jdbc.rca.user.name=ambari_user
server.jdbc.rca.user.passwd=/etc/ambari-server/conf/password.dat
server.jdbc.url=jdbc:mysql://omiprihdp01ap.mufep.net:3306/ambari_db
server.jdbc.user.name=ambari_user
server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat

Highlighted

Re: Unable to start Ambari

Explorer

$ grep 'jdbc' /etc/ambari-server/conf/ambari.properties
server.jdbc.connection-pool=c3p0
server.jdbc.connection-pool.acquisition-size=5
server.jdbc.connection-pool.idle-test-interval=7200
server.jdbc.connection-pool.max-age=0
server.jdbc.connection-pool.max-idle-time=14400
server.jdbc.connection-pool.max-idle-time-excess=0
server.jdbc.database=mysql
server.jdbc.database_name=ambari_db
server.jdbc.driver=com.mysql.jdbc.Driver
server.jdbc.hostname=localhost
server.jdbc.port=3306
server.jdbc.rca.driver=com.mysql.jdbc.Driver
server.jdbc.rca.url=jdbc:mysql://omiprihdp01ap.mufep.net:3306/ambari_db
server.jdbc.rca.user.name=ambari_user
server.jdbc.rca.user.passwd=/etc/ambari-server/conf/password.dat
server.jdbc.url=jdbc:mysql://omiprihdp01ap.mufep.net:3306/ambari_db
server.jdbc.user.name=ambari_user
server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat

Highlighted

Re: Unable to start Ambari

Mentor

@Sherrine Green Thompson

Going back to the basics can you connect successfully to the database? Run the below command the MySQL database host omiprihdp01ap.mufep.net if you secured your database remote root login has been disabled.

# mysql -u ambari_user -p{ambari_user_password} 
mysql> show databases; 
mysql> use ambari_db; 

You should have 103 tables, If you can logon successfully then validate that you can also succeed through Ambari UI for other components like hive,oozie or ranger

HTH

Don't have an account?
Coming from Hortonworks? Activate your account here