您好,详细报错如下:
Caused by: java.lang.RuntimeException: Error while getting state
at 
org.apache.flink.runtime.state.DefaultKeyedStateStore.getMapState(DefaultKeyedStateStore.java:109)
at 
org.apache.flink.streaming.api.operators.StreamingRuntimeContext.getMapState(StreamingRuntimeContext.java:232)
at 
com.myouchai.mishap.transformation.process.AsyncDecisionUpgrade.open(AsyncDecisionUpgrade.java:61)
at 
org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:34)
at 
org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:100)
at 
org.apache.flink.streaming.api.operators.co.CoBroadcastWithKeyedOperator.open(CoBroadcastWithKeyedOperator.java:91)
at 
org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.initializeStateAndOpenOperators(RegularOperatorChain.java:110)
at 
org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates(StreamTask.java:711)
at 
org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.call(StreamTaskActionExecutor.java:55)
at 
org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:687)
at 
org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:654)
at 
org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958)
at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927)
at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.flink.util.StateMigrationException: For heap backends, 
the new state serializer 
(org.apache.flink.api.common.typeutils.base.MapSerializer@b3dd31ab) must not be 
incompatible with the old state serializer 
(org.apache.flink.api.common.typeutils.base.MapSerializer@35a76e76).
at 
org.apache.flink.runtime.state.heap.HeapKeyedStateBackend.tryRegisterStateTable(HeapKeyedStateBackend.java:211)
at 
org.apache.flink.runtime.state.heap.HeapKeyedStateBackend.createInternalState(HeapKeyedStateBackend.java:276)
at 
org.apache.flink.runtime.state.ttl.TtlStateFactory.createTtlStateContext(TtlStateFactory.java:225)
at 
org.apache.flink.runtime.state.ttl.TtlStateFactory.createMapState(TtlStateFactory.java:177)
at 
org.apache.flink.runtime.state.ttl.TtlStateFactory.createState(TtlStateFactory.java:132)
at 
org.apache.flink.runtime.state.ttl.TtlStateFactory.createStateAndWrapWithTtlIfEnabled(TtlStateFactory.java:72)
at 
org.apache.flink.runtime.state.AbstractKeyedStateBackend.getOrCreateKeyedState(AbstractKeyedStateBackend.java:302)
at 
org.apache.flink.runtime.state.AbstractKeyedStateBackend.getPartitionedState(AbstractKeyedStateBackend.java:353)
at 
org.apache.flink.runtime.state.DefaultKeyedStateStore.getPartitionedState(DefaultKeyedStateStore.java:115)
at 
org.apache.flink.runtime.state.DefaultKeyedStateStore.getMapState(DefaultKeyedStateStore.java:106)
... 15 more


| |
Jason_H
|
|
hyb_he...@163.com
|
---- 回复的原邮件 ----
| 发件人 | yue ma<mayuefi...@gmail.com> |
| 发送日期 | 2022年8月25日 13:56 |
| 收件人 | <user-zh@flink.apache.org> |
| 主题 | Re: flink自动重启出错 |
你好,可以贴下完整的 JM/TM 日志嘛。 感觉不是很符合预期 , 如果是自动failover 的话应该不会发生 StateMig
rationException

Jason_H <hyb_he...@163.com> 于2022年8月25日周四 09:36写道:

您好,报错如下:
cause by: java.lang.RuntimeException: Error while getting state
org.apache.flink.util.StateMigrationException: For heap backends, the new
state serializer must not be incompatible with the old state serializer


| |
Jason_H
|
|
hyb_he...@163.com
|
---- 回复的原邮件 ----
| 发件人 | yue ma<mayuefi...@gmail.com> |
| 发送日期 | 2022年8月24日 16:48 |
| 收件人 | <user-zh@flink.apache.org> |
| 主题 | Re: flink自动重启出错 |
你好 ~可以贴下更详细的报错

Hangxiang Yu <master...@gmail.com> 于2022年8月24日周三 13:10写道:

是DS作业吗?可以share下使用state的部分吗?

On Sat, Aug 20, 2022 at 3:35 PM Jason_H <hyb_he...@163.com> wrote:

您好,改过任务,但是 是以新的任务启动的,改动很大,并不依赖之前老的任务


| |
Jason_H
|
|
hyb_he...@163.com
|
---- 回复的原邮件 ----
| 发件人 | Michael Ran<greemqq...@163.com> |
| 发送日期 | 2022年8月20日 15:31 |
| 收件人 | tsreape...@gmail.com<user-zh@flink.apache.org> |
| 主题 | 回复:flink自动重启出错 |
改过任务吗?



| |
greemqq...@163.com
|
|
邮箱:greemqq...@163.com
|




---- 回复的原邮件 ----
| 发件人 | Jason_H<hyb_he...@163.com> |
| 日期 | 2022年08月19日 11:52 |
| 收件人 | flink中文邮件组<user-zh@flink.apache.org> |
| 抄送至 | |
| 主题 | flink自动重启出错 |
cause by: java.lang.RuntimeException: Error while getting state
org.apache.flink.util.StateMigrationException: For heap backends, the new
state serializer must not be incompatible with the old state serializer



大家好,我最近遇到一个很奇怪的问题,我的作业自动重启的时候报这个错,我上网查了一下,说是状态不兼容,但是我的作业都是新的作业启动的,没有根据之前的ck恢复,然后跑一段时间就报这个错,它是自动重启的时候,就报这个错了,这个有遇到过吗?有没有什么解决办法?
强调:作业是新的,没有基于之前的作业的ck进行重启。


| |
Jason_H
|
|
hyb_he...@163.com
|



--
Best,
Hangxiang.


回复