2016-07-24 263 views
0

我有一個Spark Spark集羣,其中主節點也是工作節點。我不能達到從驅動程序代碼節點的主人,而我得到的錯誤:Spark主機:7077無法訪問

14:07:10 WARN client.AppClient$ClientEndpoint: Failed to connect to master master-machine:7077

在驅動程序代碼節點的SparkContext配置爲: SparkConf conf = new SparkConf(true).setMaster(spark:master-machine//:7077);

我可以成功ping master-machine ,但我無法成功telnet master-machine 7077。這意味着機器可以到達,但該端口不可用。

可能是什麼問題?我爲驅動程序代碼運行的主節點和節點(客戶端)禁用了Ubuntu的ufw防火牆。

+1

可以,如果你直接在主節點上運行的驅動程序,您連接? –

+1

這裏[應用程序客戶端問題](http://stackoverflow.com/questions/28453835/apache-spark-error-could-not-connect-to-akka-tcp-sparkmaster)的問題。這可能會幫助你解決你的問題。 –

回答

0

你的語法是有點過了,您有:

setMaster(spark:master-machine//:7077) 

你想:

setMaster(spark://master-machine:7077) 

從星火文檔:

Once started, the master will print out a spark://HOST:PORT URL for itself, which you can use to connect workers to it, or pass as the 「master」 argument to SparkContext. You can also find this URL on the master’s web UI, which is http://localhost:8080 by default.

您可以使用一個IP地址在那裏,我遇到了基於debian的安裝問題,我總是需要使用IP地址,但這是一個單獨的問題。舉個例子:

spark.master   spark://5.6.7.8:7077 

configuration page in Spark docs

相關問題