-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seata报错: json decode exception #5631
Comments
把这个方法的完整入参帮copy下,需要断定下是db里面存储的值格式不对,还是处理过程中的问题 |
` Source Server Type : PostgreSQL Date: 06/06/2023 10:46:53 -- Table structure for undo_log DROP TABLE IF EXISTS "public"."undo_log"; -- Records of undo_log INSERT INTO "public"."undo_log" VALUES (586205, 820054611564157121, '172.30.0.91:8091:820054611564157120', 'serializer=jackson&compressorType=NONE', '\x7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e4272616e6368556e646f4c6f67222c22786964223a223137322e33302e302e39313a383039313a383230303534363131353634313537313230222c226272616e63684964223a3832303035343631313536343135373132312c2273716c556e646f4c6f6773223a5b226a6176612e7574696c2e41727261794c697374222c5b7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e53514c556e646f4c6f67222c2273716c54797065223a22494e53455254222c227461626c654e616d65223a2277755f6163636f756e745f7265636861726765222c226265666f7265496d616765223a7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e5461626c655265636f72647324456d7074795461626c655265636f726473222c227461626c654e616d65223a2277755f6163636f756e745f7265636861726765222c22726f7773223a5b226a6176612e7574696c2e41727261794c697374222c5b5d5d7d2c226166746572496d616765223a7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e5461626c655265636f726473222c227461626c654e616d65223a2277755f6163636f756e745f7265636861726765222c22726f7773223a5b226a6176612e7574696c2e41727261794c697374222c5b7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e526f77222c226669656c6473223a5b226a6176612e7574696c2e41727261794c697374222c5b7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a22617265615f6964222c226b657954797065223a224e554c4c222c2274797065223a2d352c2276616c7565223a5b226a6176612e6c616e672e4c6f6e67222c3130355d7d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a226372656174655f74696d65222c226b657954797065223a224e554c4c222c2274797065223a39332c2276616c7565223a5b226a6176612e73716c2e54696d657374616d70222c313638363031393132323939345d7d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a226372656174655f75736572222c226b657954797065223a224e554c4c222c2274797065223a2d352c2276616c7565223a5b226a6176612e6c616e672e4c6f6e67222c313636353931303134313735313733303137375d7d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a22646570745f6964222c226b657954797065223a224e554c4c222c2274797065223a2d352c2276616c7565223a5b226a6176612e6c616e672e4c6f6e67222c313132333539383831333733383637353230315d7d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a226964222c226b657954797065223a225052494d4152595f4b4559222c2274797065223a2d352c2276616c7565223a5b226a6176612e6c616e672e4c6f6e67222c313636353931313036323133313238363031385d7d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a2269735f64656c65746564222c226b657954797065223a224e554c4c222c2274797065223a342c2276616c7565223a307d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a226f7065726174655f75736572222c226b657954797065223a224e554c4c222c2274797065223a31322c2276616c7565223a223135353530353836343434227d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a227061795f6368616e6e656c222c226b657954797065223a224e554c4c222c2274797065223a31322c2276616c7565223a2257585f4c495445227d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a227061795f776179222c226b657954797065223a224e554c4c222c2274797065223a31322c2276616c7565223a225758227d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a227072696e745f6e756d222c226b657954797065223a224e554c4c222c2274797065223a342c2276616c7565223a307d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a2272656368617267655f616d6f756e74222c226b657954797065223a224e554c4c222c2274797065223a322c2276616c7565223a5b226a6176612e6d6174682e426967446563696d616c222c3230302e30305d7d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a2272656368617267655f646174655f74696d65222c226b657954797065223a224e554c4c222c2274797065223a39332c2276616c7565223a5b226a6176612e73716c2e54696d657374616d70222c313638363031393132313336305d7d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a22737461747573222c226b657954797065223a224e554c4c222c2274797065223a31322c2276616c7565223a2250524f434553534544227d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a2274726164655f6e6f222c226b657954797065223a224e554c4c222c2274797065223a31322c2276616c7565223a22435a323032333036303630323338303334333037227d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a22757365725f6964222c226b657954797065223a224e554c4c222c2274797065223a2d352c2276616c7565223a5b226a6176612e6c616e672e4c6f6e67222c313636353931303134313735313733303137375d7d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a2277617465725f6d657465725f6964222c226b657954797065223a224e554c4c222c2274797065223a2d352c2276616c7565223a5b226a6176612e6c616e672e4c6f6e67222c313537393530343334313730343930303631305d7d2c7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e73716c2e7374727563742e4669656c64222c226e616d65223a2277617465725f757365725f6964222c226b657954797065223a224e554c4c222c2274797065223a2d352c2276616c7565223a5b226a6176612e6c616e672e4c6f6e67222c313633353136333032303935363730343737305d7d5d5d7d5d5d7d7d5d5d7d', 0, '2023-06-06 10:38:21.564195', '2023-06-06 10:38:21.564195', NULL); -- Indexes structure for table undo_log CREATE UNIQUE INDEX "ux_undo_log" ON "public"."undo_log" USING btree ( -- Primary Key structure for table undo_log ALTER TABLE "public"."undo_log" ADD CONSTRAINT "undo_log_pkey" PRIMARY KEY ("id"); ` 这是包含数据库脚本的所有数据,这部分数据应该和上面的报错异常信息不匹配的,但是报错异常都是一样的 |
这个你得从转换一下,存进去应该是个byte[] |
还有,需要提供你这个块涉及的表结构是什么样,这样可以推测出来这个json可能会长什么样,或者你如果有可复现的demo也可以提供一下 |
本地 存储是 TEXT 的,不是 byte[] |
不清楚你说的是什么表结构?难道不是 undo_log表? |
undolog表都是公开的,怎么可能需要你再提供呢,是你业务涉及到这个异常时回滚的表结构,还有存储到rollback_info是一个byte[]需要你转换一下 |
涉及到这块的业务交互比较多,有业务,也有交易,目前只是在生产环境下出现的异常,具体是哪个业务表 目前还真没有搞清楚,也不知道该给您提供哪些表 |
因为失败所以会一直异常,你可以尝试用arthas watch看入参内容来判断 |
decode rollback_info and get table structure as follows: |
使用 seata-spring-boot-starter 版本号:1.6.1
具体报错日志如下:
2023-06-06 08:38:04.194 [rpcDispatch_RMROLE_1_13_16] [] [i.s.rm.datasource.undo.parser.JacksonUndoLogParser]
ERROR: json decode exception, Unexpected character ('' (code 92)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: (byte[])"\x7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e4272616e6368556e646f4c6f67222c22786964223a223137322e33302e302e39313a383039313a383230303534363131353634313331333538222c226272616e63684964223a3832303035343631313536343133313430312c2273716c556e646f4c6f6773223a5b226a6176612e7574696c2e41727261794c697374222c5b7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e53514c556e646f4c6f67222c2273716c54797065223a22555044415445222c227461626c654e616d65223a22"[truncated 1976 bytes]; line: 1, column: 2]
com.fasterxml.jackson.core.JsonParseException: Unexpected character ('' (code 92)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: (byte[])"\x7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e4272616e6368556e646f4c6f67222c22786964223a223137322e33302e302e39313a383039313a383230303534363131353634313331333538222c226272616e63684964223a3832303035343631313536343133313430312c2273716c556e646f4c6f6773223a5b226a6176612e7574696c2e41727261794c697374222c5b7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e53514c556e646f4c6f67222c2273716c54797065223a22555044415445222c227461626c654e616d65223a22"[truncated 1976 bytes]; line: 1, column: 2]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:693)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:591)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2630)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:832)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:729)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4142)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4001)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3092)
at io.seata.rm.datasource.undo.parser.JacksonUndoLogParser.decode(JacksonUndoLogParser.java:188)
at io.seata.rm.datasource.undo.AbstractUndoLogManager.undo(AbstractUndoLogManager.java:300)
at io.seata.rm.datasource.DataSourceManager.branchRollback(DataSourceManager.java:122)
at io.seata.rm.AbstractRMHandler.doBranchRollback(AbstractRMHandler.java:125)
at io.seata.rm.AbstractRMHandler$2.execute(AbstractRMHandler.java:67)
at io.seata.rm.AbstractRMHandler$2.execute(AbstractRMHandler.java:63)
at io.seata.core.exception.AbstractExceptionHandler.exceptionHandleTemplate(AbstractExceptionHandler.java:131)
at io.seata.rm.AbstractRMHandler.handle(AbstractRMHandler.java:63)
at io.seata.rm.DefaultRMHandler.handle(DefaultRMHandler.java:68)
at io.seata.core.protocol.transaction.BranchRollbackRequest.handle(BranchRollbackRequest.java:35)
at io.seata.rm.AbstractRMHandler.onRequest(AbstractRMHandler.java:150)
at io.seata.core.rpc.processor.client.RmBranchRollbackProcessor.handleBranchRollback(RmBranchRollbackProcessor.java:63)
at io.seata.core.rpc.processor.client.RmBranchRollbackProcessor.process(RmBranchRollbackProcessor.java:58)
at io.seata.core.rpc.netty.AbstractNettyRemoting.lambda$processMessage$2(AbstractNettyRemoting.java:281)
at .run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
The text was updated successfully, but these errors were encountered: