安装和配置 > 使用 ThingWorx Docker > 许可 ThingWorx Docker
许可 ThingWorx Docker
用户必须拥有 ThingWorx 8.0 及更高版本的许可证文件。获得 ThingWorx Docker 许可的方法有两种。可以对 PTC 许可服务器进行身份验证并自动下载许可证,或在限时模式下启动 ThingWorx 实例并从 PTC 支持站点获得许可证。
身份验证方法
要使用身份验证方法:
1. 请在启动实例时,将以下选项添加到 docker-compose.yml 文件的 environment 部分:
environment:
- LS_USERNAME=${PTCUSERNAME}
- LS_PASSWORD=${PTCPASSWORD}
2. ${PTCUSERNAME}${PTCPASSWORD} 更换为您的 PTC 支持站点用户名和密码。
由此可将许可证文件下载到您的 /ThingworxPlatform 文件夹中。
限时模式方法
如果没有 PTC 支持站点的登录凭据,则可以通过不向 docker-compose.yml 文件添加任何凭据 (LC_USERNAMELC_PASSWORD) 的方式,以限时模式启动实例。ThingWorx Platform 会在 /ThingworxPlatform 文件夹中生成 licenseRequestFile.txt 文件,该文件即代表您的临时许可证。要获取实际许可证,请与 PTC 技术支持部门取得联系。获得许可证文件后,为 /ThingworxPlatform 文件夹创建一个卷装载,将该许可证文件置于卷装载的文件夹中,然后继续限制您的环境并使用以下命令重新进行备份:
docker-compose down
docker-compose up -d
许可证故障排除
下表介绍了一些可能需要进行故障排除的问题:
问题
可能的解决方案
部署 thingworx.war 时发生的问题
验证 ThingworxStorage/extensions/web-inf 文件夹中是否包含许可库 (DLL 文件)。
部署 ThingWorx 时,会出现以下错误消息:
org.apache.catalina.core.ApplicationContext.log
HTMLManager: FAIL - Deploy Upload Failed, Exception:
org.apache.tomcat.util.http.fileupload.
FileUploadBase$SizeLimitExceededException: the
request was rejected because its size (90883556)
exceeds the configured maximum (52437800)
java.lang.IllegalStateException:
org.apache.tomcat.util.http.fileupload.FileUploadBase
$SizeLimitExceededException: the request was rejected
because its size (90883556) exceeds the configured
maximum (52437800)
at org.apache.catalina.connector.Request.
parseParts(Request.java:2871
必须增加 Tomcat web.xml 文件的最大文件大小 (默认值为 50 MB)。该文件位于:
<path to Tomcat>\Apache Software Foundation\Tomcat 8.5\webapps\manager\WEB-INF
1. 打开 web.xml
2. 将最大文件大小和最大请求大小更改为 104857600。
3. 保存并关闭文件。
4. 重新启动 Tomcat。
导入 PTC 许可的扩展时,会出现以下错误消息:
is licensed but cannot find feature in license.bin
file
访问 PTC 支持站点的“管理许可证”部分,确认与您的授权相匹配的相应许可证文件。如果在许可证方面需要进一步协助,请联系许可证管理团队。
尝试取消部署 ThingWorx 时,会出现以下错误消息:
FAIL - Unable to delete [<path to Tomcat>\webapps\
Thingworx]. The continued presence of this file may
cause problems. Due to FlxCore64.dll (<path to
Tomcat>\webapps\Thingworx\WEB-INF\extensions\
FlxCore64.dll)
在取消部署 ThingWorx 前,请从 Tomcat 的 Java 配置中移除 -Djava.library.path
ConfigurationLog.log 中会出现类似于以下内容的错误消息:
2017-03-10 05:56:07.097-0500 [L: ERROR] [O: ] [I: ]
[U: SuperUser] [S: ] [T: localhost-startStop-1]
**********LICENSING ERROR ANALYSIS
2017-03-10 05:56:07.097-0500 [L: ERROR] [O: ] [I: ]
[U: SuperUser] [S: ] [T: localhost-startStop-1]
/Library/flexs is listed as a java.library.path but
it does not exist.
/Library/blah is listed as a java.library.path but
it does not exist.
/Library/zzz is listed as a java.library.path but it
does not exist. No flx dll files found.
Is the java.library.path set?
2017-03-10 05:56:07.097-0500 [L: ERROR] [O: ] [I: ]
[U: SuperUser] [S: ] [T: localhost-startStop-1]
**********END LICENSING ERROR ANALYIS
日志消息可验证许可文件是否存在问题。
平台启动时会出现类似于以下内容的错误消息:
2017-06-12 11:33:59.204+0530 [L: ERROR]
[O: c.t.s.s.l.LicensingSubsystem] [I: ]
[U: SuperUser] [S: ] [T: localhost-startStop-1]
[message: The size of provided data is incorrect.]
2017-06-12 11:33:59.205+0530 [L: ERROR]
[O: c.t.s.s.l.LicensingSubsystem] [I: ]
[U: SuperUser] [S: ] [T: localhost-startStop-1]
======================================
2017-06-12 11:33:59.205+0530 [L: ERROR]
[O: c.t.s.s.l.LicensingSubsystem] [I: ]
[U: SuperUser] [S: ] [T: localhost-startStop-1]
Invalid License file: /ThingworxPlatform\license.bin
2017-06-12 11:33:59.205+0530 [L: ERROR]
[O: c.t.s.s.l.LicensingSubsystem] [I: ]
[U: SuperUser] [S: ] [T: localhost-startStop-1]
======================================
2017-06-12 11:33:59.205+0530 [L: WARN]
[O: c.t.s.ThingWorxServer] [I: ]
[U: SuperUser] [S: ] [T: localhost-startStop-1]
Shutting down the Platform.
可能已在浏览器中打开、编辑或保存许可证文件。再次下载许可证文件,将其重命名为 license_capability_response.bin,并将其直接置于 ThingworxPlatform 文件夹中,而不做任何编辑或保存。