# NullPointerException Creating hdfs repo because SSL

**URL:** <https://discuss.elastic.co/t/nullpointerexception-creating-hdfs-repo-because-ssl/88348>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [June 6, 2017, 3:53am UTC](https://discuss.elastic.co/t/nullpointerexception-creating-hdfs-repo-because-ssl/88348 "2017-06-06T03:53:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![diego\_duenas](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@diego\_duenas](https://discuss.elastic.co/u/diego_duenas)\
**Post date:** [June 6, 2017, 3:53am UTC](https://discuss.elastic.co/t/nullpointerexception-creating-hdfs-repo-because-ssl/88348/1 "2017-06-06T03:53:55Z")

</div>

Hi All.

I am trying to configure elasticsearch hadoop repository against kerberized and SSL protected HDFS.

I can successfully autenticate against kerberos, but is giving me this error creating a repository:

[2017-06-06 03:37:19,882][INFO][org.apache.hadoop.security.UserGroupInformation] Login successful for user elasticsearch/ using keytab file /tmp/elastic.ktb  
[2017-06-06 03:37:20,130][ERROR][org.apache.hadoop.hdfs.DFSClient] Failed to close inode 796273  
java.io.IOException: DataStreamer Exception:  
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:563)  
Caused by: java.lang.NullPointerException  
at org.apache.hadoop.crypto.CryptoInputStream.(CryptoInputStream.java:133)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.DataTransferSaslUtil.createStreamPair(DataTransferSaslUtil.java:345)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient.doSaslHandshake(SaslDataTransferClient.java:490)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient.getEncryptedStreams(SaslDataTransferClient.java:299)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient.send(SaslDataTransferClient.java:242)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient.checkTrustAndSend(SaslDataTransferClient.java:211)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient.socketSend(SaslDataTransferClient.java:183)  
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1289)  
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1237)  
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:449)  
[2017-06-06 03:37:20,131][INFO][repositories] [[lnx-eus2dw-6892890b.bcidatalake.cl](http://lnx-eus2dw-6892890b.bcidatalake.cl)] update repository [diego\_hdfs\_repository]  
[2017-06-06 03:37:20,174][WARN][org.apache.hadoop.hdfs.DFSClient] DataStreamer Exception  
java.lang.NullPointerException  
at org.apache.hadoop.crypto.CryptoInputStream.(CryptoInputStream.java:133)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.DataTransferSaslUtil.createStreamPair(DataTransferSaslUtil.java:345)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient.doSaslHandshake(SaslDataTransferClient.java:490)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient.getEncryptedStreams(SaslDataTransferClient.java:299)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient.send(SaslDataTransferClient.java:242)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient.checkTrustAndSend(SaslDataTransferClient.java:211)  
at org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient.socketSend(SaslDataTransferClient.java:183)  
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1289)  
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1237)  
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:449)

Any ideas on how to create/configure a hdfs repository using SSL? Thanks.

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [June 6, 2017, 4:18pm UTC](https://discuss.elastic.co/t/nullpointerexception-creating-hdfs-repo-because-ssl/88348/2 "2017-06-06T16:18:25Z")

</div>

Might be related to this? [https://github.com/elastic/elasticsearch/issues/25022](https://github.com/elastic/elasticsearch/issues/25022)

---

<div class="post-metadata">

**Author:** ![diego\_duenas](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@diego\_duenas](https://discuss.elastic.co/u/diego_duenas)\
**Post date:** [June 6, 2017, 6:34pm UTC](https://discuss.elastic.co/t/nullpointerexception-creating-hdfs-repo-because-ssl/88348/3 "2017-06-06T18:34:15Z")

</div>

Hi James. Thanks for answer. I think is not the same case. In the link you provided the error is no\_class\_def\_found\_error, but in my case is NullPointerException. I tried to put the missing jar in the repo folder without success.

I think is because i dont know how to configure the SSL certificates for hdfs repository. Can you give me some light in how can i do it? thanks for your help. ( btw the elasticsearch version i am using is 2.4.3 )

---

<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:** [July 4, 2017, 6:34pm UTC](https://discuss.elastic.co/t/nullpointerexception-creating-hdfs-repo-because-ssl/88348/4 "2017-07-04T18:34:47Z")

</div>

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