Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Druid 0.8.0 realtime node failing with "Error injecting constructor, java.lang.NullPointerException"
#!/bin/sh
cd /druid-cluster/druid
JAVA_ARGS="-server -Xmx1g -Xms1g"
JAVA_ARGS="${JAVA_ARGS} -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+UseConcMarkSweepGC "
# JAVA_ARGS="${JAVA_ARGS} -XX:+PrintGCDetails -XX:+PrintGCTimeStamps "
JAVA_ARGS="${JAVA_ARGS} -Duser.timezone=UTC -Dfile.encoding=UTF-8 "
JAVA_ARGS="${JAVA_ARGS} -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager "
JAVA_ARGS="${JAVA_ARGS} -Djava.io.tmpdir=/druid-cluster/druid-temp"
DRUID_CP="config/_common:config/realtime:lib/*"
java ${JAVA_ARGS} -classpath ${DRUID_CP} io.druid.cli.Main server realtime
# ran as:
2015-07-23T22:18:24,011 INFO [main] io.druid.guice.PropertiesModule - Loading properties from common.runtime.properties
2015-07-23T22:18:24,014 INFO [main] io.druid.guice.PropertiesModule - Loading properties from runtime.properties
2015-07-23T22:18:24,553 INFO [main] io.druid.guice.JsonConfigurator - Loaded class[class io.druid.guice.ExtensionsConfig] from props[druid.extensions.] as [ExtensionsConfig{searchCurrentClassloader=true, coordinates=[io.druid.extensions:druid-s3-extensions, io.druid.extensions:druid-histogram, io.druid.extensions:mysql-metadata-storage], defaultVersion='0.8.0', localRepository='/root/.m2/repository', remoteRepositories=[https://repo1.maven.org/maven2/, https://metamx.artifactoryonline.com/metamx/pub-libs-releases-local]}]
2015-07-23T22:18:24,690 INFO [main] io.druid.initialization.Initialization - Loading extension[io.druid.extensions:druid-s3-extensions] for class[io.druid.cli.CliCommandCreator]
2015-07-23T22:18:25,231 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/io/druid/extensions/druid-s3-extensions/0.8.0/druid-s3-extensions-0.8.0.jar]
2015-07-23T22:18:25,231 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/net/java/dev/jets3t/jets3t/0.9.3/jets3t-0.9.3.jar]
2015-07-23T22:18:25,231 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/commons-codec/commons-codec/1.7/commons-codec-1.7.jar]
2015-07-23T22:18:25,232 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.12/jackson-core-asl-1.9.12.jar]
2015-07-23T22:18:25,232 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.12/jackson-mapper-asl-1.9.12.jar]
2015-07-23T22:18:25,232 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/javax/activation/activation/1.1.1/activation-1.1.1.jar]
2015-07-23T22:18:25,232 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/mx4j/mx4j/3.0.2/mx4j-3.0.2.jar]
2015-07-23T22:18:25,232 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/javax/mail/mail/1.4.7/mail-1.4.7.jar]
2015-07-23T22:18:25,232 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar]
2015-07-23T22:18:25,232 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.51/bcprov-jdk15on-1.51.jar]
2015-07-23T22:18:25,232 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/com/jamesmurty/utils/java-xmlbuilder/0.4/java-xmlbuilder-0.4.jar]
2015-07-23T22:18:25,233 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/org/apache/logging/log4j/log4j-1.2-api/2.2/log4j-1.2-api-2.2.jar]
2015-07-23T22:18:25,233 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/org/apache/logging/log4j/log4j-api/2.2/log4j-api-2.2.jar]
2015-07-23T22:18:25,233 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/org/apache/logging/log4j/log4j-core/2.2/log4j-core-2.2.jar]
2015-07-23T22:18:25,233 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/org/apache/httpcomponents/httpclient/4.2/httpclient-4.2.jar]
2015-07-23T22:18:25,233 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/org/apache/httpcomponents/httpcore/4.2/httpcore-4.2.jar]
2015-07-23T22:18:25,233 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/com/metamx/emitter/0.3.1/emitter-0.3.1.jar]
2015-07-23T22:18:25,233 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/com/metamx/http-client/1.0.2/http-client-1.0.2.jar]
2015-07-23T22:18:25,233 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/io/netty/netty/3.9.5.Final/netty-3.9.5.Final.jar]
2015-07-23T22:18:25,233 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar]
2015-07-23T22:18:25,233 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.4.4/jackson-annotations-2.4.4.jar]
2015-07-23T22:18:25,234 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.4.4/jackson-core-2.4.4.jar]
2015-07-23T22:18:25,234 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/commons-io/commons-io/2.0.1/commons-io-2.0.1.jar]
2015-07-23T22:18:25,242 INFO [main] io.druid.initialization.Initialization - Loading extension[io.druid.extensions:druid-histogram] for class[io.druid.cli.CliCommandCreator]
2015-07-23T22:18:25,459 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/io/druid/extensions/druid-histogram/0.8.0/druid-histogram-0.8.0.jar]
2015-07-23T22:18:25,460 INFO [main] io.druid.initialization.Initialization - Loading extension[io.druid.extensions:mysql-metadata-storage] for class[io.druid.cli.CliCommandCreator]
2015-07-23T22:18:25,873 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/io/druid/extensions/mysql-metadata-storage/0.8.0/mysql-metadata-storage-0.8.0.jar]
2015-07-23T22:18:25,873 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar]
2015-07-23T22:18:25,873 INFO [main] io.druid.initialization.Initialization - Added URL[file:/root/.m2/repository/org/jdbi/jdbi/2.32/jdbi-2.32.jar]
2015-07-23T22:18:26,050 INFO [main] io.druid.initialization.Initialization - Loading extension[io.druid.extensions:druid-s3-extensions] for class[io.druid.initialization.DruidModule]
2015-07-23T22:18:26,132 INFO [main] io.druid.initialization.Initialization - Adding remote extension module[io.druid.storage.s3.S3StorageDruidModule] for class[io.druid.initialization.DruidModule]
2015-07-23T22:18:26,133 INFO [main] io.druid.initialization.Initialization - Adding remote extension module[io.druid.firehose.s3.S3FirehoseDruidModule] for class[io.druid.initialization.DruidModule]
2015-07-23T22:18:26,133 INFO [main] io.druid.initialization.Initialization - Loading extension[io.druid.extensions:druid-histogram] for class[io.druid.initialization.DruidModule]
2015-07-23T22:18:26,135 INFO [main] io.druid.initialization.Initialization - Adding remote extension module[io.druid.query.aggregation.histogram.ApproximateHistogramDruidModule] for class[io.druid.initialization.DruidModule]
2015-07-23T22:18:26,135 INFO [main] io.druid.initialization.Initialization - Loading extension[io.druid.extensions:mysql-metadata-storage] for class[io.druid.initialization.DruidModule]
2015-07-23T22:18:26,136 INFO [main] io.druid.initialization.Initialization - Adding remote extension module[io.druid.metadata.storage.mysql.MySQLMetadataStorageModule] for class[io.druid.initialization.DruidModule]
2015-07-23T22:18:26,791 INFO [main] io.druid.guice.JsonConfigurator - Loaded class[class io.druid.server.metrics.DruidMonitorSchedulerConfig] from props[druid.monitoring.] as [io.druid.server.metrics.DruidMonitorSchedulerConfig@7c29adc8]
2015-07-23T22:18:26,804 INFO [main] io.druid.guice.JsonConfigurator - Loaded class[class io.druid.server.metrics.MonitorsConfig] from props[druid.monitoring.] as [MonitorsConfig{monitors=[class io.druid.segment.realtime.RealtimeMetricsMonitor]}]
2015-07-23T22:18:26,826 INFO [main] io.druid.guice.JsonConfigurator - Loaded class[class io.druid.server.DruidNode] from props[druid.] as [DruidNode{serviceName='druid/prod/realtime', host='cluster-a', port=8084}]
2015-07-23T22:18:26,835 INFO [main] io.druid.guice.JsonConfigurator - Loaded class[class io.druid.guice.RealtimeManagerConfig] from props[druid.realtime.] as [io.druid.guice.RealtimeManagerConfig@77e7246b]
Exception in thread "main" com.google.inject.CreationException: Guice creation errors:
1) Error injecting constructor, java.lang.NullPointerException
at io.druid.guice.FireDepartmentsProvider.<init>(FireDepartmentsProvider.java:41)
while locating io.druid.guice.FireDepartmentsProvider
at io.druid.guice.RealtimeModule.configure(RealtimeModule.java:79)
while locating java.util.List<io.druid.segment.realtime.FireDepartment>
for parameter 0 at io.druid.segment.realtime.RealtimeMetricsMonitor.<init>(RealtimeMetricsMonitor.java:42)
while locating io.druid.segment.realtime.RealtimeMetricsMonitor
at io.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:78)
at io.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:78)
while locating com.metamx.metrics.MonitorScheduler
at io.druid.server.metrics.MetricsModule.configure(MetricsModule.java:63)
while locating com.metamx.metrics.MonitorScheduler annotated with @com.google.inject.name.Named(value=ForTheEagerness)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:448)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at io.druid.initialization.Initialization.makeInjectorWithModules(Initialization.java:412)
at io.druid.cli.GuiceRunnable.makeInjector(GuiceRunnable.java:55)
at io.druid.cli.ServerRunnable.run(ServerRunnable.java:37)
at io.druid.cli.Main.main(Main.java:91)
Caused by: java.lang.NullPointerException
at java.io.FileInputStream.<init>(FileInputStream.java:130)
at com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:708)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2122)
at io.druid.guice.FireDepartmentsProvider.<init>(FireDepartmentsProvider.java:44)
at io.druid.guice.FireDepartmentsProvider$$FastClassByGuice$$229da177.newInstance(<generated>)
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1058)
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:41)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1005)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1058)
at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:1001)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1040)
at io.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:105)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1058)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at io.druid.guice.LifecycleScope$1.get(LifecycleScope.java:49)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1058)
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:41)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1051)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
... 8 more
# /druid-cluster/realtime-ingestion-spec.json
[
{
"dataSchema":{
"dataSource":"foobar",
"parser":{
"type":"string",
"parseSpec":{
"format" : "tsv",
"timestampSpec" : {
"column" : "_date",
"format" : "auto"
},
"columns" : [
# ommitted
],
"delimiter":"\t",
"dimensionsSpec":{
"dimensions":[
# ommitted
]
}
}
},
"metricsSpec":[
# ommitted
],
"granularitySpec":{
"queryGranularity":"NONE",
"segmentGranularity":"DAY",
"intervals":[ "2015-02-15/2015-08-01" ],
}
},
"ioConfig":{
"type":"realtime",
"firehose":{
"type":"local",
"filter":"*.tsv.gz",
"baseDir":"/store"
},
"plumber":{
"type":"realtime"
}
},
"tuningConfig":{
"maxRowsInMemory":500000,
}
}
]
# config/realtime/runtime.properties
druid.host=cluster-a
druid.port=8084
druid.service=druid/prod/realtime
druid.processing.buffer.sizeBytes=512000000
druid.processing.numThreads=3
druid.monitoring.monitors=["io.druid.segment.realtime.RealtimeMetricsMonitor"]
druid.publish.type="metadata"
druid.realtime.specFile="/druid-cluster/realtime-ingestion-spec.json"
druid.realtime.chathandler.type=announce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment