Connection refused (Connection refused)

Either the standalone db is not running correctly or the Ambari db
configuration is wrong
I would try first to connect manually to the DB

On Sep 16, 2017 2:10 AM, "mayank rathi" <[email protected]> wrote:

> Hello All,
>
> I just finished setting up Ambari 2.5.1. I am using Standalone PostgreSQL
> 9.6
>
> Setup finished successfully but I am getting error while starting Ambari
> server.
>
> This is what I see in Linux command line
>
> Ambari Server 'setup' completed successfully.
> [kfkadm@******didkfkw ~]$ ambari-server start
> Using python /usr/bin/python
> Starting ambari-server
> Organizing resource files at /var/lib/ambari-server/resources...
> Unable to check firewall status when starting without root privileges.
> Please do not forget to disable or adjust firewall if needed
> 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
> /usr/bin/sh: line 0: ulimit: open files: cannot modify limit: Operation not
> permitted
> 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 1. Check
> /var/log/ambari-server/ambari-server.out for more information.
>
> This is what I see in ambari-server.out file
>
> Error injecting constructor, java.lang.RuntimeException: Error while
> creating database accessor
> at org.apache.ambari.server.orm.DBAccessorImpl.<init>(
> DBAccessorImpl.java:85)
> at org.apache.ambari.server.orm.DBAccessorImpl.class(
> DBAccessorImpl.java:73)
> 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.UserDAO.daoUtils(UserDAO.
> java:45)
> at org.apache.ambari.server.orm.dao.UserDAO.class(UserDAO.java:45)
> while locating org.apache.ambari.server.orm.dao.UserDAO
> for field at org.apache.ambari.server.controller.internal.
> ActiveWidgetLayoutResourceProvider.userDAO(ActiveWidgetLayoutResourceProv
> ider.java:61)
> Caused by: java.lang.RuntimeException: Error while creating database
> accessor
> at org.apache.ambari.server.orm.DBAccessorImpl.<init>(
> DBAccessorImpl.java:118)
> 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.DefaultConstructionProxyFactor
> y$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.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)
> at com.google.inject.internal.InjectionRequestProcessor.injectMembers(
> InjectionRequestProcessor.java:78)
> at com.google.inject.internal.InternalInjectorCreator.injectDynamically(
> InternalInjectorCreator.java:170)
> 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:992)
> Caused by: 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.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(
> ConnectionFactoryImpl.java:207)
> at org.postgresql.core.ConnectionFactory.openConnection(
> ConnectionFactory.java:64)
> at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>
> (AbstractJdbc2Connection.java:138)
> at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>
> (AbstractJdbc3Connection.java:29)
> at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(
> AbstractJdbc3gConnection.java:21)
> at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>
> (AbstractJdbc4Connection.java:31)
> at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
> at org.postgresql.Driver.makeConnection(Driver.java:410)
> at org.postgresql.Driver.connect(Driver.java:280)
> at java.sql.DriverManager.getConnection(DriverManager.java:664)
> at java.sql.DriverManager.getConnection(DriverManager.java:247)
> at org.apache.ambari.server.orm.DBAccessorImpl.<init>(
> DBAccessorImpl.java:91)
> ... 41 more
> Caused by: java.net.ConnectException: Connection refused (Connection
> refused)
> 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 java.net.Socket.connect(Socket.java:538)
> at org.postgresql.core.PGStream.<init>(PGStream.java:60)
> at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(
> ConnectionFactoryImpl.java:101)
> ... 52 more
> How do I resolve this error?
>
> --
> NOTICE: This email message is for the sole use of the intended recipient(s)
> and may contain confidential and privileged information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not the
> intended recipient, please contact the sender by reply email and destroy
> all copies of the original message.
>

Reply via email to