Spark2.2出现异常:ERROR SparkUI: Failed to bind SparkUI

时间:2022-12-08 10:44:00

详细错误信息如下:

// :: INFO util.log: Logging initialized @5402ms
// :: INFO server.Server: jetty-9.3.z-SNAPSHOT
// :: INFO server.Server: Started @5604ms
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: WARN util.Utils: Service 'SparkUI' could not bind on port . Attempting port .
// :: ERROR ui.SparkUI: Failed to bind SparkUI
java.net.BindException: 地址已在使用: Service 'SparkUI' failed after retries (starting from )! Consider explicitly setting the appropriate port for the service 'SparkUI' (for example spark.ui.port for SparkUI) to an available port or increasing spark.port.maxRetries.
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:)
at sun.nio.ch.Net.bind(Net.java:)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:)
at org.spark_project.jetty.server.ServerConnector.open(ServerConnector.java:)
at org.spark_project.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:)
at org.spark_project.jetty.server.ServerConnector.doStart(ServerConnector.java:)
at org.spark_project.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:)
at org.apache.spark.ui.JettyUtils$.org$apache$spark$ui$JettyUtils$$newConnector$(JettyUtils.scala:)
at org.apache.spark.ui.JettyUtils$.org$apache$spark$ui$JettyUtils$$httpConnect$(JettyUtils.scala:)
at org.apache.spark.ui.JettyUtils$$anonfun$.apply(JettyUtils.scala:)
at org.apache.spark.ui.JettyUtils$$anonfun$.apply(JettyUtils.scala:)
at org.apache.spark.util.Utils$$anonfun$startServiceOnPort$.apply$mcVI$sp(Utils.scala:)
at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:)
at org.apache.spark.util.Utils$.startServiceOnPort(Utils.scala:)
at org.apache.spark.ui.JettyUtils$.startJettyServer(JettyUtils.scala:)
at org.apache.spark.ui.WebUI.bind(WebUI.scala:)
at org.apache.spark.SparkContext$$anonfun$.apply(SparkContext.scala:)
at org.apache.spark.SparkContext$$anonfun$.apply(SparkContext.scala:)
at scala.Option.foreach(Option.scala:)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:)
at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:)
at org.apache.spark.sql.SparkSession$Builder$$anonfun$.apply(SparkSession.scala:)
at org.apache.spark.sql.SparkSession$Builder$$anonfun$.apply(SparkSession.scala:)
at scala.Option.getOrElse(Option.scala:)
at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:)
at com.dx.b.streaming.domain.perf.SparkHelper.getAndConfigureSparkSession(SparkHelper.java:)
at com.dx.b.streaming.Main.main(Main.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$(SparkSubmit.scala:)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

错误原因:

每一个Spark任务都会占用一个SparkUI端口,默认为4040,如果被占用则依次递增端口重试。但是有个默认重试次数,为16次。16次重试都失败后,会放弃该任务的运行。

解决方法

初始化SparkConf时,添加conf.set(“spark.port.maxRetries”,“100”)语句;使用spark-submit提交任务时,在命令行中添加-Dspark.port.maxRetries=100;在spark-defaults.conf中添加spark.port.maxRetries=100

Spark2.2出现异常:ERROR SparkUI: Failed to bind SparkUI的更多相关文章

  1. Error&colon;Execution failed for task &&num;39&semi;&colon;app&colon;dexDebug&&num;39&semi;&period; &gt&semi; com&period;android&period;ide&period;common&period;process&period;ProcessException

    异常Log: Error:Execution failed for task ‘:app:dexDebug’. > com.android.ide.common.process.ProcessE ...

  2. Error&colon;Execution failed for task &amp&semi;&num;39&semi;&colon;app&colon;dexDebug&amp&semi;&num;39&semi;&period; &amp&semi;gt&semi; com&period;android&period;ide&period;common&period;process&period;ProcessException

    异常Log: Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessE ...

  3. 异常问题解决Error&colon;Execution failed for task &&num;39&semi;&colon;app&colon;processDebugManifest&&num;39&semi;

    Error:Execution failed for task ':app:processDebugManifest' www.MyException.Cn  网友分享于:2015-12-28  浏览 ...

  4. ERROR Shell&colon; Failed to locate the winutils binary in the hadoop binary path

    文章发自:http://www.cnblogs.com/hark0623/p/4170172.html  转发请注明 14/12/17 19:18:53 ERROR Shell: Failed to ...

  5. tabpagerindictor&colon;mergeReleaseResources FAILED Error&colon;Execution failed for task &&num;39&semi;&colon;tabpagerindictor&colon;mergeReleaseResources&&num;39&semi;&period; &gt&semi; D&colon;&bsol;android&bsol;adt-bundle-windows-x86&lowbar;64-20140702&bsol;android-open-project-demo-mast

    解决:将项目移动到路径少的目录再运行即可 异常日志: D:\android\adt-bundle-windows-x86_64-20140702\android-open-project-demo-m ...

  6. rsync &commat;ERROR&colon; auth failed on module backup 解决思路及附录rsync常见问题及解决办法

    昨晚小版本上线,使用rsync往服务器上传文件时,client报如下异常: @ERROR: auth failed on module backup rsync error: error starti ...

  7. Android中使用databinding编译时出现的error&colon;Execution failed for task &&num;39&semi;&colon;app&colon;dataBindingProcessLayoutsDebug&&num;39&semi;

    Windows环境下使用svn对AndroidStudio更新代码时,总会在源文件中出现一堆乱码,尤其是xml文件中的乱码,不仅找起来费劲,改起来更费劲. 最近从svn更新代码之后,编译时出现了下面这 ...

  8. &lbrack;转载&rsqb;Error -27796&colon; Failed to connect to server

      原文地址:Error -27796: Failed to connect to server "test.shunde.gov.cn:80"作者:蓝小C 问题描述: 使用Loa ...

  9. Error&colon;Execution failed for task &&num;39&semi;&colon;app&colon;dexDebug&&num;39&semi;&period; &gt&semi; com&period;android&period;ide&period;common&period;process&period;ProcessException总结

    最新项目中遇到了 Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.Proces ...

随机推荐

  1. VirtualBox 桥接上网方式的配置

    最近在搞Redis所以装了个virtualbox的ubuntu的虚拟机, redis不是在ubuntu上. 因为需要使用本机客户端访问redis服务,所以需要配置虚拟机和本地机器的双向访问,所以就用到 ...

  2. asp之缓存 cachestate

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  3. WNDR3700V4恢复原厂固件&lpar;使用TFTP刷网件原厂固件&rpar;

    WNDR3700v4原厂固件下载地址: http://support.netgear.cn/doucument/More.asp?id=2203 操作方法: 1.将设备断电: 2.按住设备背面的Res ...

  4. centos6 搭建ELK

    mark一下时间:2016年2月19日10:17:09 记录使用 Logstash: Logstash服务的组件,用于处理传入的日志. Elasticsearch: 存储所有日志 Kibana 4: ...

  5. Swift3&period;0基础语法学习&lt&semi;二&gt&semi;

    对象和类: // // ViewController2.swift // SwiftBasicDemo // // Created by 思 彭 on 16/11/15. // Copyright © ...

  6. ios json parse

    参考:http://wenxin2009.iteye.com/blog/1671691

  7. 分布式数据存储 - MySQL双主复制

    上篇文章<分布式数据存储 - MySQL主从复制>,我们说到MySQL主从复制很好的保障了从库,读的高可用性.so,问题来了: 1.针对主库,写的高可用性又是如何做到高可用性? 2.如果需 ...

  8. Private Members in JavaScript

    Private Members in JavaScript Douglas Crockford www.crockford.com JavaScript is the world's most mis ...

  9. SpringMvc学习-增删改查

    本节主要介绍SpringMVC简单的增删改查功能. 1.查询 dao中的代码 public List<WeatherPojo> getAllWeather(){ String sql=&q ...

  10. Vijos P1881 闪烁的星星

    背景 星光闪耀--深蓝色空间 听说过他们的语言 沉默 暮 他们称赞深相互 描写叙述 繁星, 漫天的繁星. 繁星排成一列, 我数一数呀, 一共同拥有N仅仅小星星呢. 星星们是听话的好孩子, 小岛在指挥它 ...