Created 10-04-2016 10:47 AM
i have this log :
Error injecting constructor, java.lang.RuntimeException: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.apache.ambari.server.orm.DBAccessorImpl.<init>(DBAccessorImpl.java:77) while locating org.apache.ambari.server.orm.DBAccessorImpl while locating org.apache.ambari.server.orm.DBAccessor for field at org.apache.ambari.server.orm.dao.DaoUtils.dbAccessor(DaoUtils.java:36) at org.apache.ambari.server.orm.dao.DaoUtils.class(DaoUtils.java:36) while locating org.apache.ambari.server.orm.dao.DaoUtils for field at org.apache.ambari.server.orm.dao.TopologyRequestDAO.daoUtils(TopologyRequestDAO.java:31) at org.apache.ambari.server.orm.dao.TopologyRequestDAO.class(TopologyRequestDAO.java:31) while locating org.apache.ambari.server.orm.dao.TopologyRequestDAO for field at org.apache.ambari.server.topology.PersistedStateImpl.topologyRequestDAO(PersistedStateImpl.java:56) Caused by: java.lang.RuntimeException: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.apache.ambari.server.orm.DBAccessorImpl.<init>(DBAccessorImpl.java:103) 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.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.InjectionRequestProcessor$StaticInjection$1.call(InjectionRequestProcessor.java:116) at com.google.inject.internal.InjectionRequestProcessor$StaticInjection$1.call(InjectionRequestProcessor.java:110) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024) at com.google.inject.internal.InjectionRequestProcessor$StaticInjection.injectMembers(InjectionRequestProcessor.java:110)
Created 10-04-2016 10:56 AM
Created 10-04-2016 11:00 AM
Created 10-04-2016 11:09 AM
yes postgresql is down and failed to start
Created 10-05-2016 08:17 AM
@Mourad Chahri Can you pass the logs if the postgresql is still not starting ?
Created 04-06-2017 05:46 PM
you know where to logs ?
Created 10-04-2016 02:16 PM
@ Mourad chahri
can you provide the postgresql logs so we can find the solution for the issue.
Created 10-04-2016 02:36 PM
Can you please check the "ambari.properties" to see if you are using the correct postgres instance?
# grep "jdbc" /etc/ambari-server/conf/ambari.properties server.jdbc.user.name=ambari server.jdbc.postgres.schema=ambari server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat server.jdbc.database=postgres server.jdbc.database_name=ambari
If you are using embedded Postgres then please check if it is listening on port 5432 (default port or not)
Example:
# netstat -tnlpa | grep 5432 tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 1480/postmaster tcp 0 0 127.0.0.1:5432 127.0.0.1:47837 ESTABLISHED 7753/postgres tcp 0 0 127.0.0.1:5432 127.0.0.1:37801 ESTABLISHED 31055/postgres tcp 0 0 127.0.0.1:5432 127.0.0.1:47842 ESTABLISHED 7756/postgres tcp 0 0 127.0.0.1:5432 127.0.0.1:47846 ESTABLISHED 7763/postgres
Created 10-04-2016 06:30 PM
@Mourad Chahri if the above does not resolve the issue then please do a fresh ambari server yum install.
Created 10-05-2016 11:13 AM
yes that what i did it but not fresh install , i didnt reset ambari-server and it's work