2017-08-19 10 views
0

タイトルに記載されている問題が発生しており、修正方法はわかりません。私は解決策、フォーラムなどを提供する多くの関連答えを試みましたが、私はそれを沈黙させることができませんでした。Sparkマスターからワーカーを起動できません:コード1で終了exitStatus 1

スタンドアロンのSpark Masterを実行するEC2 Ubuntu 16マシン(RAM〜32GB、ROM〜70GB、8コア)があります。私は全体の構成を以下に示します。

spark-env.sh

. . . 
SPARK_PUBLIC_DNS=xx.xxx.xxx.xxx 
SPARK_MASTER_PORT=7077 
. . . 

の/ etc/hosts:私はのIntelliJアイデアを経由して、次のScalaのコードを使用して接続しようとしている

127.0.0.1 locahost localhost.domain ubuntu 
::1 locahost localhost.domain ubuntu 
localhost master # master and slave have same ip 
localhost slave # master and slave have same ip 

new SparkConf() 
    .setAppName("my-app") 
    .setMaster("spark://xx.xxx.xxx.xxx:7077") 
    .set("spark.executor.host", "xx.xxx.xxx.xxx") 
    .set("spark.executor.cores", "8") 
    .set("spark.executor.memory","20g") 

このコンfigurationは次のログにつながります。

. . . 
xx/xx/xx xx:xx:xx INFO Master: Removing executor app-xxxxxxxxxxxxxx-xxxx/xx because it is EXITED 
xx/xx/xx xx:xx:xx INFO Master: Launching executor app-xxxxxxxxxxxxxx-xxxx/xx on worker worker-xxxxxxxxxxxxxx-127.0.0.1-42524 

worker.logのような行がたくさん含ま:あなたがしたい場合here's a Gistは、私は上記置いログの行を含む、

. . . 
xx/xx/xx xx:xx:xx INFO Worker: Executor app-xxxxxxxxxxxxxx-xxxx/xxx finished with state EXITED message Command exited with code 1 exitStatus 1 
xx/xx/xx xx:xx:xx INFO Worker: Asked to launch executor app-xxxxxxxxxxxxxx-xxxx/xxx for my-app 
xx/xx/xx xx:xx:xx INFO SecurityManager: Changing view acls to: ubuntu 
xx/xx/xx xx:xx:xx INFO SecurityManager: Changing modify acls to: ubuntu 
xx/xx/xx xx:xx:xx INFO SecurityManager: Changing view acls groups to: 
xx/xx/xx xx:xx:xx INFO SecurityManager: Changing modify acls groups to: 
xx/xx/xx xx:xx:xx INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(ubuntu); groups with view permissions: Set(); users with modify permissions: Set(ubuntu); groups with modify permissions: Set() 
xx/xx/xx xx:xx:xx INFO ExecutorRunner: Launch command: "/usr/lib/jvm/java-8-openjdk-amd64/jre//bin/java" "-cp" "/usr/local/share/spark/spark-2.1.1-bin-hadoop2.7/conf/:/usr/local/share/spark/spark-2.1.1-bin-hadoop2.7/jars/*" "-Xmx4096M" "-Dspark.driver.port=34889" "-Dspark.cassandra.connection.port=9042" "org.apache.spark.executor.CoarseGrainedExecutorBackend" "--driver-url" "spark://[email protected]:34889" "--executor-id" "476" "--hostname" "127.0.0.1" "--cores" "1" "--app-id" "app-xxxxxxxxxxxxxx-xxxx" "--worker-url" "spark://[email protected]:42524" 

のような行を多く含む master.log

次の基本的な設定を試しても、エラーは0ですが、アプリケーションが停止しているだけで、サーバーは実際に何もしません。 CPU/RAMの使用率はありません。 /etc/hosts

new SparkConf() 
       .setAppName("my-app") 
       .setMaster("spark://xx.xxx.xxx.xxx:7077") 

私は同じIPに、マスターとスレーブの両方を設定します。サーバー上のスカラーバージョン2.11.6build.sbt。サーバー上の2.1.1スパークバージョンとbuild.sbtのスパークバージョン。ここで

いくつかの火花UIスクリーンである:

enter image description here

enter image description here

enter image description here

enter image description here

だから、私はしたいと思います:

サーバー上のそのタスクに私のPCから
  • 起動はタスク
  • 仕事は私のPC

私は推測している上

  • 取得した結果、それは悪いリソース構成することができますか?もしそうでなければ、何が原因でしょうか?このような問題を避けるために、設定をどのように調整する必要がありますか?

    さらに詳しい情報が必要な場合は、尋ねてください。

  • 答えて

    0

    パーソナルコンピュータをオーケストレーションしたいので、設定をマスターとサーバーとして設定を変更しました。

    だから、私ののconf/spark-env.shは次のようになります。

    # Options read by executors and drivers running inside the cluster 
    SPARK_LOCAL_IP=localhost #o set the IP address Spark binds to on this node 
    SPARK_PUBLIC_DNS=xx.xxx.xxx.xxx #PUBLIC SERVER IP 
    

    のconf /スレーブ

    # A Spark Worker will be started on each of the machines listed below. 
    xx.xxx.xxx.xxx #PUBLIC SERVER IP 
    

    の/ etc/hosts

    xx.xxx.xxx.xxx master #PUBLIC SERVER IP 
    xx.xxx.xxx.xxx slave #PUBLIC SERVER IP 
    

    最後にScalaの設定は次のようになります:

    .setMaster("local[*]") 
    .set("spark.executor.host", "xx.xxx.xxx.xxx") //Public Server IP 
    .set("spark.executor.memory","16g") 
    
    関連する問題