I am getting below mentioned error when running Mapreduce with output written to Elasticsearch. Please let me know what I am doing wrong.
Elasticsearch version: 2.0.0
elasticsearch-hadoop-mr: 2.2.0-beta1
Shield & marvel plugins installed
Steps to setup keystore on elasticsearch node:
1.keytool -importcert -keystore -file cacert.pem -alias snapin
2.keytool -genkey -alias node01 -keystore -keyalg RSA -keysize 2048 -validity 365
3.keytool -certreq -alias node01 -keystore -file -keyalg rsa
4.keytool -importcert -keystore -file -alias node01
Steps to setup keystore on client node:
1.keytool -genkey -alias client01 -keystore -keyalg RSA -keysize 2048 -validity 365
2.keytool -certreq -alias client01 -keystore -file -keyalg rsa
3.keytool -importcert -keystore -file -alias client01
SSL configuration parameters setup in elasticsearch.yml -
shield.ssl.keystore.path: /etc/elasticsearch/shield/
shield.ssl.keystore.password: *******
shield.transport.ssl: true
shield.http.ssl: true
Client side configuration:
Here are the client side configuration parameters that have been set-
es.nodes
es.resource
es.net.http.auth.user
es.net.http.auth.pass
es.net.ssl
es.net.ssl.keystore.location
es.net.ssl.keystore.pass
Error we are receiving:
2015-11-13 13:40:39,477 WARN mapred.Child [main]: Error running child
org.elasticsearch.hadoop.rest.EsHadoopTransportException: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at org.elasticsearch.hadoop.rest.NetworkClient.execute(NetworkClient.java:116)
at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:383)
at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:363)
at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:367)
at org.elasticsearch.hadoop.rest.RestClient.get(RestClient.java:121)
at org.elasticsearch.hadoop.rest.RestClient.esVersion(RestClient.java:513)
at org.elasticsearch.hadoop.rest.InitializationUtils.discoverEsVersion(InitializationUtils.java:177)
at org.elasticsearch.hadoop.rest.RestService.createWriter(RestService.java:378)
at org.elasticsearch.hadoop.mr.EsOutputFormat$EsRecordWriter.init(EsOutputFormat.java:173)
at org.elasticsearch.hadoop.mr.EsOutputFormat$EsRecordWriter.write(EsOutputFormat.java:149)
at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.write(MapTask.java:591)
at org.apache.hadoop.mapreduce.task.TaskInputOutputContextImpl.write(TaskInputOutputContextImpl.java:85)
at org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.write(WrappedMapper.java:106)
at com.aexp.imdc.elasticsearch.ContactImportDriver$ContactImportMapper.map(ContactImportDriver.java:70)
at com.aexp.imdc.elasticsearch.ContactImportDriver$ContactImportMapper.map(ContactImportDriver.java:32)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:139)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:702)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:352)
at org.apache.hadoop.mapred.Child$4.run(Child.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1566)
at org.apache.hadoop.mapred.Child.main(Child.java:267)
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
at java.security.cert.PKIXParameters.(PKIXParameters.java:120)
at java.security.cert.PKIXBuilderParameters.(PKIXBuilderParameters.java:104)
at sun.security.validator.PKIXValidator.(PKIXValidator.java:88)
... 46 more
2015-11-13 13:40:39,485 INFO mapred.Task [main]: Runnning cleanup for the task