问题一:请教个问题,我在83服务器上部署了一个Flink1.17 ,有人遇到过吗?
请教个问题,我在83服务器上部署了一个Flink1.17 ,然后我又两个mysql数据库,分别部署在63服务器和81服务上了,我在往83提交cdc作业时(链接的是81服务器上的数据库),前面几个任务能正常提交,后面再提交报超时,为了验证cdc连接数,我把后面的任务链接的服务器改为了63,可以正常提交,有人遇到过吗?
参考答案:
根据您提供的信息,可能是由于81服务器上的数据库连接数达到了上限,导致后续任务无法正常提交。您可以尝试以下方法解决这个问题:
- 检查81服务器上的数据库连接数限制。您可以登录到MySQL数据库,执行以下命令查看当前连接数和最大连接数:
show status like 'Threads_connected'; show variables like 'max_connections';
- 如果发现连接数接近或达到最大连接数,您可以考虑增加最大连接数。在MySQL配置文件(通常是my.cnf或my.ini)中,找到
[mysqld]
部分,修改或添加以下行:
max_connections = 新的连接数;
- 然后重启MySQL服务使更改生效。
- 如果问题仍然存在,您可以尝试优化Flink作业的资源分配。确保每个任务都有足够的资源来处理数据,避免因为资源不足导致任务超时。您可以调整Flink作业的并行度、内存等参数,以提高作业的性能。
- 如果以上方法都无法解决问题,您可以考虑将CDC作业拆分成多个子任务,分别连接到不同的数据库服务器上。这样可以避免单个数据库服务器的连接数达到上限,提高作业的稳定性。
关于本问题的更多回答可点击进行查看:
https://developer.aliyun.com/ask/585862
问题二:请教一个K8S上部署的flink集群的问题?
请教一个K8S上部署的flink集群的问题?taskmanager运行一段时间pod就会error,报错日志是
2023-12-26 03:43:06,179 ERROR org.apache.flink.runtime.taskexecutor.TaskExecutor [] - Fatal error occurred in TaskExecutor akka.tcp://flink@100.73.193.232:6122/user/rpc/taskmanager_0.
org.apache.flink.util.FlinkException: The TaskExecutor's registration at the ResourceManager akka.tcp://flink@100.65.6.181:6123/user/rpc/resourcemanager_0 has been rejected: Rejected TaskExecutor registration at the ResourceManger because: The ResourceManager does not recognize this TaskExecutor.
at org.apache.flink.runtime.taskexecutor.TaskExecutor$ResourceManagerRegistrationListener.onRegistrationRejection(TaskExecutor.java:2254) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutor$ResourceManagerRegistrationListener.onRegistrationRejection(TaskExecutor.java:2209) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutorToResourceManagerConnection.onRegistrationRejection(TaskExecutorToResourceManagerConnection.java:109) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutorToResourceManagerConnection.onRegistrationRejection(TaskExecutorToResourceManagerConnection.java:40) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.registration.RegisteredRpcConnection.lambda$createNewRegistration$0(RegisteredRpcConnection.java:269) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774) ~[?:1.8.0_312]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750) ~[?:1.8.0_312]
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456) ~[?:1.8.0_312]
at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRunAsync(AkkaRpcActor.java:440) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:208) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:158) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:26) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:21) [flink-dist_2.11-1.13.5.jar:1.13.5]
at scala.PartialFunction$class.applyOrElse(PartialFunction.scala:123) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:21) [flink-dist_2.11-1.13.5.jar:1.13.5]
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:170) [flink-dist_2.11-1.13.5.jar:1.13.5]
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) [flink-dist_2.11-1.13.5.jar:1.13.5]
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.actor.Actor$class.aroundReceive(Actor.scala:517) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:225) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:592) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.actor.ActorCell.invoke(ActorCell.scala:561) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:258) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.Mailbox.run(Mailbox.scala:225) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.Mailbox.exec(Mailbox.scala:235) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [flink-dist_2.11-1.13.5.jar:1.13.5]
2023-12-26 03:43:06,202 ERROR org.apache.flink.runtime.taskexecutor.TaskManagerRunner [] - Fatal error occurred while executing the TaskManager. Shutting it down...
org.apache.flink.util.FlinkException: The TaskExecutor's registration at the ResourceManager akka.tcp://flink@100.65.6.181:6123/user/rpc/resourcemanager_0 has been rejected: Rejected TaskExecutor registration at the ResourceManger because: The ResourceManager does not recognize this TaskExecutor.
at org.apache.flink.runtime.taskexecutor.TaskExecutor$ResourceManagerRegistrationListener.onRegistrationRejection(TaskExecutor.java:2254) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutor$ResourceManagerRegistrationListener.onRegistrationRejection(TaskExecutor.java:2209) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutorToResourceManagerConnection.onRegistrationRejection(TaskExecutorToResourceManagerConnection.java:109) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutorToResourceManagerConnection.onRegistrationRejection(TaskExecutorToResourceManagerConnection.java:40) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.registration.RegisteredRpcConnection.lambda$createNewRegistration$0(RegisteredRpcConnection.java:269) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774) ~[?:1.8.0_312]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750) ~[?:1.8.0_312]
然后jobmanager中没有报错,只是有拒绝的提示
flink--kubernetes-session-0-flink-cluster-5689c66d9c-92492.log:2023-12-26 03:43:06,114 WARN org.apache.flink.runtime.resourcemanager.active.ActiveResourceManager [] - Discard registration from TaskExecutor flink-cluster-taskmanager-2-4 at (akka.tcp://flink@100.73.193.219:6122/user/rpc/taskmanager_0) because the framework did not recognize it
每次出现这种错误,需要人工干预手动重启jobmanager才能解决,不然任务就不运行了。
参考答案:
重启了吧,因为某些原因重启了 然后没有注册到flink集群中
https://blog.csdn.net/qq_21383435/article/details/123262747
关于本问题的更多回答可点击进行查看:
https://developer.aliyun.com/ask/585858
问题三:有没部署过flink sql gateway的呀?一直报错?
有没部署过flink sql gateway的呀?一直报错 org.apache.thrift.protocol.TProtocolException: Missing version in readMessageBegin, old client?
参考答案:
jdbc:hive2://sql-gateway-ip:10000/default;auth=noSasl
关于本问题的更多回答可点击进行查看:
https://developer.aliyun.com/ask/586067
问题四:Flink 这个是什么资源不够哇?我看到slot 都还有?
Flink 这个是什么资源不够哇?我看到slot 都还有
参考答案:
你任务要求的并发slot数量不够
关于本问题的更多回答可点击进行查看:
https://developer.aliyun.com/ask/586062
问题五:这个flink 报错有解决方案吗?
这个flink 报错有解决方案吗?
参考答案:
这个错误提示表示你的 Flink 任务使用的内存超过了物理内存的限制。具体来说,你的容器使用了 5.0GB 的物理内存,但是只分配了 5GB 的物理内存。此外,你还使用了 6.9GB 的虚拟内存,总共使用了 10.5GB 的内存。
解决这个问题的方法有两个:
- 增加你的 Flink 任务的内存限制。你可以通过修改 Flink 的配置文件来增加每个 taskmanager 的 heap memory 和 network memory 的限制。但是请注意,这可能会增加你的 Flink 任务的资源消耗,可能会导致其他问题。
- 优化你的 Flink 任务。你可以检查你的 Flink 任务的代码,看看是否有任何不必要的内存使用,或者是否可以优化你的数据处理逻辑来减少内存的使用。
另外,你的 Flink 任务还出现了 "Container exited with a non-zero exit code 143" 的错误。这个错误通常表示你的 Flink 任务因为某种原因被 kill 掉了。这可能是因为你的 Flink 任务使用了过多的资源,或者是因为你的 Flink 任务遇到了无法处理的异常。你可以查看你的 Flink 任务的日志,看看是否有任何异常的输出,以确定具体的原因。
关于本问题的更多回答可点击进行查看: