我遇到以下错误
org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel $ AnnotatedConnectException:连接被拒绝:localhost / 127.0.0.1:8081
,同时尝试使用Flink流数据。我的代码在一个月前运行良好,现在出现此错误。在通过访问http://localhost:8081上的Flink Web Dashboard来监视流的进度之前,现在我的浏览器返回一个错误,表明它无法访问服务器“ localhost”。可能是什么问题呢?先感谢您。
错误消息的完整输出:
org.apache.flink.client.program.ProgramInvocationException:无法检索执行结果。 (工作编号:cfa44a8fd6a62f51ef8c0f956d55ee56) 在org.apache.flink.client.program.rest.RestClusterClient.submitJob(RestClusterClient.java:260) 在org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:486) 在org.apache.flink.streaming.api.environment.StreamContextEnvironment.execute(StreamContextEnvironment.java:66) 在examples.WaterLevelKafka.main(WaterLevelKafka.java:124) 在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处 在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:498) 在org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:529) 在org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:421) 在org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:426) 在org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:804) 在org.apache.flink.client.cli.CliFrontend.runProgram(CliFrontend.java:280) 在org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:215) 在org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:1044) 在org.apache.flink.client.cli.CliFrontend.lambda $ main $ 11(CliFrontend.java:1120) 在java.security.AccessController.doPrivileged(本机方法) 在javax.security.auth.Subject.doAs(Subject.java:422) 在org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1836) 在org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41) 在org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1120) 原因:org.apache.flink.runtime.client.JobSubmissionException:无法提交JobGraph。 在org.apache.flink.client.program.rest.RestClusterClient.lambda $ submitJob $ 8(RestClusterClient.java:379) 在java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:870) 在java.util.concurrent.CompletableFuture $ UniExceptionally.tryFire(CompletableFuture.java:852) 在java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) 在java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977) 在org.apache.flink.runtime.concurrent.FutureUtils.lambda $ retryOperationWithDelay $ 5(FutureUtils.java:213)中 在java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760) 在java.util.concurrent.CompletableFuture $ UniWhenComplete.tryFire(CompletableFuture.java:736) 在java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) 在java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977) 在org.apache.flink.runtime.rest.RestClient.lambda $ submitRequest $ 1(RestClient.java:276) 在org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511) 在org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:504) 在org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:483) 在org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424) 在org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:121) 在org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel $ AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:327) 在org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel $ AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:343) 在org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:633) 在org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) 在org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) 在org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) 在org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor $ 5.run(SingleThreadEventExecutor.java:884) 在org.apache.flink.shaded.netty4.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) 在java.lang.Thread.run(Thread.java:745) 原因:java.util.concurrent.CompletionException:org.apache.flink.runtime.concurrent.FutureUtils $ RetryException:无法完成该操作。重试次数已用尽。 在java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326) 在java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338) 在java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:911) 在java.util.concurrent.CompletableFuture $ UniRelay.tryFire(CompletableFuture.java:899) ...另外22个 原因:org.apache.flink.runtime.concurrent.FutureUtils $ RetryException:无法完成该操作。重试次数已用尽。 ...另外20个 引起原因:java.util.concurrent.CompletionException:org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel $ AnnotatedConnectException:连接被拒绝:localhost / 127.0.0.1:8081 在java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292) 在java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308) 在java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:943) 在java.util.concurrent.CompletableFuture $ UniCompose.tryFire(CompletableFuture.java:926) ...另外17个 造成原因:org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel $ AnnotatedConnectException:连接被拒绝:localhost / 127.0.0.1:8081 在sun.nio.ch.SocketChannelImpl.checkConnect(本机方法) 在sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) 在org.apache.flink.shaded.netty4.io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:325) 在org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel $ AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ...另外7个 引起原因:java.net.ConnectException:连接被拒绝 ...还有11个
答案 0 :(得分:2)
Apache flink集群似乎未运行。
您只需要启动它即可:
./bin/start-cluster.sh # Start Flink