[
https://issues.apache.org/jira/browse/FLINK-5672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15865583#comment-15865583
]
ASF GitHub Bot commented on FLINK-5672:
---------------------------------------
Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/3298#discussion_r101008339
--- Diff: flink-dist/src/main/flink-bin/bin/stop-cluster.sh ---
@@ -25,14 +25,30 @@ bin=`cd "$bin"; pwd`
# Stop TaskManager instance(s) using pdsh (Parallel Distributed Shell)
when available
readSlaves
-command -v pdsh >/dev/null 2>&1
-if [[ $? -ne 0 ]]; then
+# all-local setup?
+all_localhost=1
+for slave in ${SLAVES[@]}; do
+ if [[ "$slave" != "localhost" ]]; then
+ all_localhost=0
+ break
+ fi
+done
+
+if [[ ${all_localhost} -eq 1 ]]; then
+ # all-local setup
for slave in ${SLAVES[@]}; do
- ssh -n $FLINK_SSH_OPTS $slave -- "nohup /bin/bash -l
\"${FLINK_BIN_DIR}/taskmanager.sh\" stop &"
+ "${FLINK_BIN_DIR}"/taskmanager.sh stop
done
else
- PDSH_SSH_ARGS="" PDSH_SSH_ARGS_APPEND=$FLINK_SSH_OPTS pdsh -w $(IFS=,
; echo "${SLAVES[*]}") \
- "nohup /bin/bash -l \"${FLINK_BIN_DIR}/taskmanager.sh\" stop"
+ command -v pdsh >/dev/null 2>&1
+ if [[ $? -ne 0 ]]; then
+ for slave in ${SLAVES[@]}; do
+ ssh -n $FLINK_SSH_OPTS $slave -- "nohup /bin/bash -l
\"${FLINK_BIN_DIR}/taskmanager.sh\" stop &"
+ done
+ else
+ PDSH_SSH_ARGS="" PDSH_SSH_ARGS_APPEND=$FLINK_SSH_OPTS pdsh -w
$(IFS=, ; echo "${SLAVES[*]}") \
+ "nohup /bin/bash -l \"${FLINK_BIN_DIR}/taskmanager.sh\" stop"
--- End diff --
you're right but it's probably more readable to keep the commands in there
instead of sharing them, also it has been that way before ;)
> Job fails with java.lang.IllegalArgumentException: port out of range:-1
> -----------------------------------------------------------------------
>
> Key: FLINK-5672
> URL: https://issues.apache.org/jira/browse/FLINK-5672
> Project: Flink
> Issue Type: Bug
> Components: Core
> Reporter: Timo Walther
>
> I started the JobManager with {{start-local.sh}} and started another
> TaskManager with {{taskmanager.sh start}}. My job is a Table API job with a
> {{orderBy}} (range partitioning with parallelism 2).
> The job fails with the following exception:
> {code}
> java.lang.IllegalArgumentException: port out of range:-1
> at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
> at java.net.InetSocketAddress.<init>(InetSocketAddress.java:188)
> at
> org.apache.flink.runtime.io.network.ConnectionID.<init>(ConnectionID.java:47)
> at
> org.apache.flink.runtime.deployment.InputChannelDeploymentDescriptor.fromEdges(InputChannelDeploymentDescriptor.java:124)
> at
> org.apache.flink.runtime.executiongraph.ExecutionVertex.createDeploymentDescriptor(ExecutionVertex.java:627)
> at
> org.apache.flink.runtime.executiongraph.Execution.deployToSlot(Execution.java:358)
> at
> org.apache.flink.runtime.executiongraph.Execution$1.apply(Execution.java:284)
> at
> org.apache.flink.runtime.executiongraph.Execution$1.apply(Execution.java:279)
> at
> org.apache.flink.runtime.concurrent.impl.FlinkFuture$5.onComplete(FlinkFuture.java:259)
> at akka.dispatch.OnComplete.internal(Future.scala:248)
> at akka.dispatch.OnComplete.internal(Future.scala:245)
> at akka.dispatch.japi$CallbackBridge.apply(Future.scala:175)
> at akka.dispatch.japi$CallbackBridge.apply(Future.scala:172)
> at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
> at
> org.apache.flink.runtime.concurrent.Executors$DirectExecutor.execute(Executors.java:56)
> at
> scala.concurrent.impl.ExecutionContextImpl.execute(ExecutionContextImpl.scala:122)
> at
> scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40)
> at
> scala.concurrent.impl.Promise$KeptPromise.onComplete(Promise.scala:333)
> at
> org.apache.flink.runtime.concurrent.impl.FlinkFuture.handleAsync(FlinkFuture.java:256)
> at
> org.apache.flink.runtime.concurrent.impl.FlinkFuture.handle(FlinkFuture.java:270)
> at
> org.apache.flink.runtime.executiongraph.Execution.scheduleForExecution(Execution.java:279)
> at
> org.apache.flink.runtime.executiongraph.ExecutionVertex.scheduleForExecution(ExecutionVertex.java:479)
> at
> org.apache.flink.runtime.executiongraph.Execution$5.call(Execution.java:525)
> at
> org.apache.flink.runtime.executiongraph.Execution$5.call(Execution.java:521)
> at akka.dispatch.Futures$$anonfun$future$1.apply(Future.scala:95)
> at
> scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
> at
> scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)