Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ambari-server start error (REASON: Ambari Server java process died with exitcode 255)

avatar
New Contributor

I am new to this. i've tried installing ambari and on the first try, i was able to start the ambari-server. but when i tried again, an error occurred.

Using python /usr/bin/python

Starting ambari-server

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.........Unable to determine server PID. Retrying...

......Unable to determine server PID. Retrying...

......Unable to determine server PID. Retrying...

ERROR: Exiting with exit code -1.

REASON: Ambari Server java process died with exitcode 255.

the /var/log/ambari-server/ambari-server.out gave me:


Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0

Jul 10, 2019 10:02:23 PM com.google.inject.assistedinject.FactoryProvider2 isValidForOptimizedAssistedInject

WARNING: AssistedInject factory org.apache.ambari.server.state.cluster.ClusterFactory will be slow because class org.apache.ambari.server.state.cluster.ClusterImpl has assisted Provider dependencies or injects the Injector. Stop injecting @Assisted Provider<T> (instead use @Assisted T) or Injector to speed things up. (It will be a ~6500% speed bump!) The exact offending deps are: [Key[type=com.google.inject.Injector, annotation=[none]]@org.apache.ambari.server.state.cluster.ClusterImpl.<init>()[1]]

Jul 10, 2019 10:02:24 PM com.google.inject.assistedinject.FactoryProvider2 isValidForOptimizedAssistedInject

WARNING: AssistedInject factory org.apache.ambari.server.controller.ResourceProviderFactory will be slow because class org.apache.ambari.server.controller.internal.HostComponentResourceProvider has assisted Provider dependencies or injects the Injector. Stop injecting @Assisted Provider<T> (instead use @Assisted T) or Injector to speed things up. (It will be a ~6500% speed bump!) The exact offending deps are: [Key[type=com.google.inject.Injector, annotation=[none]]@org.apache.ambari.server.controller.internal.HostComponentResourceProvider.<init>()[1]]

Jul 10, 2019 10:02:24 PM com.google.inject.assistedinject.FactoryProvider2 isValidForOptimizedAssistedInject

WARNING: AssistedInject factory org.apache.ambari.server.state.scheduler.RequestExecutionFactory will be slow because class org.apache.ambari.server.state.scheduler.RequestExecutionImpl has assisted Provider dependencies or injects the Injector. Stop injecting @Assisted Provider<T> (instead use @Assisted T) or Injector to speed things up. (It will be a ~6500% speed bump!) The exact offending deps are: [Key[type=com.google.inject.Injector, annotation=[none]]@org.apache.ambari.server.state.scheduler.RequestExecutionImpl.<init>()[2]]

Jul 10, 2019 10:02:24 PM com.google.inject.assistedinject.FactoryProvider2 isValidForOptimizedAssistedInject

WARNING: AssistedInject factory org.apache.ambari.server.state.scheduler.RequestExecutionFactory will be slow because class org.apache.ambari.server.state.scheduler.RequestExecutionImpl has assisted Provider dependencies or injects the Injector. Stop injecting @Assisted Provider<T> (instead use @Assisted T) or Injector to speed things up. (It will be a ~6500% speed bump!) The exact offending deps are: [Key[type=com.google.inject.Injector, annotation=[none]]@org.apache.ambari.server.state.scheduler.RequestExecutionImpl.<init>()[3]]

Jul 10, 2019 10:02:25 PM com.google.inject.internal.ProxyFactory <init>

WARNING: Method [public void org.apache.ambari.server.orm.dao.RepositoryVersionDAO.create(java.lang.Object)] is synthetic and is being intercepted by [org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor@5f172d4a]. This could indicate a bug. The method may be intercepted twice, or may not be intercepted at all.

Jul 10, 2019 10:02:26 PM com.google.inject.internal.ProxyFactory <init>

WARNING: Method [public void org.apache.ambari.server.orm.dao.AmbariConfigurationDAO.create(java.lang.Object)] is synthetic and is being intercepted by [org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor@5f172d4a]. This could indicate a bug. The method may be intercepted twice, or may not be intercepted at all.

Jul 10, 2019 10:02:26 PM com.google.inject.internal.ProxyFactory <init>

WARNING: Method [public void org.apache.ambari.server.orm.dao.HostVersionDAO.create(java.lang.Object)] is synthetic and is being intercepted by [org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor@5f172d4a]. This could indicate a bug. The method may be intercepted twice, or may not be intercepted at all.

Jul 10, 2019 10:02:26 PM com.google.inject.internal.ProxyFactory <init>

WARNING: Method [public java.lang.Object org.apache.ambari.server.topology.tasks.ConfigureClusterTask.call() throws java.lang.Exception] is synthetic and is being intercepted by [org.apache.ambari.server.security.authorization.internal.InternalAuthenticationInterceptor@44a085e5]. This could indicate a bug. The method may be intercepted twice, or may not be intercepted at all.

Jul 10, 2019 10:02:27 PM org.postgresql.core.v3.ConnectionFactoryImpl log

WARNING: IOException occurred while connecting to ambari:5432

java.net.UnknownHostException: ambari

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:589)

at org.postgresql.core.PGStream.<init>(PGStream.java:69)

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:156)

at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)

at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)

at org.postgresql.Driver.makeConnection(Driver.java:452)

at org.postgresql.Driver.connect(Driver.java:254)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:208)

at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)

at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:207)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:760)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:265)

at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)

at com.google.inject.persist.jpa.JpaPersistService.begin(JpaPersistService.java:77)

at com.google.inject.persist.jpa.AmbariJpaPersistService.begin(AmbariJpaPersistService.java:28)

at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:40)

at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)

at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)

at org.apache.ambari.server.orm.dao.MetainfoDAO$$EnhancerByGuice$$6c95db51.findByKey(<generated>)

at org.apache.ambari.server.checks.DatabaseConsistencyCheckHelper.checkDBVersionCompatible(DatabaseConsistencyCheckHelper.java:222)

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


Jul 10, 2019 10:02:27 PM org.postgresql.Driver connect

SEVERE: Connection error:

org.postgresql.util.PSQLException: The connection attempt failed.

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:257)

at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)

at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)

at org.postgresql.Driver.makeConnection(Driver.java:452)

at org.postgresql.Driver.connect(Driver.java:254)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:208)

at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)

at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:207)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:760)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:265)

at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)

at com.google.inject.persist.jpa.JpaPersistService.begin(JpaPersistService.java:77)

at com.google.inject.persist.jpa.AmbariJpaPersistService.begin(AmbariJpaPersistService.java:28)

at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:40)

at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)

at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)

at org.apache.ambari.server.orm.dao.MetainfoDAO$$EnhancerByGuice$$6c95db51.findByKey(<generated>)

at org.apache.ambari.server.checks.DatabaseConsistencyCheckHelper.checkDBVersionCompatible(DatabaseConsistencyCheckHelper.java:222)

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

Caused by: java.net.UnknownHostException: ambari

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:589)

at org.postgresql.core.PGStream.<init>(PGStream.java:69)

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:156)

... 24 more


Jul 10, 2019 10:02:27 PM org.postgresql.core.v3.ConnectionFactoryImpl log

WARNING: IOException occurred while connecting to ambari:5432

java.net.UnknownHostException: ambari

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:589)

at org.postgresql.core.PGStream.<init>(PGStream.java:69)

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:156)

at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)

at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)

at org.postgresql.Driver.makeConnection(Driver.java:452)

at org.postgresql.Driver.connect(Driver.java:254)

at org.eclipse.persistence.sessions.DefaultConnector.directConnect(DefaultConnector.java:165)

at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:117)

at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:207)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:760)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:265)

at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)

at com.google.inject.persist.jpa.JpaPersistService.begin(JpaPersistService.java:77)

at com.google.inject.persist.jpa.AmbariJpaPersistService.begin(AmbariJpaPersistService.java:28)

at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:40)

at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)

at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)

at org.apache.ambari.server.orm.dao.MetainfoDAO$$EnhancerByGuice$$6c95db51.findByKey(<generated>)

at org.apache.ambari.server.checks.DatabaseConsistencyCheckHelper.checkDBVersionCompatible(DatabaseConsistencyCheckHelper.java:222)

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


Jul 10, 2019 10:02:27 PM org.postgresql.Driver connect

SEVERE: Connection error:

org.postgresql.util.PSQLException: The connection attempt failed.

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:257)

at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)

at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)

at org.postgresql.Driver.makeConnection(Driver.java:452)

at org.postgresql.Driver.connect(Driver.java:254)

at org.eclipse.persistence.sessions.DefaultConnector.directConnect(DefaultConnector.java:165)

at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:117)

at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:207)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:760)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:265)

at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)

at com.google.inject.persist.jpa.JpaPersistService.begin(JpaPersistService.java:77)

at com.google.inject.persist.jpa.AmbariJpaPersistService.begin(AmbariJpaPersistService.java:28)

at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:40)

at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)

at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)

at org.apache.ambari.server.orm.dao.MetainfoDAO$$EnhancerByGuice$$6c95db51.findByKey(<generated>)

at org.apache.ambari.server.checks.DatabaseConsistencyCheckHelper.checkDBVersionCompatible(DatabaseConsistencyCheckHelper.java:222)

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

Caused by: java.net.UnknownHostException: ambari

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:589)

at org.postgresql.core.PGStream.<init>(PGStream.java:69)

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:156)

... 23 more


An unexpected error occured during starting Ambari Server.

javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException

Internal Exception: org.postgresql.util.PSQLException: The connection attempt failed.

Error Code: 0

at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:815)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)

at com.google.inject.persist.jpa.JpaPersistService.begin(JpaPersistService.java:77)

at com.google.inject.persist.jpa.AmbariJpaPersistService.begin(AmbariJpaPersistService.java:28)

at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:40)

at org.apache.ambari.server.checks.DatabaseConsistencyCheckHelper.checkDBVersionCompatible(DatabaseConsistencyCheckHelper.java:222)

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

Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException

Internal Exception: org.postgresql.util.PSQLException: The connection attempt failed.

Error Code: 0

at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)

at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:326)

at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)

at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:207)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:760)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:265)

at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)

... 9 more

Caused by: org.postgresql.util.PSQLException: The connection attempt failed.

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:257)

at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)

at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)

at org.postgresql.Driver.makeConnection(Driver.java:452)

at org.postgresql.Driver.connect(Driver.java:254)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:208)

at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)

... 14 more

Caused by: java.net.UnknownHostException: ambari

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:589)

at org.postgresql.core.PGStream.<init>(PGStream.java:69)

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:156)

... 21 more

Jul 10, 2019 10:02:27 PM org.postgresql.core.v3.ConnectionFactoryImpl log

WARNING: IOException occurred while connecting to ambari:5432

java.net.UnknownHostException: ambari

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:589)

at org.postgresql.core.PGStream.<init>(PGStream.java:69)

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:156)

at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)

at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)

at org.postgresql.Driver.makeConnection(Driver.java:452)

at org.postgresql.Driver.connect(Driver.java:254)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:208)

at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)

at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:207)

at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:760)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:265)

at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)

at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)

at com.google.inject.persist.jpa.JpaPersistService.begin(JpaPersistService.java:77)

at com.google.inject.persist.jpa.AmbariJpaPersistService.begin(AmbariJpaPersistService.java:28)

at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:40)

at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)

at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)

at org.apache.ambari.server.orm.dao.AmbariConfigurationDAO$$EnhancerByGuice$$59ebffe4.findByCategory(<generated>)

at org.apache.ambari.server.configuration.AmbariServerConfigurationProvider.loadInstance(AmbariServerConfigurationProvider.java:123)

at org.apache.ambari.server.configuration.AmbariServerConfigurationProvider.jpaInitialized(AmbariServerConfigurationProvider.java:100)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)

at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:117)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)


please help me 😞

1 ACCEPTED SOLUTION

avatar
Master Mentor

@NUR ALEAH JEHAN ABDULLAH

We see the failure is happening due to:

WARNING: IOException occurred while connecting to ambari:5432
java.net.UnknownHostException: ambari

.

Which indicates that your Ambari DB hostname is not resolving.

1. Are you sure that your Ambari Postgres DB hostname is "ambari" ?

2. From a remote machine how do you connect to your Ambari Postgres DB (Using which hostname) ?


3. Do you have the correct "/etc/hosts" file entry to point the hostname 'ambari' to your DB IPAddress? Please share?

# cat /etc/hosts


4. If you have incorrectly configured the Postgres DB hostname then please fix it inside the "/etc/ambari-server/conf/ambari.properties" . Specially the "server.jdbc.url" property. You can fix it manually to specify your Postgres DB hostname.

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




View solution in original post

5 REPLIES 5

avatar
Master Mentor

@NUR ALEAH JEHAN ABDULLAH

We see the failure is happening due to:

WARNING: IOException occurred while connecting to ambari:5432
java.net.UnknownHostException: ambari

.

Which indicates that your Ambari DB hostname is not resolving.

1. Are you sure that your Ambari Postgres DB hostname is "ambari" ?

2. From a remote machine how do you connect to your Ambari Postgres DB (Using which hostname) ?


3. Do you have the correct "/etc/hosts" file entry to point the hostname 'ambari' to your DB IPAddress? Please share?

# cat /etc/hosts


4. If you have incorrectly configured the Postgres DB hostname then please fix it inside the "/etc/ambari-server/conf/ambari.properties" . Specially the "server.jdbc.url" property. You can fix it manually to specify your Postgres DB hostname.

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




avatar
New Contributor

Hi. thank you for your fast respond! after checking the hostname, I found that i've gotten the wrong hostname. Therefore, I've fixed my hostname and the server is up and running! Thank you very much! I appreciate your help 😄

avatar
Contributor

Hi,

 

I am also facing the same issues. Can you please help me out as well. My ambar-server.out file reads:

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Jul 13, 2020 7:58:44 AM com.google.inject.assistedinject.FactoryProvider2 isValidForOptimizedAssistedInject
WARNING: AssistedInject factory org.apache.ambari.server.state.cluster.ClusterFactory will be slow because class org.apache.ambari.server.state.cluster.ClusterImpl has assisted Provider dependencies or injects the Injector. Stop injecting @Assisted Provider<T> (instead use @Assisted T) or Injector to speed things up. (It will be a ~6500% speed bump!) The exact offending deps are: [Key[type=com.google.inject.Injector, annotation=[none]]@org.apache.ambari.server.state.cluster.ClusterImpl.<init>()[1]]
Jul 13, 2020 7:58:44 AM com.google.inject.assistedinject.FactoryProvider2 isValidForOptimizedAssistedInject
WARNING: AssistedInject factory org.apache.ambari.server.controller.ResourceProviderFactory will be slow because class org.apache.ambari.server.controller.internal.HostComponentResourceProvider has assisted Provider dependencies or injects the Injector. Stop injecting @Assisted Provider<T> (instead use @Assisted T) or Injector to speed things up. (It will be a ~6500% speed bump!) The exact offending deps are: [Key[type=com.google.inject.Injector, annotation=[none]]@org.apache.ambari.server.controller.internal.HostComponentResourceProvider.<init>()[1]]
Jul 13, 2020 7:58:44 AM com.google.inject.assistedinject.FactoryProvider2 isValidForOptimizedAssistedInject
WARNING: AssistedInject factory org.apache.ambari.server.state.scheduler.RequestExecutionFactory will be slow because class org.apache.ambari.server.state.scheduler.RequestExecutionImpl has assisted Provider dependencies or injects the Injector. Stop injecting @Assisted Provider<T> (instead use @Assisted T) or Injector to speed things up. (It will be a ~6500% speed bump!) The exact offending deps are: [Key[type=com.google.inject.Injector, annotation=[none]]@org.apache.ambari.server.state.scheduler.RequestExecutionImpl.<init>()[2]]
Jul 13, 2020 7:58:44 AM com.google.inject.assistedinject.FactoryProvider2 isValidForOptimizedAssistedInject
WARNING: AssistedInject factory org.apache.ambari.server.state.scheduler.RequestExecutionFactory will be slow because class org.apache.ambari.server.state.scheduler.RequestExecutionImpl has assisted Provider dependencies or injects the Injector. Stop injecting @Assisted Provider<T> (instead use @Assisted T) or Injector to speed things up. (It will be a ~6500% speed bump!) The exact offending deps are: [Key[type=com.google.inject.Injector, annotation=[none]]@org.apache.ambari.server.state.scheduler.RequestExecutionImpl.<init>()[3]]
Jul 13, 2020 7:58:46 AM com.google.inject.internal.ProxyFactory <init>
WARNING: Method [public void org.apache.ambari.server.orm.dao.RepositoryVersionDAO.create(java.lang.Object)] is synthetic and is being intercepted by [org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor@2ec3633f]. This could indicate a bug. The method may be intercepted twice, or may not be intercepted at all.
Jul 13, 2020 7:58:46 AM com.google.inject.internal.ProxyFactory <init>
WARNING: Method [public void org.apache.ambari.server.orm.dao.AmbariConfigurationDAO.create(java.lang.Object)] is synthetic and is being intercepted by [org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor@2ec3633f]. This could indicate a bug. The method may be intercepted twice, or may not be intercepted at all.
Jul 13, 2020 7:58:46 AM com.google.inject.internal.ProxyFactory <init>
WARNING: Method [public void org.apache.ambari.server.orm.dao.HostVersionDAO.create(java.lang.Object)] is synthetic and is being intercepted by [org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor@2ec3633f]. This could indicate a bug. The method may be intercepted twice, or may not be intercepted at all.
Jul 13, 2020 7:58:47 AM com.google.inject.internal.ProxyFactory <init>
WARNING: Method [public java.lang.Object org.apache.ambari.server.topology.tasks.ConfigureClusterTask.call() throws java.lang.Exception] is synthetic and is being intercepted by [org.apache.ambari.server.security.authorization.internal.InternalAuthenticationInterceptor@78a515e4]. This could indicate a bug. The method may be intercepted twice, or may not be intercepted at all.
Jul 13, 2020 7:58:48 AM org.postgresql.jdbc.PgConnection <init>
WARNING: Unsupported Server Version: 8.0.2
Jul 13, 2020 7:58:48 AM org.postgresql.jdbc.PgConnection <init>
WARNING: Unsupported Server Version: 8.0.2
Jul 13, 2020 7:58:48 AM org.postgresql.jdbc.PgConnection <init>
WARNING: Unsupported Server Version: 8.0.2
An unexpected error occured during starting Ambari Server.
Jul 13, 2020 7:58:48 AM com.google.common.eventbus.EventBus$LoggingSubscriberExceptionHandler handleException
SEVERE: Could not dispatch event: org.apache.ambari.server.ldap.service.AmbariLdapConfigurationProvider@6949e948 to public void org.apache.ambari.server.configuration.AmbariServerConfigurationProvider.jpaInitialized(org.apache.ambari.server.events.JpaInitializedEvent)
Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: relation "ambari_configuration" does not exist
Error Code: 0
Call: SELECT property_name, category_name, property_value FROM ambari_configuration WHERE (category_name = ?)
bind => [1 parameter bound]
Query: ReadAllQuery(name="AmbariConfigurationEntity.findByCategory" referenceClass=AmbariConfigurationEntity sql="SELECT property_name, category_name, property_value FROM ambari_configuration WHERE (category_name = ?)")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:684)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2055)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:299)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:694)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2740)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2693)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:559)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1175)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1134)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:460)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1222)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:473)
at org.apache.ambari.server.orm.dao.DaoUtils.selectList(DaoUtils.java:53)
at org.apache.ambari.server.orm.dao.AmbariConfigurationDAO.findByCategory(AmbariConfigurationDAO.java:62)
at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:44)
at org.apache.ambari.server.configuration.AmbariServerConfigurationProvider.loadInstance(AmbariServerConfigurationProvider.java:123)
at org.apache.ambari.server.configuration.AmbariServerConfigurationProvider.jpaInitialized(AmbariServerConfigurationProvider.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.postgresql.util.PSQLException: ERROR: relation "ambari_configuration" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:118)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:1009)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:644)
... 38 more

Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: relation "metainfo" does not exist
Error Code: 0
Call: SELECT "metainfo_key", "metainfo_value" FROM metainfo WHERE ("metainfo_key" = ?)
bind => [1 parameter bound]
Query: ReadObjectQuery(name="readMetainfoEntity" referenceClass=MetainfoEntity sql="SELECT "metainfo_key", "metainfo_value" FROM metainfo WHERE ("metainfo_key" = ?)")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:684)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2055)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:714)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2803)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:2756)
at org.eclipse.persistence.queries.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:555)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1175)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1134)
at org.eclipse.persistence.queries.ReadObjectQuery.execute(ReadObjectQuery.java:441)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1222)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1790)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.executeQuery(EntityManagerImpl.java:911)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.findInternal(EntityManagerImpl.java:854)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:730)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:599)
at org.apache.ambari.server.orm.dao.MetainfoDAO.findByKey(MetainfoDAO.java:44)
at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:44)
at org.apache.ambari.server.checks.DatabaseConsistencyCheckHelper.checkDBVersionCompatible(DatabaseConsistencyCheckHelper.java:222)
at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1099)
Caused by: org.postgresql.util.PSQLException: ERROR: relation "metainfo" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:118)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:1009)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:644)
... 26 more

 

 

avatar
Moderator

Hello @ashish_inamdar ,

 

 

based on the stack trace you shared with us:

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: relation "metainfo" does not exist
Error Code: 0
Call: SELECT "metainfo_key", "metainfo_value" FROM metainfo WHERE ("metainfo_key" = ?)
bind => [1 parameter bound]
Query: ReadObjectQuery(name="readMetainfoEntity" referenceClass=MetainfoEntity sql="SELECT "metainfo_key", "metainfo_value" FROM metainfo WHERE ("metainfo_key" = ?)")

 

It means that the metainfo table does not exist. 

 

Did you follow the installation steps, please?

I've found the same issue was resolved in this thread

Quoting: "I used yum to uninstall ambari and associated packages, including postgres. Then I re-installed Ambari using yum and ran ambari-server install."

 

Please let us know if it helped!

 

Kind regards:

Ferenc


Ferenc Erdelyi, Technical Solutions Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

avatar
Contributor

@Bender ,

 

Thank you. This helped is resolving the error.