现象 : flink web界面可以访问 但是没有task manager节点存活
查看启动日志 : 报错 failed to bind to /0.0.0.0:6123, shutting down Netty transport
2019-11-07 16:31:45,150 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - --------------------------------------------------------------------------------
2019-11-07 16:31:45,151 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Starting StandaloneSessionClusterEntrypoint (Version: 1.9.1, Rev:4d56de8, Date:30.09.2019 @ 11:32:19 CST)
2019-11-07 16:31:45,151 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - OS current user: root
2019-11-07 16:31:45,152 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Current Hadoop/Kerberos user:
2019-11-07 16:31:45,152 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - JVM: Java HotSpot™ 64-Bit Server VM - Oracle Corporation - 1.8/25.231-b11
2019-11-07 16:31:45,152 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Maximum heap size: 989 MiBytes
2019-11-07 16:31:45,152 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - JAVA_HOME: /home/app/jdk1.8.0_231
2019-11-07 16:31:45,152 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - No Hadoop Dependency available
2019-11-07 16:31:45,152 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - JVM Options:
2019-11-07 16:31:45,152 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Xms1024m
2019-11-07 16:31:45,152 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Xmx1024m
2019-11-07 16:31:45,153 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog.file=/home/app/flink-1.9.1/log/flink-root-standalonesession-3-iZ2zecm2bsuv242q0grs37Z.log
2019-11-07 16:31:45,153 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog4j.configuration=file:/home/app/flink-1.9.1/conf/log4j.properties
2019-11-07 16:31:45,153 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlogback.configurationFile=file:/home/app/flink-1.9.1/conf/logback.xml
2019-11-07 16:31:45,153 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Program Arguments:
2019-11-07 16:31:45,153 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - --configDir
2019-11-07 16:31:45,153 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - /home/app/flink-1.9.1/conf
2019-11-07 16:31:45,153 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - --executionMode
2019-11-07 16:31:45,153 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - cluster
2019-11-07 16:31:45,153 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Classpath: /home/app/flink-1.9.1/lib/flink-table_2.11-1.9.1.jar:/home/app/flink-1.9.1/lib/flink-table-blink_2.11-1.9.1.jar:/home/app/flink-1.9.1/lib/log4j-1.2.17.jar:/home/app/flink-1.9.1/lib/slf4j-log4j12-1.7.15.jar:/home/app/flink-1.9.1/lib/flink-dist_2.11-1.9.1.jar:::
2019-11-07 16:31:45,153 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - --------------------------------------------------------------------------------
2019-11-07 16:31:45,154 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Registered UNIX signal handlers for [TERM, HUP, INT]
2019-11-07 16:31:45,182 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.rpc.address, 172.17.57.173
2019-11-07 16:31:45,189 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.rpc.port, 6123
2019-11-07 16:31:45,189 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.heap.size, 1024m
2019-11-07 16:31:45,189 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.heap.size, 1024m
2019-11-07 16:31:45,189 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.numberOfTaskSlots, 1
2019-11-07 16:31:45,189 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: parallelism.default, 1
2019-11-07 16:31:45,190 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.execution.failover-strategy, region
2019-11-07 16:31:45,297 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Starting StandaloneSessionClusterEntrypoint.
2019-11-07 16:31:45,297 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Install default filesystem.
2019-11-07 16:31:45,323 INFO org.apache.flink.core.fs.FileSystem - Hadoop is not in the classpath/dependencies. The extended set of supported File Systems via Hadoop is not available.
2019-11-07 16:31:45,346 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Install security context.
2019-11-07 16:31:45,353 INFO org.apache.flink.runtime.security.modules.HadoopModuleFactory - Cannot create Hadoop Security Module because Hadoop cannot be found in the Classpath.
2019-11-07 16:31:45,365 INFO org.apache.flink.runtime.security.SecurityUtils - Cannot install HadoopSecurityContext because Hadoop cannot be found in the Classpath.
2019-11-07 16:31:45,365 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Initializing cluster services.
2019-11-07 16:31:45,708 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcServiceUtils - Trying to start actor system at 172.17.57.173:6123
2019-11-07 16:31:46,323 INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
2019-11-07 16:31:46,346 INFO akka.remote.Remoting - Starting remoting
2019-11-07 16:31:46,480 ERROR akka.remote.transport.netty.NettyTransport - failed to bind to /0.0.0.0:6123, shutting down Netty transport
2019-11-07 16:31:46,485 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Shutting StandaloneSessionClusterEntrypoint down with application status FAILED. Diagnostics java.net.BindException: Could not start actor system on any port in port range 6123
at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:172)
at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:112)
at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:87)
at org.apache.flink.runtime.rpc.akka.AkkaRpcServiceUtils.createRpcService(AkkaRpcServiceUtils.java:84)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.createRpcService(ClusterEntrypoint.java:272)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.initializeServices(ClusterEntrypoint.java:248)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:202)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster 0 ( C l u s t e r E n t r y p o i n t . j a v a : 164 ) a t o r g . a p a c h e . f l i n k . r u n t i m e . s e c u r i t y . N o O p S e c u r i t y C o n t e x t . r u n S e c u r e d ( N o O p S e c u r i t y C o n t e x t . j a v a : 30 ) a t o r g . a p a c h e . f l i n k . r u n t i m e . e n t r y p o i n t . C l u s t e r E n t r y p o i n t . s t a r t C l u s t e r ( C l u s t e r E n t r y p o i n t . j a v a : 163 ) a t o r g . a p a c h e . f l i n k . r u n t i m e . e n t r y p o i n t . C l u s t e r E n t r y p o i n t . r u n C l u s t e r E n t r y p o i n t ( C l u s t e r E n t r y p o i n t . j a v a : 501 ) a t o r g . a p a c h e . f l i n k . r u n t i m e . e n t r y p o i n t . S t a n d a l o n e S e s s i o n C l u s t e r E n t r y p o i n t . m a i n ( S t a n d a l o n e S e s s i o n C l u s t e r E n t r y p o i n t . j a v a : 65 ) . 2019 − 11 − 0716 : 31 : 46 , 509 I N F O a k k a . r e m o t e . R e m o t e A c t o r R e f P r o v i d e r 0(ClusterEntrypoint.java:164) at org.apache.flink.runtime.security.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:30) at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:163) at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runClusterEntrypoint(ClusterEntrypoint.java:501) at org.apache.flink.runtime.entrypoint.StandaloneSessionClusterEntrypoint.main(StandaloneSessionClusterEntrypoint.java:65) . 2019-11-07 16:31:46,509 INFO akka.remote.RemoteActorRefProvider 0(ClusterEntrypoint.java:164)atorg.apache.flink.runtime.security.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:30)atorg.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:163)atorg.apache.flink.runtime.entrypoint.ClusterEntrypoint.runClusterEntrypoint(ClusterEntrypoint.java:501)atorg.apache.flink.runtime.entrypoint.StandaloneSessionClusterEntrypoint.main(StandaloneSessionClusterEntrypoint.java:65).2019−11−0716:31:46,509INFOakka.remote.RemoteActorRefProviderRemotingTerminator - Shutting down remote daemon.
2019-11-07 16:31:46,510 INFO akka.remote.RemoteActorRefProvider R e m o t i n g T e r m i n a t o r − R e m o t e d a e m o n s h u t d o w n ; p r o c e e d i n g w i t h f l u s h i n g r e m o t e t r a n s p o r t s . 2019 − 11 − 0716 : 31 : 46 , 510 E R R O R a k k a . r e m o t e . R e m o t i n g − R e m o t i n g s y s t e m h a s b e e n t e r m i n a t e d a b r u b t l y . A t t e m p t i n g t o s h u t d o w n t r a n s p o r t s 2019 − 11 − 0716 : 31 : 46 , 515 I N F O a k k a . r e m o t e . R e m o t e A c t o r R e f P r o v i d e r RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports. 2019-11-07 16:31:46,510 ERROR akka.remote.Remoting - Remoting system has been terminated abrubtly. Attempting to shut down transports 2019-11-07 16:31:46,515 INFO akka.remote.RemoteActorRefProvider RemotingTerminator−Remotedaemonshutdown;proceedingwithflushingremotetransports.2019−11−0716:31:46,510ERRORakka.remote.Remoting−Remotingsystemhasbeenterminatedabrubtly.Attemptingtoshutdowntransports2019−11−0716:31:46,515INFOakka.remote.RemoteActorRefProviderRemotingTerminator - Remoting shut down.
2019-11-07 16:31:46,540 ERROR org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Could not start cluster entrypoint StandaloneSessionClusterEntrypoint.
org.apache.flink.runtime.entrypoint.ClusterEntrypointException: Failed to initialize the cluster entrypoint StandaloneSessionClusterEntrypoint.
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:182)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runClusterEntrypoint(ClusterEntrypoint.java:501)
at org.apache.flink.runtime.entrypoint.StandaloneSessionClusterEntrypoint.main(StandaloneSessionClusterEntrypoint.java:65)
Caused by: java.net.BindException: Could not start actor system on any port in port range 6123
at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:172)
at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:112)
at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:87)
at org.apache.flink.runtime.rpc.akka.AkkaRpcServiceUtils.createRpcService(AkkaRpcServiceUtils.java:84)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.createRpcService(ClusterEntrypoint.java:272)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.initializeServices(ClusterEntrypoint.java:248)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:202)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$0(ClusterEntrypoint.java:164)
at org.apache.flink.runtime.security.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:30)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:163)
总结 : 最后其实也没有找到具体原因
总结一下最终我改过几个地方:
1 ip地址 ,因为刚开始使用阿里云服务器 最初将ip设置的是外网地址 这是一个明显的错误
2.查询过有说6123端口是ipv6的端口 需要改为6124 然而在我这里并没后什么用处
3. 使用bin/stop-cluster.sh 之后standalonesession 没有杀死 ,然后修改完ip地址 重新启动的时候 还是使用的最初的配置 (因该是这个问题 , 只有大胆猜测 没有去验证) 解决方式 jps 找到对应进程id kill -9 id 杀死该进程 重新启动就好了