spark rdd调用saveToES报错,如何解决?

问题描述

15/05/1511:45:21INFOTaskSetManager:Startingtask0.0instage1.0(TID1,localhost,ANY,1327bytes)15/05/1511:45:21INFOExecutor:Runningtask0.0instage1.0(TID1)15/05/1511:45:21INFOHadoopRDD:Inputsplit:hdfs://192.168.105.226:9000/LesterDemoTest/Data/draft/patent.db:0+4843715/05/1511:45:22ERRORExecutor:Exceptionintask0.0instage1.0(TID1)org.elasticsearch.hadoop.rest.EsHadoopTransportException:InvalidtargetURIfe80:0:0:0:20c:29ff:feac:b7e2%2:9200atorg.elasticsearch.hadoop.rest.commonshttp.CommonsHttpTransport.<init>(CommonsHttpTransport.java:173)atorg.elasticsearch.hadoop.rest.NetworkClient.selectNextNode(NetworkClient.java:86)atorg.elasticsearch.hadoop.rest.NetworkClient.<init>(NetworkClient.java:69)atorg.elasticsearch.hadoop.rest.RestClient.<init>(RestClient.java:80)atorg.elasticsearch.hadoop.rest.InitializationUtils.discoverEsVersion(InitializationUtils.java:81)atorg.elasticsearch.hadoop.rest.RestService.createWriter(RestService.java:348)atorg.elasticsearch.spark.rdd.EsRDDWriter.write(EsRDDWriter.scala:31)atorg.elasticsearch.spark.rdd.EsSpark$$anonfun$saveToEs$1.apply(EsSpark.scala:34)atorg.elasticsearch.spark.rdd.EsSpark$$anonfun$saveToEs$1.apply(EsSpark.scala:34)atorg.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:61)atorg.apache.spark.scheduler.Task.run(Task.scala:64)atorg.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:203)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)atjava.lang.Thread.run(Thread.java:722)Causedby:org.apache.commons.httpclient.URIException:invalidportnumberatorg.apache.commons.httpclient.URI.parseAuthority(URI.java:2248)atorg.apache.commons.httpclient.URI.parseUriReference(URI.java:1978)atorg.apache.commons.httpclient.URI.<init>(URI.java:167)atorg.elasticsearch.hadoop.rest.commonshttp.CommonsHttpTransport.<init>(CommonsHttpTransport.java:171)...14more15/05/1511:45:22WARNTaskSetManager:Losttask0.0instage1.0(TID1,localhost):org.elasticsearch.hadoop.rest.EsHadoopTransportException:InvalidtargetURIfe80:0:0:0:20c:29ff:feac:b7e2%2:9200atorg.elasticsearch.hadoop.rest.commonshttp.CommonsHttpTransport.<init>(CommonsHttpTransport.java:173)atorg.elasticsearch.hadoop.rest.NetworkClient.selectNextNode(NetworkClient.java:86)atorg.elasticsearch.hadoop.rest.NetworkClient.<init>(NetworkClient.java:69)atorg.elasticsearch.hadoop.rest.RestClient.<init>(RestClient.java:80)atorg.elasticsearch.hadoop.rest.InitializationUtils.discoverEsVersion(InitializationUtils.java:81)atorg.elasticsearch.hadoop.rest.RestService.createWriter(RestService.java:348)atorg.elasticsearch.spark.rdd.EsRDDWriter.write(EsRDDWriter.scala:31)atorg.elasticsearch.spark.rdd.EsSpark$$anonfun$saveToEs$1.apply(EsSpark.scala:34)atorg.elasticsearch.spark.rdd.EsSpark$$anonfun$saveToEs$1.apply(EsSpark.scala:34)atorg.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:61)atorg.apache.spark.scheduler.Task.run(Task.scala:64)atorg.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:203)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)atjava.lang.Thread.run(Thread.java:722)Causedby:org.apache.commons.httpclient.URIException:invalidportnumberatorg.apache.commons.httpclient.URI.parseAuthority(URI.java:2248)atorg.apache.commons.httpclient.URI.parseUriReference(URI.java:1978)atorg.apache.commons.httpclient.URI.<init>(URI.java:167)atorg.elasticsearch.hadoop.rest.commonshttp.CommonsHttpTransport.<init>(CommonsHttpTransport.java:171)...14more15/05/1511:45:22ERRORTaskSetManager:Task0instage1.0failed1times;abortingjob15/05/1511:45:22INFOTaskSchedulerImpl:RemovedTaskSet1.0,whosetaskshaveallcompleted,frompool15/05/1511:45:22INFOTaskSchedulerImpl:Cancellingstage115/05/1511:45:22INFODAGScheduler:Job1failed:runJobatEsSpark.scala:34,took0.653925sExceptioninthread"main"org.apache.spark.SparkException:Jobabortedduetostagefailure:Task0instage1.0failed1times,mostrecentfailure:Losttask0.0instage1.0(TID1,localhost):org.elasticsearch.hadoop.rest.EsHadoopTransportException:InvalidtargetURIfe80:0:0:0:20c:29ff:feac:b7e2%2:9200atorg.elasticsearch.hadoop.rest.commonshttp.CommonsHttpTransport.<init>(CommonsHttpTransport.java:173)atorg.elasticsearch.hadoop.rest.NetworkClient.selectNextNode(NetworkClient.java:86)atorg.elasticsearch.hadoop.rest.NetworkClient.<init>(NetworkClient.java:69)atorg.elasticsearch.hadoop.rest.RestClient.<init>(RestClient.java:80)atorg.elasticsearch.hadoop.rest.InitializationUtils.discoverEsVersion(InitializationUtils.java:81)atorg.elasticsearch.hadoop.rest.RestService.createWriter(RestService.java:348)atorg.elasticsearch.spark.rdd.EsRDDWriter.write(EsRDDWriter.scala:31)atorg.elasticsearch.spark.rdd.EsSpark$$anonfun$saveToEs$1.apply(EsSpark.scala:34)atorg.elasticsearch.spark.rdd.EsSpark$$anonfun$saveToEs$1.apply(EsSpark.scala:34)atorg.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:61)atorg.apache.spark.scheduler.Task.run(Task.scala:64)atorg.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:203)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)atjava.lang.Thread.run(Thread.java:722)Causedby:org.apache.commons.httpclient.URIException:invalidportnumberatorg.apache.commons.httpclient.URI.parseAuthority(URI.java:2248)atorg.apache.commons.httpclient.URI.parseUriReference(URI.java:1978)atorg.apache.commons.httpclient.URI.<init>(URI.java:167)atorg.elasticsearch.hadoop.rest.commonshttp.CommonsHttpTransport.<init>(CommonsHttpTransport.java:171)...14moreDriverstacktrace:atorg.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$failJobAndIndependentStages(DAGScheduler.scala:1203)atorg.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1192)atorg.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1191)atscala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)atscala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)atorg.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:1191)atorg.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:693)atorg.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:693)atscala.Option.foreach(Option.scala:236)atorg.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:693)atorg.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1393)atorg.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1354)atorg.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:48)

解决方案

解决方案二:
主要的问题就是:org.elasticsearch.hadoop.rest.EsHadoopTransportException:InvalidtargetURIfe80:0:0:0:20c:29ff:feac:b7e2%2:9200在构造sparkConf设置的es.nodes,在spark运行时替换成了fe80:0:0:0:20c:29ff:feac:b7e2%2。
解决方案三:
已经解决,禁用掉es所在机器的ipv6就可以了

时间: 2024-12-23 07:26:40

spark rdd调用saveToES报错,如何解决?的相关文章

ArcGIS API for Silverlight 调用WebService出现跨域访问报错的解决方法

原文:ArcGIS API for Silverlight 调用WebService出现跨域访问报错的解决方法       群里好几个朋友都提到过这样的问题,说他们在Silverlight中调用了WebService方法,总报这个错误,贴图如下: 解决办法:      1.确定你的Silverlight项目及承载Silverlight的Web程序根目录下都包含2个跨域文件,分别是crossdomain.xml和clientaccesspolicy.xml:  crossdomain.xml文件,

soap-Axis调用ws报错:Bad envelope tag: html,请问怎么解决,谢谢

问题描述 Axis调用ws报错:Bad envelope tag: html,请问怎么解决,谢谢 AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: Bad envelope tag: html faultActor: faultNode: faultDetail: {htt

invalid method name:-jdbc访问impala的时候加载驱动报错,怎样解决?

问题描述 jdbc访问impala的时候加载驱动报错,怎样解决? java.sql.SQLException: [Simba]ImpalaJDBCDriver Error setting/closing session: {0}. at com.cloudera.hivecommon.api.HS2Client.openSession(Unknown Source) at com.cloudera.hivecommon.api.HS2Client.(Unknown Source) at com.

各位朋友好,请教ubuntu系统python3.4环境下安装matplotlib报错的解决办法

问题描述 各位朋友好,请教ubuntu系统python3.4环境下安装matplotlib报错的解决办法 具体的问题是这样的: 我的系统是Ubuntu14.04 的64位系统,python3.4版本下,想使用matplotlib来做图. 由于matplotlib依赖numpy和python的图像库PIL,因此我先安装numpy和PIL然后,再安装matplotlib, 这里附上我的安装matplotlib的shell命令 #安装科学计算库numpy sudo pip3 install numpy

flash-C#与Flash通讯的问题,调用组件报错

问题描述 C#与Flash通讯的问题,调用组件报错 C#与Flash通讯,添加了系统自带的Flash.ocx组件,调用了Call接口并传递两个参数,通讯过程已经用xml进行格式转换 项目在debug模式下正常运行,Flash文件也正常显示 但是换成release模式下却一直报错:对com组件的调用返回了错误 HRESULT E_FAIL 求大神解决办法 解决方案 看看是不是权限的问题或者控件没有正确注册造成的.

sap-wsdl2java调用webservce报错,但是用soapui调用没问题,求大神帮忙分析下

问题描述 wsdl2java调用webservce报错,但是用soapui调用没问题,求大神帮忙分析下 AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server faultSubcode: faultString: System Error faultActor: faultNode: faultDetail: {http://sap.com/xi/WebService/xi2.0}SystemError:RCV

android-关于安卓的报错错误解决!

问题描述 关于安卓的报错错误解决! 之前程序测试的时候能正常运行,现在加了点内容几个类,就报错了.!!! 具体错误如下: 04-09 00:25:55.687 8058-8058/com.samuel.schat W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40e2b258) 04-09 00:25:55.703 8058-8058/com.samuel.schat E/AndroidRuntim

net framework-程序安装完毕,开启win7服务,调用.net报错

问题描述 程序安装完毕,开启win7服务,调用.net报错 默认安装.NET Framework 3.5. 默认安装Sybase ODBC驱动程序. 数据交换服务注册:在命令行下,切换到数据交换程序的目录(如:D:门店接口hosting),运行install.bat,然后提示--------无法启动服务.System.Configuration.ConfigurationErrorsException: Error creating context 'spring.root': 未能加载文件或程

ssh整合-关于ssh中hibernate生成方法从Action中调用报错main调用不报错

问题描述 关于ssh中hibernate生成方法从Action中调用报错main调用不报错 看图学生求解决没遇到过!我建测试类用main方法进来一点问题都没有正常输出i=1 解决方案 报的什么错,贴出来,,, 解决方案二: 你确定text的userinfo和action的userinfo的内容一样吗? 你在findUserinfonamepwd方法中将name和pwd打印出来看看. 我怀疑你action的参数userinfo是null或者userinfo实例化了,但是name或者pwd是null