2017-05-30 43 views
1

我已配置所有數據源並創建了所需的表。但是我無法訪問devicemgt。當訪問devicemgt我只是不斷收到以下錯誤使用Mysql的WSO2 IOT服務器

[2017-05-30 15:58:29,300] [IoT-Core] INFO - OAuthServerConfiguration The default OAuth token issuer will be used. No custom token generator is set. 
[2017-05-30 15:58:29,301] [IoT-Core] INFO - OAuthServerConfiguration The default Identity OAuth token issuer will be used. No custom token generator is set. 
[2017-05-30 15:58:30,414] [IoT-Core] INFO - DefaultKeyValidationHandler org.wso2.carbon.apimgt.keymgt.handlers.DefaultKeyValidationHandler Initialised 
[2017-05-30 15:58:30,415] [IoT-Core] INFO - APIKeyValidationService Initialised KeyValidationHandler instance successfully 
[2017-05-30 15:58:30,437] [IoT-Core] WARN - APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure 
[2017-05-30 15:58:30,683] [IoT-Core] WARN - APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure 
[2017-05-30 15:58:30,799] [IoT-Core] WARN - APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure 
[2017-05-30 15:58:30,928] [IoT-Core] WARN - APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure 
[2017-05-30 15:58:31,026] [IoT-Core] WARN - APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure 
[2017-05-30 15:58:33,648] [IoT-Core] WARN - APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure 
[2017-05-30 15:58:33,836] [IoT-Core] WARN - APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure 
[2017-05-30 15:58:38,764] [IoT-Core] WARN - APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure 
[2017-05-30 15:58:38,769] [IoT-Core] ERROR - js Unable to fetch device types data 
[2017-05-30 15:58:38,772] [IoT-Core] ERROR - handlebars-module An exception thrown when executing the script '/app/units/cdmf.unit.device.types.listing/listing.js'. 
[2017-05-30 15:58:38,772] [IoT-Core] ERROR - dynamic-files-renderer Unable to fetch device types! 
[2017-05-30 15:58:40,611] [IoT-Core] WARN - APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure 
[2017-05-30 15:58:40,702] [IoT-Core] WARN - APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure 

enter image description here enter image description here

請任何一個可以幫助我在這,我一直在這一個星期左右。

+1

什麼是您使用的物聯網版本?在針對MySQL設置包之前,您是否註冊過任何設備? –

+0

3.0.0是版本。這個錯誤實際上發生在登錄時間本身。 –

回答

0

WSO2 IoT 3.1.0已發佈,我們修復了許多問題,其中包括一些身份驗證問題。 如果您需要使用MySQL服務器配置WSO2 IoT服務器,請按照下列步驟操作。

必需的數據庫和可用。 (請注意CDM數據庫包含Android,iOS和Windows架構,以及APP管理數據庫,包括商店和社會DB因此5個方案就足夠了。)

  1. 註冊表數據庫 -/dbscripts/
  2. 用戶管理數據庫 -/dbscripts/
  3. APIM數據庫 -/dbscripts/apimgt/
  4. CDM數據庫 -/dbscripts/CDM/
  5. 證書MGT數據庫 -/dbscripts/certMgt/
  6. Android的數據庫 -/dbscripts/CDM /插件/雄ID
  7. 的iOS數據庫 -/dbscripts/CDM /插件/ IOS
  8. Windows數據庫 -/dbscripts/CDM /窗口
  9. APP Manager數據庫 -/dbscripts/appmgt/
  10. 存儲數據庫 -/dbscripts /存儲/
  11. 社會數據庫 -/dbscripts /社會/

數據庫配置如下。請注意:確保將相關的jdbc庫添加到/ lib目錄。在這種情況下,這將是MySQL的連接器,Java的{版本}的.jar

  1. [PRODUCT_HOME] /conf/datasources/master-datasources.xml
    • 註冊表數據庫
    • 用戶管理數據庫
    • APIM數據庫
    • APP Manager數據庫
    • 存儲數據庫
    • 社會數據庫
  2. [PRODUCT_HOME] /conf/datasources/cdm-datasources.xml
    • CDM數據庫(請添加certMgt表以CDM模式)
  3. [PRODUCT_HOME]/CONF /數據源/ Android的數據源。XML Android的數據庫
  4. [PRODUCT_HOME] /conf/datasources/ios-datasources.xml 的iOS數據庫
  5. [PRODUCT_HOME] /conf/datasources/windows-datasources.xml Windows數據庫

數據庫CONFIGS 。 示例數據庫配置爲用戶管理器,在主datasources.xml

<datasource> 
     <name>WSO2UM_DB</name> 
     <description>The datasource used for User Manager database</description> 
     <jndiConfig> 
      <name>jdbc/WSO2UM_DB</name> 
     </jndiConfig> 
     <definition type="RDBMS"> 
      <configuration> 
       <url>jdbc:mysql://{hostname}:{port}/userdb?autoReconnect=true&amp;relaxAutoCommit=true</url> 
       <username>root</username> 
       <password>root</password> 
       <driverClassName>com.mysql.jdbc.Driver</driverClassName> 
       <maxActive>50</maxActive> 
       <maxWait>60000</maxWait> 
       <testOnBorrow>true</testOnBorrow> 
       <validationQuery>SELECT 1</validationQuery> 
       <validationInterval>30000</validationInterval> 
      </configuration> 
     </definition> 
    </datasource> 

示例數據庫配置爲在MySQL APIM註冊表和App Manager數據庫(請注意zeroDateTimeBehavior = convertToNull參數爲MySQL)

<datasource> 
     <name>WSO2AM_DB</name> 
     <description>The datasource used for API Manager database</description> 
     <jndiConfig> 
      <name>jdbc/WSO2AM_DB</name> 
     </jndiConfig> 
     <definition type="RDBMS"> 
      <configuration> 
       <url>jdbc:mysql://{hostname}:{port}/apim?autoReconnect=true&amp;relaxAutoCommit=true&amp;zeroDateTimeBehavior=convertToNull</url> 
       <username>root</username> 
       <password>root</password> 
       <driverClassName>com.mysql.jdbc.Driver</driverClassName> 
       <maxActive>50</maxActive> 
       <maxWait>60000</maxWait> 
       <testOnBorrow>true</testOnBorrow> 
       <validationQuery>SELECT 1</validationQuery> 
       <validationInterval>30000</validationInterval> 
      </configuration> 
     </definition> 
    </datasource> 

CDM,Android,Windows和iOS數據庫的數據庫配置示例。

<datasources> 
    <datasource> 
     <name>DM_DS</name> 
     <description>The datasource used for CDM</description> 
     <jndiConfig> 
      <name>jdbc/DM_DS</name> 
     </jndiConfig> 
     <definition type="RDBMS"> 
      <configuration> 
       <url>jdbc:mysql://{localhost}:3306/cdm?autoReconnect=true&amp;relaxAutoCommit=true</url> 
       <username>root</username> 
       <password>root</password> 
       <driverClassName>com.mysql.jdbc.Driver</driverClassName> 
       <maxActive>50</maxActive> 
       <maxWait>60000</maxWait> 
       <testOnBorrow>true</testOnBorrow> 
       <validationQuery>SELECT 1</validationQuery> 
       <validationInterval>30000</validationInterval> 
      </configuration> 
     </definition> 
    </datasource> 
</datasources>