NPE with Loading extension for mysql-metadata-storage

I am getting this error when I try to bring up the coordinator on a fresh install: (node without internet access)

2015-06-24T05:33:14,812 ERROR [main] io.druid.initialization.Initialization - Unable to resolve artifacts for [io.druid.extensions:mysql-metadata-storage:jar:0.7.3 (runtime) -> < [ (https://repo1.maven.org/maven2/, releases+snapshots), (https://metamx.artifactoryonline.com/metamx/pub-libs-releases-local, releases+snapshots)]].
java.lang.NullPointerException
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:361) ~[aether-impl-0.9.0.M2.jar:?]
at io.tesla.aether.internal.DefaultTeslaAether.resolveArtifacts(DefaultTeslaAether.java:289) ~[tesla-aether-0.0.5.jar:0.0.5]
at io.druid.initialization.Initialization.getClassLoaderForCoordinates(Initialization.java:214) [druid-server-0.7.3.jar:0.7.3]
at io.druid.initialization.Initialization.getFromExtensions(Initialization.java:141) [druid-server-0.7.3.jar:0.7.3]
at io.druid.cli.Main.main(Main.java:76) [druid-services-0.7.3.jar:0.7.3]
Exception in thread “main” java.lang.NullPointerException
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:361)
at io.tesla.aether.internal.DefaultTeslaAether.resolveArtifacts(DefaultTeslaAether.java:289)
at io.druid.initialization.Initialization.getClassLoaderForCoordinates(Initialization.java:214)
at io.druid.initialization.Initialization.getFromExtensions(Initialization.java:141)

I saw several earlier similar reported issues. The node where I am trying to setup druid doesn’t have internet access, so I downloaded the jar mysql-metadata-storage-0.7.3.jar and put this under lib/ folder.

I have also edited config/_common/common.runtime.properties to have these contents:

druid.extensions.coordinates=[“io.druid.extensions:mysql-metadata-storage”]
druid.extensions.searchCurrentClassloader=true

Given that I can’t get internet access on this node, pre-downloaded jar with these changes (earlier suggested solutions) don’t seem to work, any other solutions I could try?

I also tried the following:

druid.extensions.coordinates=

This leads to lots of the exceptions like this in the log:

t[com.metamx.emitter.service.ServiceEmitter@4e4dd603].
2015-06-24T05:21:44,932 WARN [config-manager-0] io.druid.common.config.ConfigManager - Exception when checking property[worker.config]
org.skife.jdbi.v2.exceptions.UnableToObtainConnectionException: java.sql.SQLException: Cannot load JDBC driver class ‘com.mysql.jdbc.Driver’
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.lookup(SQLMetadataConnector.java:337) ~[druid-server-0.7.3.jar:0.7.3]
at io.druid.common.config.ConfigManager.poll(ConfigManager.java:106) [druid-common-0.7.3.jar:0.7.3]
at io.druid.common.config.ConfigManager.access$600(ConfigManager.java:42) [druid-common-0.7.3.jar:0.7.3]
at io.druid.common.config.ConfigManager$PollingCallable.call(ConfigManager.java:248) [druid-common-0.7.3.jar:0.7.3]
at io.druid.common.config.ConfigManager$PollingCallable.call(ConfigManager.java:232) [druid-common-0.7.3.jar:0.7.3]
at com.metamx.common.concurrent.ScheduledExecutors$2.run(ScheduledExecutors.java:99) [java-util-0.27.0.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_79]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_79]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [?:1.7.0_79]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [?:1.7.0_79]
at java.util.co

Thanks!

Hi Mummoorthy,

Since your node doesn’t have internet access, you should have druid.extensions.coordinates= so that Druid won’t download remote extensions.

You can still load local extensions by putting extension dependent jars in the classpath. In your case, besides mysql-metadata-storage-0.7.3.jar,

I think mysql-metadata-storage also requires jdbi-2.32.jar and mysql-connector-java-5.1.34.jar(I found them in the pom.xml)

do you have both of them included in the classpath?

Hi Bingkun,

Yes, I was missing “mysql-connector-java-5.1.34.jar”, and after I downloaded and put it on classpath, it worked! (I also set druid.extensions.coordinates= as you suggested).

Thanks for your timely response!!!