Spark-shell 啟動WARN---java.net.BindException: Address already in use

來源:互聯網
上載者:User

標籤:lifecycle   UI   return   more   turn   java.net   abstract   nio   default   

同時開啟了兩個SecureCRT的終端介面,其中一個已經進入了Spark-shell,在另一個SecureCRT介面中執行

"spark-shell --master yarn --deploy-mode client < cha02.scala" 時報錯,如下:

[[email protected] test_code]# spark-shell --master yarn --deploy-mode client <cha02.scala
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
17/05/07 20:41:35 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
17/05/07 20:41:37 WARN component.AbstractLifeCycle: FAILED [email protected]{HTTP/1.1}{0.0.0.0:4040}: java.net.BindException: Address already in use
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)

17/05/07 21:00:46 WARN util.Utils: Service ‘SparkUI‘ could not bind on port 4040. Attempting port 4041.
17/05/07 21:00:59 WARN yarn.Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPARK_HOME.
17/05/07 21:01:37 WARN metastore.ObjectStore: Failed to get database global_temp, returning NoSuchObjectException
Spark context Web UI available at http://192.168.1.200:4041
Spark context available as ‘sc‘ (master = yarn, app id = application_1494142860645_0005).
Spark session available as ‘spark‘.
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ ‘_/
/___/ .__/\_,_/_/ /_/\_\ version 2.1.0
/_/

Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_121)
Type in expressions to have them evaluated.
Type :help for more information.

scala>

這是由於啟動一個Spark context 時,SparkUI 預設會使用 4040 連接埠,當 4040 連接埠被佔用時,則嘗試使用另外一個連接埠,即日誌中的 

Service ‘SparkUI‘ could not bind on port 4040. Attempting port 4041.

Spark-shell 啟動WARN---java.net.BindException: Address already in use

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.