技术文章 - CS321777

将 ThingworxStorage 目录设置为位于 ThingWorx Platform 的网络共享上后,出现“java.io.IOException:尝试初始化 Platform 存储时出错”

已修改: 01-Jul-2025   


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

适用于

  • ThingWorx Platform 8.1 to 9.6

说明

  • 无法访问 ThingWorx Composer
  • 作曲家表演:
    • HTTP Status 404 – Not Found
      Type Status Report
      Message /Thingworx/####
      Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
  • Apache Tomcat服务已启动但 ThingWorx 无法访问
  • 最近在<Apache Tomcat>\bin中修改了setenv.sh (Linux)setenv.bat (Windows) ,现在 ThingWorx 无法启动
  • 启动 Apache Tomcat 时无法使用自定义 ThingworxPlatform 位置
  • Apache Tomcat 找不到正确的 THINGWORX_PLATFORM_SETTINGS 目录,因此尝试从默认位置启动(C:\ThingworxPlatform、/ThingworxPlatform)
  • 配置 ThingWorx 高可用性需要将 ThingworxStorage 位于网络共享上,但 Apache 未启动
  • 尝试将ThingworxStorage设置为网络位置,由于此更改,Apache Tomcat 无法启动
  • 更新了platform-settings.json中的BasicSettings > Storage键值,使 ThingworxStorage 位于网络驱动器上,并且 Tomcat 无法继续运行
  • 配置了必要的权限并将网络驱动器映射到基于 Windows 的 ThingWorx Platform 主机上的驱动器号,但在更新platform-settings.json中的ThingworxStorage位置后,Apache Tomcat 将无法运行
  • ThingWorx 无法在操作系统升级后启动并显示错误代码 4
  • 在 Linux 上执行服务 <Tomcat 服务名称> 状态显示如下:
    • <Date Time> <Hostname> startup.sh[]: <Apache Tomcat>/bin/setenv.sh: line 3: $'\r': command not found
      <Date Time> <Hostname> startup.sh[]: <Apache Tomcat>/bin/setenv.sh: line 8: syntax error: unexpected end of file
  • <Apache Tomcat>\logs中的thingworx-foundation-stdout.logtomcat9-stdout.log文件中看到以下错误:
    • -ERROR in ch.qos.logback.core.joran.spi.Interpreter@3:88 - RuntimeException in Action for tag [contextListener] com.thingworx.exceptions.ConfigurationException: java.io.IOException: error trying to initialize Platform storage [setting: <ThingworxStorage location>\####]
          at com.thingworx.exceptions.ConfigurationException: java.io.IOException: error trying to initialize Platform storage [setting: <ThingworxStorage location>\####]
          at     at com.thingworx.system.configuration.PlatformSettings.getInstance(PlatformSettings.java:3390)
          at     at com.thingworx.logging.LogbackUtilities.loadLogbackConfiguration(LogbackUtilities.java:54)
          ...
      Caused by: java.io.IOException: error trying to initialize Platform storage [setting: <ThingworxStorage location>\####]
          at     at com.thingworx.system.configuration.PlatformSettings.prepareLocation(PlatformSettings.java:3299)
          at     at com.thingworx.system.configuration.PlatformSettings.setStorageRoot(PlatformSettings.java:3075)
          at     at com.thingworx.system.configuration.PlatformSettings.<init>(PlatformSettings.java:2235)
          ...
      Caused by: java.io.IOException: THINGWORX WARNING: could not create directory: <ThingworxStorage location>\####
          at     at com.thingworx.common.utils.DefaultPathUtility.createPath(DefaultPathUtility.java:39)
          at     at com.thingworx.system.configuration.PlatformSettings.prepareLocation(PlatformSettings.java:3296)
          at     ... 65 common frames omitted
      16:59:03,496 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
      16:59:03,497 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@67502e7f - Registering current configuration as safe fallback point
      
      >>>>>>>> TERMINATING JVM <<<<<<<<<<
      >>>>>>>> CALLING SYSTEM EXIT <<<<<<<<<<

这是文章 321777 的 PDF 版本,可能已过期。最新版本 CS321777