技术文章 - CS342359

Active-Active HA ThingWorx 实例偶尔无法正常工作,并出现应用程序日志错误“ChangeWatcher 同步失败”

已修改: 07-Oct-2025   


注意:本文已使用机器翻译软件翻译,以方便非英语客户阅读。但翻译内容可能包含语法错误或不准确之处。请注意, PTC对本文所含信息的翻译准确性及使用后果不承担任何责任。请在 此处 查看本文的英文原始版本以便参考。有关机器翻译的更多详情,请单击 此处
感谢您告诉我们。我们将尽快审阅此译文。

适用于

  • ThingWorx Platform 9.0 to 10.0
  • Microsoft SQL Server
  • Azure SQL Server

说明

  • Active-Active HA(高可用性) ThingWorx 实例偶尔无法正常工作,并出现以下应用程序日志 错误
    • ChangeWatcher failed to sync
    • 无法登录 ThingWorx
    • 集群中的 ThingWorx Platform 节点意外关闭
    • LDAP用户无法登录ThingWorx
    • 节点 A 上的模型更改不会反映到其他节点,例如权限更改
  • Microsoft SQL Server配置为HA实例时,ThingWorx Platform 是否自动连接到数据库 数据库?
  • 应用程序日志中的错误
[L: ERROR] [O: c.t.s.ChangeWatcher] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] ChangeWatcher failed to sync
[L: ERROR] [O: c.t.s.ChangeWatcher] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] Model sync unable to update database with model changes after 1 attempts due to exception Connection reset by peer: socket write error 
[L: ERROR] [O: c.t.s.ChangeWatcher] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] Unable to update cache with model changes after 1 attempts: encountered exception Connection reset by peer: socket write error
[L: WARN] [O: c.m.v.c.i.NewPooledConnection] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] [ c3p0 ] A PooledConnection that has already signalled a Connection error is still in use!
[L: WARN] [O: c.m.v.c.i.NewPooledConnection] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] [ c3p0 ] Another error has occurred [ com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. ] which will not be reported to listeners!
[L: ERROR] [O: c.t.p.ThingworxDefaultTransaction] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] Could not commit the transaction. Rolling back...
[L: WARN] [O: c.m.v.c.i.NewPooledConnection] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] [ c3p0 ] A PooledConnection that has already signalled a Connection error is still in use!
[L: WARN] [O: c.m.v.c.i.NewPooledConnection] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] [ c3p0 ] Another error has occurred [ com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. ] which will not be reported to listeners!
[L: ERROR] [O: c.t.p.PersistenceProviderTransactionManager] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] Error occurred during commit for the ThingworxPersistenceProvider persistence provider.
[L: ERROR] [O: c.t.s.ChangeWatcher] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] ChangeWatcher failed to syn 
 [L: ERROR] [O: ctsChangeWatcher] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-9-thread-1] ChangeWatcher failed to sync [L: ERROR] [O: ctsChangeWatcher] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-9-thread-1] Timeout. Cannot synchronize model during xxx ms [L: ERROR] [O: ctsThingWorxServer] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-9-thread-1] Shutting down server.. [L: ERROR] [O: ctsChangeWatcher] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-9-thread-1] Model sync unable to update database with model changes after xx attempts due to exception An SQLException was provoked by the following failure: java.lang.InterruptedException [L: ERROR] [O: ctsChangeWatcher] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-9-thread-1] Unable to update cache with model changes after xx attempts: encountered exception An SQLException was provoked by the following failure: java.lang.InterruptedException 
 [L: ERROR] [O: ctsChangeWatcher] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-9-thread-1] Unable to update cache with model changes after xx attempts: encountered exception class org.apache.ignite.internal.processors.cache.CacheStoppedException: Failed to perform cache operation (cache is stopped): default
  • 错误日志中的错误
[L: ERROR] [O: E.c.q.l.c.Logger] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] ChangeWatcher failed to sync java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:210)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:2023)
    ... 19 common frames omitted
Wrapped by: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2924)
    at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:2031)
    at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:6418)
    at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:7581)
    at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:7544)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection$1ConnectionCommand.doExecute(SQLServerConnection.java:3019)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7194)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2979)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectionCommand(SQLServerConnection.java:3024)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.setAutoCommit(SQLServerConnection.java:3157)
    at com.mchange.v2.c3p0.impl.NewProxyConnection.setAutoCommit(NewProxyConnection.java:1059)
    at com.thingworx.persistence.ThingworxDefaultTransaction.getTransactionObject(ThingworxDefaultTransaction.java:193)
    at com.thingworx.system.ChangeWatcher$Watcher.changeProcessing(ChangeWatcher.java:349)
    at com.thingworx.system.ChangeWatcher$Watcher.run(ChangeWatcher.java:271)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
[L: ERROR] [O: E.c.q.l.c.Logger] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] Model sync unable to update database with model changes after 1 attempts due to exception Connection reset 
[L: ERROR] [O: E.c.q.l.c.Logger] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] Unable to update cache with model changes after 1 attempts: encountered exception Connection reset 
[L: ERROR] [O: E.c.q.l.c.Logger] [I: ] [U: SuperUser] [S: ] [P: xxx] [T: pool-10-thread-1] Could not commit the transaction. Rolling back... com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:1090)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.rollback(SQLServerConnection.java:3195)
    at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:1033)
    at com.thingworx.persistence.ThingworxDefaultTransaction.commit(ThingworxDefaultTransaction.java:106)
    at com.thingworx.persistence.PersistenceProviderTransactionManager.handleCommitTransaction(PersistenceProviderTransactionManager.java:172)
    at com.thingworx.persistence.PersistenceProviderTransactionManager.lambda$endTransactionRequired$1(PersistenceProviderTransactionManager.java:123)
    at java.util.HashMap.forEach(HashMap.java:1289)
    at com.thingworx.persistence.PersistenceProviderTransactionManager.endTransactionRequired(PersistenceProviderTransactionManager.java:123)
    at com.thingworx.persistence.TransactionFactory.endTransactionRequired(TransactionFactory.java:120)
    at com.thingworx.system.ChangeWatcher$Watcher.finallyProcessing(ChangeWatcher.java:396)
    at com.thingworx.system.ChangeWatcher$Watcher.run(ChangeWatcher.java:279)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
这是文章 342359 的 PDF 版本,可能已过期。最新版本 CS342359