技术文章 - CS338794
ThingWorx Platform 的数据库日志或应用程序日志文件中显示“错误:无法在只读事务中执行更新”
已修改: 21-Jul-2025
适用于
- ThingWorx Platform 8.5 to 9.7
- PostgreSQL
- Azure PostgreSQL
说明
- ThingWorx Platform 实例已崩溃且无法重新启动
- 无法启动 ThingWorx 平台,因为 PostgreSQL 数据库已切换为只读模式
- Azure PostgreSQL 日志显示所有 ThingWorx 事务均以只读模式进行
- PostgreSQL 数据库日志中出现的错误
ERROR: cannot execute UPDATE in a read-only transaction ERROR: cannot execute INSERT in a read-only transaction - 无法启动 ThingWorx 平台,并在<ThingworxStorage>\logs\ApplicationLog.log中记录以下消息
[L: ERROR] [O: ctppPostgresModelExceptionTranslator] [I: ] [U: SuperUser] [S: ] [P: ] [T: ForkJoinPool-1-worker-3] ERROR: cannot execute UPDATE in a read-only transaction [L: ERROR] [O: ctsmBaseManager] [I: ] [U: SuperUser] [S: ] [P: ] [T: ForkJoinPool-1-worker-3] Unable To Initialize Entity ThingworxPersistenceProvider in PersistenceProviders: ERROR: cannot execute UPDATE in a read-only transaction [L: ERROR] [O: ctppPostgresModelExceptionTranslator] [I: ] [U: SuperUser] [S: ] [P: ] [T: ForkJoinPool-1-worker-15] ERROR: current transaction is aborted, commands ignored until end of transaction block ... [L: ERROR] [O: ctsThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] *** CRITICAL ERROR ON STARTUP: Unable to initialize and start system: ERROR: current transaction is aborted, commands ignored until end of transaction block [L: ERROR] [O: ctsThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] *** Web Application STATE is being set to ERROR! *** [L: INFO] [O: ctsThingWorxServer] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] >>>>>>> PLATFORM SHUTDOWN START <<<<<<<<< - ThingWorx 运行时,由于数据库空间限制,包括文件传输在内的事务无法完成
- 由于数据库设置为只读状态,因此无法提交数据库事务
这是文章 338794 的 PDF 版本,可能已过期。最新版本 CS338794