现象
数据库执行相关命令,只要跟事务相关的均报错ERROR [8604],
如执行BEGIN WORK报错信息为:
ERROR [8604] Transaction subsystem TMF returned error 82 while starting a transaction
分析
错误信息判断与TM进程有关。ERROR 82表示数据库TM服务未正常启动,
FETMFNOTRUNNING = fe_base + 82, // All or part of the NonStop Services Transaction Manager is not running
查看相关TM日志有如下日志,
2020-01-03 10:24:36.388 ,INFO ,org.trafodion.dtm.HBaseTmZK ,LDTM is not ready
2020-01-03 10:24:38.388 ,INFO ,org.trafodion.dtm.HBaseTmZK ,LDTM is not ready
这说明TM服务未正常启动。
解决
TM服务若正常启动,会在Zookeeper中注册节点/trafodion/recovery/TM/LDTM,通过zookeeper-client发现找不到此节点。重启数据库发现节点创建成功。