首页 / 浏览问题 / 云GIS / 问题详情
流数据存储之Elasticsearch报错
2EXP 2019年11月14日

我根据超图官方的例子https://blog.csdn.net/supermapsupport/article/details/92775689操作,但是日志报错了,结果如下:

NFO ] 2019-11-13 13:35:45,550 method:com.supermap.bdt.streaming.sender.SenderBase$$anonfun$process$1.apply(SenderBase.scala:46)
Sender.process time:1573623345000 ms
13:35:46 INFO JobScheduler: Finished job streaming job 1573623345000 ms.0 from job set of time 1573623345000 ms
13:35:46 INFO JobScheduler: Total delay: 1.862 s for time 1573623345000 ms (execution: 1.313 s)
13:35:46 ERROR JobScheduler: Error running job streaming job 1573623345000 ms.0
org.elasticsearch.hadoop.rest.EsHadoopInvalidRequest: [HEAD] on [streamingdata/streaming] failed; server[30.76.226.248:9300] returned [405|Method Not Allowed:]
    at org.elasticsearch.hadoop.rest.RestClient.checkResponse(RestClient.java:505)
    at org.elasticsearch.hadoop.rest.RestClient.executeNotFoundAllowed(RestClient.java:476)
    at org.elasticsearch.hadoop.rest.RestClient.exists(RestClient.java:547)
    at com.supermap.bdt.io.elasticsearch.ESTools$.putMapping(ESTools.scala:49)
    at com.supermap.bdt.io.elasticsearch.ESWriter$.createMapping(ESWriter.scala:268)
    at com.supermap.bdt.io.elasticsearch.ESWriter$.writeData(ESWriter.scala:98)
    at com.supermap.bdt.io.elasticsearch.ESWriter$.append(ESWriter.scala:83)
    at com.supermap.bdt.streaming.sender.EsAppendSender.process(EsAppendSender.scala:20)
    at com.supermap.bdt.streaming.sender.SenderBase$$anonfun$process$1.apply(SenderBase.scala:47)
    at com.supermap.bdt.streaming.sender.SenderBase$$anonfun$process$1.apply(SenderBase.scala:45)
    at org.apache.spark.streaming.dstream.ForEachDStream$$anonfun$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(ForEachDStream.scala:51)
    at org.apache.spark.streaming.dstream.ForEachDStream$$anonfun$1$$anonfun$apply$mcV$sp$1.apply(ForEachDStream.scala:51)
    at org.apache.spark.streaming.dstream.ForEachDStream$$anonfun$1$$anonfun$apply$mcV$sp$1.apply(ForEachDStream.scala:51)
    at org.apache.spark.streaming.dstream.DStream.createRDDWithLocalProperties(DStream.scala:415)
    at org.apache.spark.streaming.dstream.ForEachDStream$$anonfun$1.apply$mcV$sp(ForEachDStream.scala:50)
    at org.apache.spark.streaming.dstream.ForEachDStream$$anonfun$1.apply(ForEachDStream.scala:50)
    at org.apache.spark.streaming.dstream.ForEachDStream$$anonfun$1.apply(ForEachDStream.scala:50)
    at scala.util.Try$.apply(Try.scala:192)
    at org.apache.spark.streaming.scheduler.Job.run(Job.scala:39)
    at org.apache.spark.streaming.scheduler.JobScheduler$JobHandler$$anonfun$run$1.apply$mcV$sp(JobScheduler.scala:254)
    at org.apache.spark.streaming.scheduler.JobScheduler$JobHandler$$anonfun$run$1.apply(JobScheduler.scala:254)
    at org.apache.spark.streaming.scheduler.JobScheduler$JobHandler$$anonfun$run$1.apply(JobScheduler.scala:254)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
    at org.apache.spark.streaming.scheduler.JobScheduler$JobHandler.run(JobScheduler.scala:253)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

请问该如何解决?

iserver版本是supermap-iserver-9.0.1a-win64-deploy。

ES是自己搭建的。

1个回答

像是版本不兼容引起的访问es服务失败。901的iServer推荐用的es版本为5.4.x系列,10i版本的iServer推荐用的es版本为6.6.x系列的。建议检查es版本。或用iServer datastore自带的es试试。
1,565EXP 2019年11月14日
...