flink-1.11.2
./bin/start-cluster.sh 启动然后
./bin/flink run examples/streaming/SocketWindowWordCount.jar  --hostname
localhost --port 1111

但是 jobmanger 页面 task 一直是 scheduler 状态,过了一段那时间后输出错误

2021-06-18 13:34:26,683 INFO
 org.apache.flink.runtime.executiongraph.ExecutionGraph       [] - Source:
Socket Stream -> Flat Map (1/1) (7fc37b6f2e20170da9d95a9b2
28577f2) switched from SCHEDULED to FAILED on not deployed.
org.apache.flink.runtime.jobmanager.scheduler.NoResourceAvailableException:
Could not allocate the required slot within slot request timeout. Please
make sure tha
t the cluster has enough resources.
        at
org.apache.flink.runtime.scheduler.DefaultScheduler.maybeWrapWithNoResourceAvailableException(DefaultScheduler.java:441)
~[flink-dist_2.11-1.11.2.jar:1
.11.2]
        at
org.apache.flink.runtime.scheduler.DefaultScheduler.lambda$assignResourceOrHandleError$6(DefaultScheduler.java:422)
~[flink-dist_2.11-1.11.2.jar:1.11.2

但是 slot 资源是有的。我在其他的机器上执行这种操作是正常的。

有大神帮助解释一下吗?

谢谢,
王磊

回复