1

我已经配置了所有数据源并创建了所需的表。但我无法访问 devicemgt。在访问 devicemgt 时,我总是遇到以下错误

[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

在此处输入图像描述 在此处输入图像描述

请任何人帮助我,我已经为此工作了大约一个星期。

4

1 回答 1

0

WSO2 IoT 3.1.0已发布,我们修复了许多问题,包括一些身份验证问题。如果您需要使用 MySQL 服务器配置 WSO2 IoT Server,请按照以下步骤操作。

必需的数据库和可用的。(请注意 CDM 数据库包括 Android、iOS 和 Windows 模式,以及 APP manager 数据库,包括 Store 和 Social DB。因此 5 个方案就足够了)

  1. 注册表数据库 - /dbscripts/
  2. 用户管理器数据库 - /dbscripts/
  3. APIM 数据库 - /dbscripts/apimgt/
  4. CDM 数据库 - /dbscripts/cdm/
  5. 证书管理数据库 - /dbscripts/certMgt/
  6. Android 数据库 - /dbscripts/cdm/plugins/android
  7. iOS 数据库 - /dbscripts/cdm/plugins/ios
  8. Windows 数据库 - /dbscripts/cdm/windows
  9. APP 管理器数据库 - /dbscripts/appmgt/
  10. 存储数据库 - /dbscripts/storage/
  11. 社交数据库 - /dbscripts/social/

数据库配置如下。请注意:确保将相关的 jdbc 库添加到 /lib 目录。在这种情况下,它将是 mysql-connector-java-{version}.jar

  1. [PRODUCT_HOME]/conf/datasources/master-datasources.xml
    • 注册数据库
    • 用户管理器数据库
    • APIM 数据库
    • APP管理器数据库
    • 存储数据库
    • 社会数据库
  2. [PRODUCT_HOME]/conf/datasources/cdm-datasources.xml
    • CDM 数据库(请将 certMgt 表添加到 CDM 模式)
  3. [PRODUCT_HOME]/conf/datasources/android-datasources.xml Android 数据库
  4. [PRODUCT_HOME]/conf/datasources/ios-datasources.xml iOS 数据库
  5. [PRODUCT_HOME]/conf/datasources/windows-datasources.xml Windows 数据库

数据库配置。master-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 的示例数据库配置(请注意 mysql 的 zeroDateTimeBehavior=convertToNull 参数)

    <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>
于 2017-08-16T07:08:05.970 回答