# Cannot open stream inlined queries need to be marked as such through \`?\` and \`{}\` ES Spark connection

**URL:** <https://discuss.elastic.co/t/cannot-open-stream-inlined-queries-need-to-be-marked-as-such-through-and-es-spark-connection/168956>\
**Category:** Elasticsearch\
**Created:** [February 19, 2019, 7:47am UTC](https://discuss.elastic.co/t/cannot-open-stream-inlined-queries-need-to-be-marked-as-such-through-and-es-spark-connection/168956 "2019-02-19T07:47:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashantgupta048](https://avatars.discourse-cdn.com/v4/letter/p/ed655f/32.png) [@prashantgupta048](https://discuss.elastic.co/u/prashantgupta048)\
**Post date:** [February 19, 2019, 7:47am UTC](https://discuss.elastic.co/t/cannot-open-stream-inlined-queries-need-to-be-marked-as-such-through-and-es-spark-connection/168956/1 "2019-02-19T07:47:22Z")

</div>

I am trying to connect elastic search from Spark java code i have set the ssl to true I have provided trust and keystore also in Sparkconf.  
But am getting below error when am trying to read the data from RDD

Caused by: org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Cannot open stream (inlined queries need to be marked as such through `?` and `{}`) for resource I:\cert-elk\xyz.truststore  
at org.elasticsearch.hadoop.util.IOUtils.open(IOUtils.java:180)  
at org.elasticsearch.hadoop.util.IOUtils.open(IOUtils.java:185)  
at org.elasticsearch.hadoop.rest.commonshttp.SSLSocketFactory.loadKeyStore(SSLSocketFactory.java:178)  
at org.elasticsearch.hadoop.rest.commonshttp.SSLSocketFactory.loadKeyManagers(SSLSocketFactory.java:193)  
at org.elasticsearch.hadoop.rest.commonshttp.SSLSocketFactory.createSSLContext(SSLSocketFactory.java:166)  
... 31 more

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 19, 2019, 7:47am UTC](https://discuss.elastic.co/t/cannot-open-stream-inlined-queries-need-to-be-marked-as-such-through-and-es-spark-connection/168956/2 "2019-03-19T07:47:23Z")

</div>

Closed on March 19, 2019, 7:47am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
