安裝與組態 > 使用 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. 使用您的 PTC 支援網站使用者名稱與密碼取代 ${PTCUSERNAME}${PTCPASSWORD}
這會將授權檔案下載到 /ThingworxPlatform 資料夾。
限制模式方法
如果沒有 PTC 支援網站的登入憑證,您可以在限制模式下啟動實例但不要將任何憑證 (LC_USERNAMELC_PASSWORD) 新增到 docker-compose.yml 檔案。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 檔案中的最大檔案大小 (預設值為 50MB)。此檔案位在:
<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 資料夾中,而不進行編輯或儲存。