zoukankan      html  css  js  c++  java
  • 【原创】大叔经验分享(13)spark运行报错WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.

    本地运行spark报错

    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.
    18/12/18 12:56:55 ERROR SparkContext: Error initializing SparkContext.
    java.net.BindException: Cannot assign requested address: bind: Service 'sparkDriver' failed after 16 retries (starting from 0)! Consider explicitly setting the appropriate port for the service 'sparkDriver' (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:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:127)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:501)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1218)
    at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
    at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
    at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:965)
    at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:210)
    at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:353)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:408)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:455)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
    at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
    at java.lang.Thread.run(Thread.java:745)
    18/12/18 12:56:55 INFO SparkContext: Successfully stopped SparkContext

    看起来一直在尝试绑定端口0失败,默认起始端口应该是4040,设置spark.driver.port=4040还是报相同的错,后来发现增加环境变量即可

    SPARK_LOCAL_IP=127.0.0.1

  • 相关阅读:
    [树形dp] Luogu P4516 潜入行动
    [kruskal][Trie] Codeforces 888G Xor-MST
    [线性基] Luogu P4151 最大XOR和路径
    [线段树] Luogu P4560 砖墙
    [递归][重心] Luogu P4886 快递员
    [Trie][贪心][堆] LibreOJ #3048 异或粽子
    [长链剖分][优先队列] LibreOJ #3052 春节十二响
    [支配树] Bzoj P2815 灾难
    [长链剖分][线段树] Bzoj P1758 重建计划
    [dsu on tree] Codeforces 600E Lomsat gelral
  • 原文地址:https://www.cnblogs.com/barneywill/p/10140026.html
Copyright © 2011-2022 走看看