2017-05-30 98 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>