Fehler beim Binden an: spark-master unter Verwendung eines Remote-Clusters mit zwei Arbeitern
Ich bin die Verwaltung, um alles, was die Arbeit mit der lokalen master-und zwei remote-Mitarbeiter. Nun, ich möchte eine Verbindung zu einem remote-master, der hat die gleiche remote-Mitarbeiter. Ich habe versucht, verschiedene Kombinationen von Einstellungen innerhalb der /etc/hosts und andere reccomendations in das Internet, aber NICHTS funktionierte.
Main class ist:
public static void main(String[] args) {
ScalaInterface sInterface = new ScalaInterface(CHUNK_SIZE,
"awsAccessKeyId",
"awsSecretAccessKey");
SparkConf conf = new SparkConf().setAppName("POC_JAVA_AND_SPARK")
.setMaster("spark://spark-master:7077");
org.apache.spark.SparkContext sc = new org.apache.spark.SparkContext(
conf);
sInterface.enableS3Connection(sc);
org.apache.spark.rdd.RDD<Tuple2<Path, Text>> fileAndLine = (RDD<Tuple2<Path, Text>>) sInterface.getMappedRDD(sc, "s3n://somebucket/");
org.apache.spark.rdd.RDD<String> pInfo = (RDD<String>) sInterface.mapPartitionsWithIndex(fileAndLine);
JavaRDD<String> pInfoJ = pInfo.toJavaRDD();
List<String> result = pInfoJ.collect();
String miscInfo = sInterface.getMiscInfo(sc, pInfo);
System.out.println(miscInfo);
}
Es schlägt fehl:
List<String> result = pInfoJ.collect();
Den Fehler bin ich immer:
1354 [sparkDriver-akka.actor.default-dispatcher-3] ERROR akka.remote.transport.netty.NettyTransport - failed to bind to spark-master/192.168.0.191:0, shutting down Netty transport
1354 [main] WARN org.apache.spark.util.Utils - Service 'sparkDriver' could not bind on port 0. Attempting port 1.
1355 [main] DEBUG org.apache.spark.util.AkkaUtils - In createActorSystem, requireCookie is: off
1363 [sparkDriver-akka.actor.default-dispatcher-3] INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon.
1364 [sparkDriver-akka.actor.default-dispatcher-3] INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports.
1364 [sparkDriver-akka.actor.default-dispatcher-5] INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remoting shut down.
1367 [sparkDriver-akka.actor.default-dispatcher-4] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
1370 [sparkDriver-akka.actor.default-dispatcher-6] INFO Remoting - Starting remoting
1380 [sparkDriver-akka.actor.default-dispatcher-4] ERROR akka.remote.transport.netty.NettyTransport - failed to bind to spark-master/192.168.0.191:0, shutting down Netty transport
Exception in thread "main" 1382 [sparkDriver-akka.actor.default-dispatcher-6] INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon.
1382 [sparkDriver-akka.actor.default-dispatcher-6] INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports.
java.net.BindException: Failed to bind to: spark-master/192.168.0.191:0: Service 'sparkDriver' failed after 16 retries!
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:393)
at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:389)
at scala.util.Success$$anonfun$map$1.apply(Try.scala:206)
at scala.util.Try$.apply(Try.scala:161)
at scala.util.Success.map(Try.scala:206)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
1383 [sparkDriver-akka.actor.default-dispatcher-7] INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remoting shut down.
1385 [delete Spark temp dirs] DEBUG org.apache.spark.util.Utils - Shutdown hook called
Vielen Dank für Ihre Hilfe!
Kommentar zu dem Problem
keine der Antworten hier, hat mir geholfen, aber zu meiner überraschung drehen Sie die WLAN-Verbindung ab hast, löse es für mich. Das ist eigentlich ein lästiges workaround aber!
InformationsquelleAutor der Frage Display Name | 2015-04-27
Du musst angemeldet sein, um einen Kommentar abzugeben.
Setzen Sie die Umgebungsvariable SPARK_LOCAL_IP=127.0.0.1 löste diese für mich.
InformationsquelleAutor der Antwort Travis Carlson
Ich hatte dieses problem bei meinem
/etc/hosts
Datei wurde mapping die falsche IP-Adresse auf meinem lokalen Hostnamen.Den
BindException
in Ihren logs beschwert sich über die IP-Adresse192.168.0.191
. Ich gehe davon aus, dass aufgelöst wird der hostname Ihres Rechners und es ist nicht wird die aktuelle IP-Adresse Ihres Netzwerk-Schnittstelle verwendet wird. Es sollte funktionieren, sobald Sie das beheben.InformationsquelleAutor der Antwort Costi Ciudatu
Hatte ich Funken in meiner EC2-instance. Ich startete ein neues web-server und zur Erfüllung Ihrer Bedingung, die ich verändern musste hostname zu ec2 öffentlichen DNS-Namen, d.h.
Nach, dass meine Funke nicht arbeiten konnten und zeigte eine Fehlermeldung wie folgt:
Ich lösen es, indem Sie SPARK_LOCAL_IP als unten:
dann nur ins Leben gerufen, Sekt Schale, wie unten:
InformationsquelleAutor der Antwort AvkashChauhan
Possily Ihre master ausgeführt wird, die auf nicht-Standard-port. Können Sie Ihre submit-Befehl?
Werfen Sie einen Blick in https://spark.apache.org/docs/latest/spark-standalone.html#connecting-an-application-to-the-cluster
InformationsquelleAutor der Antwort ayan guha