MySQL connection error when starting indexing service

Hi,

I am working on POC and trying out the batch loading using the wikipedia example, following tutorial http://druid.io/docs/latest/tutorials/tutorial-loading-batch-data.html

When I tried to start the indexing service I am getting the following error

WARN [main] io.druid.metadata.SQLMetadataConnector - Exception creating table

org.skife.jdbi.v2.exceptions.UnableToObtainConnectionException: java.sql.SQLException: Cannot create PoolableConnectionFactory (Access denied for user ‘druid’@‘localhost’ (using password: YES))

at org.skife.jdbi.v2.DBI.open(DBI.java:210) ~[jdbi-2.32.jar:?]

at org.skife.jdbi.v2.DBI.withHandle(DBI.java:257) ~[jdbi-2.32.jar:?]

at io.druid.metadata.SQLMetadataConnector.createTable(SQLMetadataConnector.java:88) [druid-server-0.8.1.jar:0.8.1]

at io.druid.metadata.SQLMetadataConnector.createConfigTable(SQLMetadataConnector.java:164) [druid-server-0.8.1.jar:0.8.1]

at io.druid.metadata.SQLMetadataConnector.createConfigTable(SQLMetadataConnector.java:311) [druid-server-0.8.1.jar:0.8.1]

at io.druid.guice.JacksonConfigManagerModule$1.start(JacksonConfigManagerModule.java:56) [druid-common-0.8.1.jar:0.8.1]

at com.metamx.common.lifecycle.Lifecycle.start(Lifecycle.java:250) [java-util-0.27.0.jar:?]

at io.druid.guice.LifecycleModule$2.start(LifecycleModule.java:136) [druid-api-0.3.9.jar:0.8.1]

at io.druid.cli.GuiceRunnable.initLifecycle(GuiceRunnable.java:71) [druid-services-0.8.1.jar:0.8.1]

at io.druid.cli.ServerRunnable.run(ServerRunnable.java:38) [druid-services-0.8.1.jar:0.8.1]

at io.druid.cli.Main.main(Main.java:91) [druid-services-0.8.1.jar:0.8.1]

Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (Access denied for user ‘druid’@‘localhost’ (using password: YES))

at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2152) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1903) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1413) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.skife.jdbi.v2.DataSourceConnectionFactory.openConnection(DataSourceConnectionFactory.java:36) ~[jdbi-2.32.jar:?]

at org.skife.jdbi.v2.DBI.open(DBI.java:192) ~[jdbi-2.32.jar:?]

… 10 more

Caused by: java.sql.SQLException: Access denied for user ‘druid’@‘localhost’ (using password: YES)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996) ~[?:?]

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887) ~[?:?]

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) ~[?:?]

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:870) ~[?:?]

at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1659) ~[?:?]

at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1206) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2234) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2265) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2064) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:790) ~[?:?]

at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44) ~[?:?]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_80]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_80]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_80]

at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_80]

at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:395) ~[?:?]

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325) ~[?:?]

at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:205) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2162) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2148) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1903) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1413) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.skife.jdbi.v2.DataSourceConnectionFactory.openConnection(DataSourceConnectionFactory.java:36) ~[jdbi-2.32.jar:?]

at org.skife.jdbi.v2.DBI.open(DBI.java:192) ~[jdbi-2.32.jar:?]

… 10 more

**I have configured Mysql user druid, and created an empty database called druid and granted all privileges. I am able to connect to mysql database through terminal without a problem. But the Indexing service fails. **

Does it required any other additional odbc driver to be installed?

Hi,

I would think it relating to mysql permissions, make sure you have specified correct password. BTW, for prototyping you could use derby as well.

– Himanshu