Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL Issue when connecting to secured druid instance #313

Open
debashis1982 opened this issue Jan 21, 2021 · 0 comments
Open

SSL Issue when connecting to secured druid instance #313

debashis1982 opened this issue Jan 21, 2021 · 0 comments

Comments

@debashis1982
Copy link

I am using io.druid:tranquility-core_2.11:0.8.3 as the dependency to connect to druid and write data to it

The properties in my config file look like this -

"properties": {
    "zookeeper.connect": "router.druid.cluster:2181",
    "druid.selectors.indexing.serviceName": "druid/overlord",
    "druid.discovery.curator.path": "/druid/discovery",
    "druidBeam.taskLocator": "overlord",
    "druidBeam.overlordPollPeriod": "PT5S",
    "druidBeam.basicAuthUser": "userName",
    "druidBeam.basicAuthPass": "password",
    "druid.tls.enable": true,
    "druid.tls.trustStorePassword": "trustStorePwd",
    "druid.tls.trustStorePath": "/Users/me/keystore/keystore.jks"
  }

When trying to write to Druid I get this error

Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException:  (No such file or directory)
	at com.metamx.tranquility.security.SSLContextMaker$.createSSLContextOption(SSLContextMaker.scala:48)
	at com.metamx.tranquility.druid.DruidBeams$BuilderConfig$$anon$5$$anonfun$34.apply(DruidBeams.scala:1028)
	at com.metamx.tranquility.druid.DruidBeams$BuilderConfig$$anon$5$$anonfun$34.apply(DruidBeams.scala:1025)
	at scala.Option.getOrElse(Option.scala:121)
	at com.metamx.tranquility.druid.DruidBeams$BuilderConfig$$anon$5.<init>(DruidBeams.scala:1025)
	at com.metamx.tranquility.druid.DruidBeams$BuilderConfig.buildAll(DruidBeams.scala:971)
	at com.metamx.tranquility.druid.DruidBeams$Builder.buildBeam(DruidBeams.scala:841)
	at com.metamx.tranquility.druid.DruidBeams$Builder.buildTranquilizer(DruidBeams.scala:935)
	at com.tranquility.test.Main.main(Main.java:37)
Caused by: java.io.FileNotFoundException:  (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
	at com.metamx.tranquility.security.SSLContextMaker$.createSSLContextOption(SSLContextMaker.scala:33)
	... 8 more

When debugging I found that
https://github.com/druid-io/tranquility/blob/master/core/src/main/scala/com/metamx/tranquility/security/SSLContextMaker.scala#L33 is getting an empty string for tlsTrustStorePath. Also note that the other properties like trustStorePassword are getting populated properly.

Is there an issue in the code or is my configuration incorrect? Any help will be highly appreciated. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant