seata1.2使用postgresql做数据库时,回滚时报错json decode exception

巧克力奶油味 发布于 07/10 14:53
阅读 147
收藏 0

MySQL连接为什么挂死了?别踩坑!>>>

本来用MySQL测试没问题的,但是公司用的是pg,所以换了数据库,结果就来了这个。

---控制台日志信息

2020-07-10 14:35:58.413 DEBUG [account-service,1b5d76310772898d,f692068321bfa90b,false] 6044 --- [nio-8083-exec-1] io.seata.core.context.RootContext : unbind 192.168.101.117:8091:2016554624 2020-07-10 14:35:58.413 DEBUG [account-service,1b5d76310772898d,f692068321bfa90b,false] 6044 --- [nio-8083-exec-1] io.seata.integration.http.XidResource : unbind[192.168.101.117:8091:2016554624] from RootContext 2020-07-10 14:35:58.413 DEBUG [account-service,1b5d76310772898d,f692068321bfa90b,false] 6044 --- [nio-8083-exec-1] io.seata.core.context.RootContext : unbind null 2020-07-10 14:35:58.413 WARN [account-service,1b5d76310772898d,f692068321bfa90b,false] 6044 --- [nio-8083-exec-1] c.a.c.seata.web.SeataHandlerInterceptor : xid in change during RPC from 192.168.101.117:8091:2016554624 to null 2020-07-10 14:35:58.945 DEBUG [account-service,,,] 6044 --- [lector_RMROLE_1] i.s.core.rpc.netty.AbstractRpcRemoting : io.seata.core.rpc.netty.AbstractRpcRemotingClient$ClientHandler@14602ee0 msgId:3, body:xid=192.168.101.117:8091:2016554624,branchId=2016554627,branchType=AT,resourceId=jdbc:postgresql://192.168.100.202:5432/seat-account,applicationData=null 2020-07-10 14:35:58.945 INFO [account-service,,,] 6044 --- [tch_RMROLE_1_16] i.s.core.rpc.netty.RmMessageListener : onMessage:xid=192.168.101.117:8091:2016554624,branchId=2016554627,branchType=AT,resourceId=jdbc:postgresql://192.168.100.202:5432/seat-account,applicationData=null 2020-07-10 14:35:58.948 INFO [account-service,,,] 6044 --- [tch_RMROLE_1_16] io.seata.rm.AbstractRMHandler : Branch Rollbacking: 192.168.101.117:8091:2016554624 2016554627 jdbc:postgresql://192.168.100.202:5432/seat-account 2020-07-10 14:35:58.957 ERROR [account-service,,,] 6044 --- [tch_RMROLE_1_16] i.s.r.d.u.parser.JacksonUndoLogParser : json decode exception, Unexpected character ('\' (code 92)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: (byte[])"\x7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e4272616e6368556e646f4c6f67222c22786964223a223139322e3136382e3130312e3131373a383039313a32303136353534363234222c226272616e63684964223a323031363535343632372c2273716c556e646f4c6f6773223a5b226a6176612e7574696c2e41727261794c697374222c5b7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e53514c556e646f4c6f67222c2273716c54797065223a22555044415445222c227461626c654e616d65223a226163636f756e74222c226265"[truncated 1890 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[])"\x7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e4272616e6368556e646f4c6f67222c22786964223a223139322e3136382e3130312e3131373a383039313a32303136353534363234222c226272616e63684964223a323031363535343632372c2273716c556e646f4c6f6773223a5b226a6176612e7574696c2e41727261794c697374222c5b7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e53514c556e646f4c6f67222c2273716c54797065223a22555044415445222c227461626c654e616d65223a226163636f756e74222c226265"[truncated 1890 bytes]; line: 1, column: 2] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804) ~[jackson-core-2.9.7.jar:2.9.7] at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:669) ~[jackson-core-2.9.7.jar:2.9.7] at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:567) ~[jackson-core-2.9.7.jar:2.9.7] at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2622) ~[jackson-core-2.9.7.jar:2.9.7] at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:824) ~[jackson-core-2.9.7.jar:2.9.7] at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:721) ~[jackson-core-2.9.7.jar:2.9.7] at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4141) ~[jackson-databind-2.9.7.jar:2.9.7] at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4000) ~[jackson-databind-2.9.7.jar:2.9.7] at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3091) ~[jackson-databind-2.9.7.jar:2.9.7] at io.seata.rm.datasource.undo.parser.JacksonUndoLogParser.decode(JacksonUndoLogParser.java:139) ~[seata-all-1.2.0.jar:1.2.0] at io.seata.rm.datasource.undo.AbstractUndoLogManager.undo(AbstractUndoLogManager.java:276) [seata-all-1.2.0.jar:1.2.0] at io.seata.rm.datasource.DataSourceManager.branchRollback(DataSourceManager.java:181) [seata-all-1.2.0.jar:1.2.0] at io.seata.rm.AbstractRMHandler.doBranchRollback(AbstractRMHandler.java:126) [seata-all-1.2.0.jar:1.2.0] at io.seata.rm.AbstractRMHandler$2.execute(AbstractRMHandler.java:68) [seata-all-1.2.0.jar:1.2.0] at io.seata.rm.AbstractRMHandler$2.execute(AbstractRMHandler.java:64) [seata-all-1.2.0.jar:1.2.0] at io.seata.core.exception.AbstractExceptionHandler.exceptionHandleTemplate(AbstractExceptionHandler.java:116) [seata-all-1.2.0.jar:1.2.0] at io.seata.rm.AbstractRMHandler.handle(AbstractRMHandler.java:64) [seata-all-1.2.0.jar:1.2.0] at io.seata.rm.DefaultRMHandler.handle(DefaultRMHandler.java:63) [seata-all-1.2.0.jar:1.2.0] at io.seata.core.protocol.transaction.BranchRollbackRequest.handle(BranchRollbackRequest.java:35) [seata-all-1.2.0.jar:1.2.0] at io.seata.rm.AbstractRMHandler.onRequest(AbstractRMHandler.java:151) [seata-all-1.2.0.jar:1.2.0] at io.seata.core.rpc.netty.RmMessageListener.handleBranchRollback(RmMessageListener.java:93) [seata-all-1.2.0.jar:1.2.0] at io.seata.core.rpc.netty.RmMessageListener.onMessage(RmMessageListener.java:84) [seata-all-1.2.0.jar:1.2.0] at io.seata.core.rpc.netty.AbstractRpcRemotingClient$ClientHandler.dispatch(AbstractRpcRemotingClient.java:284) [seata-all-1.2.0.jar:1.2.0] at io.seata.core.rpc.netty.AbstractRpcRemoting$AbstractHandler$1.run(AbstractRpcRemoting.java:452) [seata-all-1.2.0.jar:1.2.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_251] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_251] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.29.Final.jar:4.1.29.Final] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_251] 2020-07-10 14:35:58.960 INFO [account-service,,,] 6044 --- [tch_RMROLE_1_16] i.seata.rm.datasource.DataSourceManager : branchRollback failed. branchType:[AT], xid:[192.168.101.117:8091:2016554624], branchId:[2016554627], resourceId:[jdbc:postgresql://192.168.100.202:5432/seat-account], applicationData:[null]. reason:[Branch session rollback failed and try again later xid = 192.168.101.117:8091:2016554624 branchId = 2016554627 com.fasterxml.jackson.core.JsonParseException: Unexpected character ('\' (code 92)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: (byte[])"\x7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e4272616e6368556e646f4c6f67222c22786964223a223139322e3136382e3130312e3131373a383039313a32303136353534363234222c226272616e63684964223a323031363535343632372c2273716c556e646f4c6f6773223a5b226a6176612e7574696c2e41727261794c697374222c5b7b2240636c617373223a22696f2e73656174612e726d2e64617461736f757263652e756e646f2e53514c556e646f4c6f67222c2273716c54797065223a22555044415445222c227461626c654e616d65223a226163636f756e74222c226265"[truncated 1890 bytes]; line: 1, column: 2]] 2020-07-10 14:35:58.961 INFO [account-service,,,] 6044 --- [tch_RMROLE_1_16] io.seata.rm.AbstractRMHandler : Branch Rollbacked result: PhaseTwo_RollbackFailed_Retryable 2020-07-10 14:35:58.961 DEBUG [account-service,,,] 6044 --- [tch_RMROLE_1_16] i.s.core.rpc.netty.RmMessageListener : branch rollback result:xid=192.168.101.117:8091:2016554624,branchId=2016554627,branchStatus=PhaseTwo_RollbackFailed_Retryable,result code =Success,getMsg =null 2020-07-10 14:35:58.961 DEBUG [account-service,,,] 6044 --- [tch_RMROLE_1_16] i.s.core.rpc.netty.AbstractRpcRemoting : send response:xid=192.168.101.117:8091:2016554624,branchId=2016554627,branchStatus=PhaseTwo_RollbackFailed_Retryable,result code =Success,getMsg =null,channel:[id: 0x21e65885, L:/192.168.101.117:58843 - R:/192.168.101.117:8091] 2020-07-10 14:35:59.706 DEBUG [account-service,,,] 6044 --- [lector_RMROLE_1] i.s.core.rpc.netty.AbstractRpcRemoting : io.seata.core.rpc.netty.AbstractRpcRemotingClient$ClientHandler@14602ee0 msgId:4, body:xid=192.168.101.117:8091:2016554624,branchId=2016554627,branchType=AT,resourceId=jdbc:postgresql://192.168.100.202:5432/seat-account,applicationData=null 2020-07-10 14:35:59.706 INFO [account-service,,,] 6044 --- [tch_RMROLE_1_16] i.s.core.rpc.netty.RmMessageListener : onMessage:xid=192.168.101.117:8091:2016554624,branchId=2016554627,branchType=AT,resourceId=jdbc:postgresql://192.168.100.202:5432/seat-account,applicationData=null 2020-07-10 14:35:59.706 INFO [account-service,,,] 6044 --- [tch_RMROLE_1_16] io.seata.rm.AbstractRMHandler : Branch Rollbacking: 192.168.101.117:8091:2016554624 2016554627 jdbc:postgresql://192.168.100.202:5432/seat-account

-------seata日志信息

2020-07-10 14:35:57,340 INFO Begin new global transaction applicationId: business-service,transactionServiceGroup: my_tx_group, transactionName: test,timeout:1000000,xid:192.168.101.117:8091:2016554624 2020-07-10 14:35:58,239 INFO SeataMergeMessage xid=192.168.101.117:8091:2016554624,branchType=AT,resourceId=jdbc:postgresql://192.168.100.202:5432/seat-account,lockKey=account:1 ,clientIp:192.168.101.117,vgroup:my_tx_group 2020-07-10 14:35:58,328 INFO {dataSource-2} inited 2020-07-10 14:35:58,350 INFO Register branch successfully, xid = 192.168.101.117:8091:2016554624, branchId = 2016554627, resourceId = jdbc:postgresql://192.168.100.202:5432/seat-account ,lockKeys = account:1 2020-07-10 14:35:58,930 INFO SeataMergeMessage xid=192.168.101.117:8091:2016554624,extraData=null ,clientIp:192.168.101.117,vgroup:my_tx_group 2020-07-10 14:35:58,967 INFO Rollback branch transaction fail and will retry, xid = 192.168.101.117:8091:2016554624 branchId = 2016554627 2020-07-10 14:35:59,713 INFO Rollback branch transaction fail and will retry, xid = 192.168.101.117:8091:2016554624 branchId = 2016554627 2020-07-10 14:36:00,710 INFO Rollback branch transaction fail and will retry, xid = 192.168.101.117:8091:2016554624 branchId = 2016554627 2020-07-10 14:36:01,713 INFO Rollback branch transaction fail and will retry, xid = 192.168.101.117:8091:2016554624 branchId = 2016554627 2020-07-10 14:36:02,710 INFO Rollback branch transaction fail and will retry, xid = 192.168.101.117:8091:2016554624 branchId = 2016554627 2020-07-10 14:36:03,820 INFO Rollback branch transaction fail and will retry, xid = 192.168.101.117:8091:2016554624 branchId = 2016554627 2020-07-10 14:36:03,821 WARN Saw local status change event StatusChangeEvent [timestamp=1594362963821, current=DOWN, previous=UP]

 

 

加载中
返回顶部
顶部