Druid connecting to derby instead of postgresql

Hi,
I am setting up druid instance with postgresql as metastore. When running overlord, its trying to connect to derby and failing:

2017-04-07T01:11:25,634 INFO [main] io.druid.initialization.Initialization - Loading extension [druid-hdfs-storage] for class [io.druid.initialization.DruidModule]

2017-04-07T01:11:25,637 INFO [main] io.druid.initialization.Initialization - Adding local file system extension module [io.druid.storage.hdfs.HdfsStorageDruidModule] for class [io.druid.initialization.DruidModule]

2017-04-07T01:11:25,637 INFO [main] io.druid.initialization.Initialization - Loading extension [postgresql-metadata-storage] for class [io.druid.initialization.DruidModule]

2017-04-07T01:11:25,638 INFO [main] io.druid.initialization.Initialization - Adding local file system extension module [io.druid.metadata.storage.postgresql.PostgreSQLMetadataStorageModule] for class [io.druid.initialization.DruidModule]

2017-04-07T01:11:25,639 INFO [main] io.druid.initialization.Initialization - Loading extension [druid-histogram] for class [io.druid.initialization.DruidModule]

2017-04-07T01:11:25,640 INFO [main] io.druid.initialization.Initialization - Adding local file system extension module [io.druid.query.aggregation.histogram.ApproximateHistogramDruidModule] for class [io.druid.initialization.DruidModule]

2017-04-07T01:11:26,385 WARN [main] org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform… using builtin-java classes where applicable

2017-04-07T01:11:26,863 INFO [main] io.druid.guice.JsonConfigurator - Loaded class[class io.druid.metadata.MetadataStorageConnectorConfig] from props[druid.metadata.storage.connector.] as [DbConnectorConfig{createTables=true, connectURI=‘jdbc:derby://localhost:1527/druid;create=true’, user=‘null’, passwordProvider=null}]

Error:

2017-04-07T01:11:27,418 WARN [main] com.metamx.common.RetryUtils - Failed on try 1, retrying in 1,037ms.

org.skife.jdbi.v2.exceptions.UnableToObtainConnectionException: java.sql.SQLException: Cannot create PoolableConnectionFactory (java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused (Connection refused).)

at org.skife.jdbi.v2.DBI.open(DBI.java:230) ~[jdbi-2.63.1.jar:2.63.1]

at org.skife.jdbi.v2.DBI.withHandle(DBI.java:279) ~[jdbi-2.63.1.jar:2.63.1]

at io.druid.metadata.SQLMetadataConnector$2.call(SQLMetadataConnector.java:124) ~[druid-server-0.9.2.jar:0.9.2]

at com.metamx.common.RetryUtils.retry(RetryUtils.java:60) [java-util-0.27.10.jar:?]

at com.metamx.common.RetryUtils.retry(RetryUtils.java:78) [java-util-0.27.10.jar:?]

at io.druid.metadata.SQLMetadataConnector.retryWithHandle(SQLMetadataConnector.java:128) [druid-server-0.9.2.jar:0.9.2]

at io.druid.metadata.SQLMetadataConnector.retryWithHandle(SQLMetadataConnector.java:137) [druid-server-0.9.2.jar:0.9.2]

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

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

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

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

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

at io.druid.guice.LifecycleModule$2.start(LifecycleModule.java:155) [druid-api-0.9.2.jar:0.9.2]

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

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

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

my runtime.properties:

druid.indexer.storage.type=metadata

druid.indexer.runner.type=remote

druid.port=8090

druid.indexer.runner.allowedPrefixes=[“com.metamx”, “druid”, “io.druid”, “user.timezone”, “file.encoding”, “hadoop”]

druid.indexer.queue.startDelay=PT30S

druid.service=druid/overlord

my common.runtime.properties:

druid.startup.logging.logProperties=true

druid.emitter.logging.logLevel=info

druid.metadata.storage.connector.password=druid

druid.metadata.storage.connector.user=druid

druid.extensions.directory=extensions

druid.storage.storageDirectory=/user/druid/segments

druid.metadata.storage.connector.connectURI=jdbc:postgresql://:5301/druid

druid.zk.service.host=

druid.storage.type=hdfs

druid.metadata.storage.type=postgresql

druid.selectors.coordinator.serviceName=druid/coordinator

druid.extensions.hadoopDependenciesDir=hadoop-dependencies

druid.extensions.loadList=[“druid-hdfs-storage”, “druid-histogram”, “postgresql-metadata-storage”]

druid.selectors.indexing.serviceName=druid/overlord

druid.zk.paths.base=/druid/poc/

druid.monitoring.monitors=[“com.metamx.metrics.JvmMonitor”]

druid.emitter=logging

druid.indexer.logs.directory=/user/druid/indexing-logs

druid.indexer.logs.type=hdfs

My configurations are in classpath:

/opt/java-1.8.0/jre/bin/java -server -Xms24g -Xmx24g -XX:MaxDirectMemorySize=4096m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.io.tmpdir=var/tmp -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -cp /tmp/conf_generated/_common/:/tmp/conf_generated/:./* io.druid.cli.Main server overlord

Am I missing anything here?

Thanks,

-Yogesh

never mind. there was an issue in my execution command where I was giving /* for configs path as well. here is the correct way:

/opt/java-1.8.0/jre/bin/java -server -Xms24g -Xmx24g -XX:MaxDirectMemorySize=4096m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.io.tmpdir=var/tmp -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -cp /tmp/conf_generated/_common:/tmp/conf_generated:./* io.druid.cli.Main server overlord

Thanks Akash D (https://github.com/akashdw) for pointing out this typo.