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.

amabari server 2.1.2 setup - Error while creating database accessor com.mysql.jdbc.Communications

SOLVED Go to solution
Highlighted

amabari server 2.1.2 setup - Error while creating database accessor com.mysql.jdbc.Communications

Contributor

OS: Cent OS 7

Database: Maria DB

 ERROR [main] DBAccessorImpl:102 - Error while creating database accessor
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.ConnectException
MESSAGE: Connection timed out
STACKTRACE:
java.net.ConnectException: Connection timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
        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 java.net.Socket.<init>(Socket.java:434)
        at java.net.Socket.<init>(Socket.java:244)
        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)
        at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
        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:83)
        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)
        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:706)
** END NESTED EXCEPTION **
1 ACCEPTED SOLUTION

Accepted Solutions

Re: amabari server 2.1.2 setup - Error while creating database accessor com.mysql.jdbc.Communications

When does this error occur? During "ambari-server setup"-routine?

Did you follow these steps, to setup a non-default DB => http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.0/bk_ambari_reference_guide/content/ch_amb_ref...

Make sure the Java Connector is installed and the database, tables and users have been created? Since the connection timed out, make sure your DB is running and reachable.

As far as I know MariaDB is not officially supported at the moment.

8 REPLIES 8

Re: amabari server 2.1.2 setup - Error while creating database accessor com.mysql.jdbc.Communications

When does this error occur? During "ambari-server setup"-routine?

Did you follow these steps, to setup a non-default DB => http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.0/bk_ambari_reference_guide/content/ch_amb_ref...

Make sure the Java Connector is installed and the database, tables and users have been created? Since the connection timed out, make sure your DB is running and reachable.

As far as I know MariaDB is not officially supported at the moment.

Re: amabari server 2.1.2 setup - Error while creating database accessor com.mysql.jdbc.Communications

Re: amabari server 2.1.2 setup - Error while creating database accessor com.mysql.jdbc.Communications

Contributor

@Neeraj Sabharwal Thanks for the reply. Actually I am not upgrading the HDP. It is fresh installation. I faced setpg id issue with Ambari 2.2 and then installing Ambari 2.1.2.

Re: amabari server 2.1.2 setup - Error while creating database accessor com.mysql.jdbc.Communications

Contributor

@Jonas Straub ambari-server start - started successfully. In log ambari-server.log it is showing the above error. MariaDB not supported officially but it worked for in other cluster. But now, I am trying to setup other, facing the above issue.

Re: amabari server 2.1.2 setup - Error while creating database accessor com.mysql.jdbc.Communications

What MariaDB version did you use? It seems like a driver issue, but I want to see if I can reproduce it on my local system and find out more about the problem

Re: amabari server 2.1.2 setup - Error while creating database accessor com.mysql.jdbc.Communications

Contributor

mysql Ver 15.1 Distrib 5.5.44-MariaDB, for Linux (x86_64) using readline 5.1

Re: amabari server 2.1.2 setup - Error while creating database accessor com.mysql.jdbc.Communications

Mentor

@Vinod Nerella

For sure you have a connection issue"ERROR [main]DBAccessorImpl:102-Errorwhile creating database accessor" That's a driver issue see link

I would advice you to use the most supported DB as Jonas mentioned mariaDB is not supported and getting help from this forum wont be that easy.For the beginning experiment with supported sofware

Re: amabari server 2.1.2 setup - Error while creating database accessor com.mysql.jdbc.Communications

@Vinod Nerella Please stick with supported databases

Component

Databases

Description

Ambari- PostgreSQL 8

- PostgreSQL 9.1.13+,9.3

- MySQL 5.6

- Oracle 11gr2, 12c

By default, Ambari will install an instance of PostgreSQL on the Ambari Server host. Optionally, to use an existing instance of PostgreSQL, MySQL or Oracle. For further information, see Using Non-Default Databases - Ambari.