技术文章 - CS334229

尝试在 ThingWorx Platform 中创建、更新或使用 InfluxDB 持久性提供程序时,会看到“Wrapped by: java.net.SocketTimeoutException: timeout”

已修改: 29-Feb-2024   


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

适用于

  • ThingWorx Platform 8.5 to 9.5
  • InfluxDB

说明

  • InfluxDB导出Value Stream数据不起作用
  • 具有数百万行的Value Stream无法从InfluxDB导出
  • 对远程Influx 持久性提供程序执行的部分或全部操作超时
  • 如何调整Influx 持久性提供程序InfluxDB 超时
  • Influx Persistence Provider可以设置超时吗?
  • 尝试对InfluxDB执行操作但不断出现超时错误
  • InfluxDB 中的超时错误导致 ThingWorx Platform 无法使用
  • 对于某些持久性提供程序,属性更新未成功写入 Influx
  • 价值流上设置时,基于Influx2PersistenceProviderPackage 的持久性提供程序无法按预期工作
  • InfluxPersistenceProviderPackage不提供任何配置读取或写入超时的功能
  • 将持久性提供程序从 ThingworxPersistenceProvider 更改为 InfluxPersistenceProvider 时出现问题
  • 无法从InfluxDB导出大型价值流,并出现错误:
com.thingworx.common.exceptions.DataAccessException in ThingWorx
  • 尝试在 ThingWorx Platform 中保存Influx2PersistenceProviderPackage时看到以下内容:
Unable to update PersistenceProvider: Unable to connect to the PersistenceProvider: <Influxv2 Persistence Provider Name>
图片.png
  • <ThingworxStorage>\logs\ApplicationLog.log在更新由Influx Persistence Provider支持的价值流时显示以下内容之一:
Error exporting entries in: ValueStream <Value Stream>: com.thingworx.common.exceptions.DataAccessException: [2,000] Error occurred while accessing the data provider.
Unable to delete entry for id:<ID> update due to [2,000] Error occurred while accessing the data provider.
  • <ThingworxStorage>\logs\ErrorLog.log在启用错误堆栈跟踪的情况下显示以下内容
    • InfluxPersistenceProviderPackage
...
Wrapped by: org.influxdb.InfluxDBIOException: java.net.SocketTimeoutException: Read timed out
...
[message: [2,000] Error occurred while accessing the data provider.] java.net.SocketException: Socket closed
    at java.net.SocketInputStream.read(SocketInputStream.java:204)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at okio.Okio$2.read(Okio.java:140)
    ...
Wrapped by: java.net.SocketTimeoutException: timeout
    at okio.Okio$4.newTimeoutException(Okio.java:232)
    at okio.AsyncTimeout.exit(AsyncTimeout.java:286)
    at okio.AsyncTimeout$2.read(AsyncTimeout.java:241)
    ...
Wrapped by: org.influxdb.InfluxDBIOException: java.net.SocketTimeoutException: timeout
    at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:812)
    at org.influxdb.impl.InfluxDBImpl.executeQuery(InfluxDBImpl.java:795)
    at org.influxdb.impl.InfluxDBImpl.query(InfluxDBImpl.java:552)
    ...
Wrapped by: com.thingworx.common.exceptions.DataAccessException: [2,000] Error occurred while accessing the data provider.
    at com.thingworx.persistence.influxdb.InfluxdbDataExceptionTranslator.rethrowTranslated(InfluxdbDataExceptionTranslator.java:30)
    at com.thingworx.persistence.influx.dao.InfluxStreamDao.delete(InfluxStreamDao.java:389)
    at com.thingworx.persistence.influx.dao.InfluxStreamDao.deleteEntryIfUpdateRequired(InfluxStreamDao.java:465)
    ...
  • Influx2PersistenceProvider包
[L: ERROR] [O: E.c.t.p.i.Influxdb2DataExceptionTranslator] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-5] Read timed out 
[L: ERROR] [O: E.c.q.l.c.Logger] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-5] [2,006] Unknown error occurred. Contact the administrator if this re-occurs. java.net.SocketTimeoutException: Read timed out
	at java.base/java.net.SocketInputStream.socketRead0(Native Method)
	at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
	at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
	...
Wrapped by: com.influxdb.exceptions.InfluxException: Read timed out
	at com.influxdb.internal.AbstractQueryApi.lambda$static$1(AbstractQueryApi.java:88)
	at com.influxdb.internal.AbstractRestClient.catchOrPropagateException(AbstractRestClient.java:142)
	at com.influxdb.internal.AbstractQueryApi.query(AbstractQueryApi.java:240)
	...
Wrapped by: com.thingworx.common.exceptions.DataAccessException: [2,006] Unknown error occurred. Contact the administrator if this re-occurs.
	at com.thingworx.persistence.influxdb2.Influxdb2DataExceptionTranslator.rethrowTranslated(Influxdb2DataExceptionTranslator.java:34)
	at com.thingworx.persistence.influxdb2.Influxdb2Datasource.checkInfluxdbConnection(Influxdb2Datasource.java:375)
	at com.thingworx.persistence.influxdb2.Influxdb2Datasource.testConnectivity(Influxdb2Datasource.java:177)
	...

[L: ERROR] [O: E.c.q.l.c.Logger] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-5] *** Unable to connect to the PersistenceProvider: <Influx2 Persistence Provider Name> ***. 
[L: ERROR] [O: E.c.q.l.c.Logger] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-5] Unable to process import: Unable to update PersistenceProvider: Unable to connect to the PersistenceProvider: <Influx2 Persistence Provider Name> 
[L: ERROR] [O: E.c.q.l.c.Logger] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-5] Import Failed: Unable to update PersistenceProvider: Unable to connect to the PersistenceProvider: <Influx2 Persistence Provider Name> java.lang.Exception: Unable to connect to the PersistenceProvider: <Influx2 Persistence Provider Name>
	at com.thingworx.persistence.provider.PersistenceProviderManager.handleUpdateEntity(PersistenceProviderManager.java:297)
	... 55 common frames omitted
Wrapped by: java.lang.Exception: Unable to update PersistenceProvider: Unable to connect to the PersistenceProvider: <Influx2 Persistence Provider Name>
	at com.thingworx.persistence.provider.PersistenceProviderManager.handleUpdateEntity(PersistenceProviderManager.java:300)
	at com.thingworx.system.managers.BaseManager.updateEntity(BaseManager.java:772)
	at com.thingworx.system.managers.BaseManager.updateEntity(BaseManager.java:666)
	...
Wrapped by: java.lang.Exception: Import Failed: Unable to update PersistenceProvider: Unable to connect to the PersistenceProvider: <Influx2 Persistence Provider Name>
	at com.thingworx.contentmanagement.ImportProcessorWorker.run(ImportProcessorWorker.java:373)
	at com.thingworx.contentmanagement.ImportProcessor.processImport(ImportProcessor.java:80)
	at com.thingworx.webservices.BaseService.handleUpdate(BaseService.java:1053)
	...
这是文章 334229 的 PDF 版本,可能已过期。最新版本 CS334229