技术文章 - CS342359

Active-Active HA ThingWorx 实例有时无法正常工作,并在应用程序日志中返回错误“ChangeWatcher 同步失败”。

已修改: 13-Feb-2026   


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

适用于

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

说明

  • 主动-主动高可用性 (HA) ThingWorx 实例偶尔会返回错误ChangeWatcher failed to syncThingworxStorage\logs\ApplicationLog.log 文件中,并且该实例无法正常工作。
      • 无法登录 ThingWorx
      • 集群中的 ThingWorx 平台节点意外关闭
      • LDAP用户无法登录ThingWorx
      • 节点上的模型更改不会反映到其他节点,例如权限更改。

    • Microsoft SQL Server配置为高可用性实例时,ThingWorx 平台是否会自动连接到数据库? 数据库?
    • ThingworxStorage\logs\ ApplicationLog.log 中存在错误:
    [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: oaisctTcpCommunicationSpi] [I: ] [U: XXX] [S: ] [P: XXX] [T: pool-12-thread-1] Failed to send message to remote node [node=TcpDiscoveryNode [id=XXX, consistentId=XXX, addrs=ArrayList [XXX], sockAddrs=null, discPort=47500, order=1, intOrder=1, lastExchangeTime=XXX, loc=false, ver=2.14.0#20220929-sha1:951e8deb, isClient=false], msg=GridIoMessage [plc=2, topic=TOPIC_CACHE, topicOrd=8, ordered=false, timeout=0, skipOnTimeout=false, msg=GridNearSingleGetRequest [futId=XXX, key=UserKeyCacheObjectImpl [part=22, val=com.thingworx.things.events.EntityEventProcessor_lastEntityEventChangeLogId, hasValBytes=true], flags=1, topVer=AffinityTopologyVersion [topVer=4, minorTopVer=0], taskNameHash=0, createTtl=-1, accessTtl=-1, txLbl=null, mvccSnapshot=null]]] [L: ERROR] [O: oaisdtTcpDiscoverySpi] [I: ] [U: ] [S: ] [P: XXX] [T: tcp-client-disco-sock-writer-#2%twx-core-server%-#40%twx-core-server%] Failed to send message: null [L: ERROR] [O: ctsswpWSExecutionInstance] [I: ] [U: XXX] [S: ] [P: XXX] [T: WSExecutionProcessor-86] error executing APIRequest Message: Unable to dispatch [ uri = /Things/XXX/Services/UpdateSubscribedPropertyValues/]: Unable to Invoke Service UpdateSubscribedPropertyValues on XXX : class org.apache.ignite.IgniteClientDisconnectedException: Operation has been cancelled (client node disconnected)., sending ERROR ResponseMessage to caller! [L: ERROR] [O: ctcseRoutingGroupServiceImpl] [I: ] [U: ] [S: ] [P: XXX] [T: pool-26-thread-1] Error executing syncRoutingGroups
    • ThingworxStorage\logs\ ErrorLog.log 中的错误:
    [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