我之前也是类似问题,还没解决,1.14版本,没什么参数设置,就直接执行那个脚本就可以创建集群。创建后给了个地址不能访问,我是自己查了clusterIp才可以访问,创建后显示的那个ip是不能用的。
yu'an huang <h.yuan...@gmail.com> 于2022年4月14日周四 10:31写道: > > Hi 卓宇, > > 如exception中提到的:Connection refused: rancher-test.ziroom.com/10.30.238.18:8081 > <http://rancher-test.ziroom.com/10.30.238.18:8081>。由于session > cluster地址不可访问所以job > graph提交失败了。一般原因是由于Kubernetes集群存在网络隔离,需要适当的设置service才能访问和提交job。 > > 请问你是如何设置的你的session cluster呢,可以访问UI吗? > 你的参数kubernetes.rest-service.exposed.type设置的是什么? > 你使用Flink的版本又是什么呢? > > > > > > > > On 14 Apr 2022, at 9:25 AM, 陈卓宇 <2572805...@qq.com.INVALID> wrote: > > > > 按照官方文档进行以下操作: > > # (1) Start Kubernetes session $ ./bin/kubernetes-session.sh > > -Dkubernetes.cluster-id=my-first-flink-cluster # (2) Submit example job $ > > ./bin/flink run \ --target kubernetes-session \ > > -Dkubernetes.cluster-id=my-first-flink-cluster \ > > ./examples/streaming/TopSpeedWindowing.jar > > 报错:org.apache.flink.client.program.ProgramInvocationException: The main > > method caused an error: Failed to execute job 'CarTopSpeedWindowingExample'. > > at > > org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:360) > > at > > org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:213) > > at > > org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114) > > at > > org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:816) > > at > > org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:248) > > at > > org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1058) > > at > > org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1136) > > at > > org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28) > > at > > org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1136) > > Caused by: org.apache.flink.util.FlinkException: Failed to execute job > > 'CarTopSpeedWindowingExample'. > > at > > org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1918) > > at > > org.apache.flink.client.program.StreamContextEnvironment.executeAsync(StreamContextEnvironment.java:135) > > at > > org.apache.flink.client.program.StreamContextEnvironment.execute(StreamContextEnvironment.java:76) > > at > > org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1782) > > at > > org.apache.flink.streaming.examples.windowing.TopSpeedWindowing.main(TopSpeedWindowing.java:99) > > at > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > at > > java.lang.reflect.Method.invoke(Method.java:498) > > at > > org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:343) > > ... 8 more > > Caused by: org.apache.flink.runtime.client.JobSubmissionException: Failed > > to submit JobGraph. > > at > > org.apache.flink.client.program.rest.RestClusterClient.lambda$submitJob$7(RestClusterClient.java:400) > > at > > java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:884) > > at > > java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:866) > > at > > java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488) > > at > > java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990) > > at > > org.apache.flink.runtime.concurrent.FutureUtils.lambda$retryOperationWithDelay$9(FutureUtils.java:390) > > at > > java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774) > > at > > java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750) > > at > > java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488) > > at > > java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990) > > at > > org.apache.flink.runtime.rest.RestClient.lambda$submitRequest$1(RestClient.java:430) > > at > > org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577) > > at > > org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:570) > > at > > org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:549) > > at > > org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490) > > at > > org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:615) > > at > > org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:608) > > at > > org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:321) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:337) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) > > at > > org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) > > at > > org.apache.flink.shaded.netty4.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) > > at java.lang.Thread.run(Thread.java:748) > > Caused by: org.apache.flink.runtime.concurrent.FutureUtils$RetryException: > > Could not complete the operation. Number of retries has been exhausted. > > at > > org.apache.flink.runtime.concurrent.FutureUtils.lambda$retryOperationWithDelay$9(FutureUtils.java:386) > > ... 21 more > > Caused by: java.util.concurrent.CompletionException: > > org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException: > > Connection refused: rancher-test.ziroom.com/10.30.238.18:8081 > > at > > java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292) > > at > > java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308) > > at > > java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:957) > > at > > java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:940) > > ... 19 more > > Caused by: > > org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException: > > Connection refused: rancher-test.ziroom.com/10.30.238.18:8081 > > Caused by: java.net.ConnectException: Connection refused > > at > > sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > at > > sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) > > at > > org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) > > at > > org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) > > at > > org.apache.flink.shaded.netty4.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) > > at java.lang.Thread.run(Thread.java:748) > > > > 请教大佬我该如何解决此问题? > > > > > > > > > > > > > > > > > > > > 卓 > > > > > > >