WSO2 IOT-сервер с Mysql
Я настроил все источники данных и создал необходимые таблицы тоже. Но я не могу получить доступ к устройству. При доступе к 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
Пожалуйста, помогите мне с этим, я работаю над этим около недели.
1 ответ
WSO2 IoT 3.1.0 выпущен, и мы исправили много проблем, включая некоторые проблемы с аутентификацией. Если вам необходимо настроить сервер IoT WSO2 на сервере MySQL, выполните следующие действия.
Необходимые базы данных и доступны. (Обратите внимание, что база данных CDM включает схемы Android, iOS и Windows, а также базу данных менеджера приложений, включает Store и Social DB. Поэтому будет достаточно 5 схем)
- База данных реестра - / dbscripts /
- База данных User Manager - / dbscripts /
- База данных APIM - / dbscripts / apimgt /
- База данных CDM - / dbscripts / cdm /
- База данных Mgt сертификатов - / dbscripts / certMgt /
- База данных Android - / dbscripts / cdm / plugins / android
- База данных iOS - / dbscripts / cdm / plugins / ios
- База данных Windows - / dbscripts / cdm / windows
- База данных APP Manager - / dbscripts / appmgt /
- База данных магазина - / dbscripts / storage /
- Социальная база данных - / dbscripts / social /
Базы данных настроены следующим образом. Обратите внимание: убедитесь, что вы добавили соответствующую библиотеку jdbc в каталог / lib. В этом случае это будет mysql-connector-java-{версия}.jar
- [PRODUCT_HOME] /conf/datasources/master-datasources.xml
- База данных реестра
- База данных User Manager
- База данных APIM
- APP Manager База данных
- База данных магазина
- Социальная база данных
- [PRODUCT_HOME]/conf/datasources/cdm-datasources.xml
- База данных CDM (пожалуйста, добавьте таблицы certMgt в схему CDM)
- [PRODUCT_HOME] /conf/datasources/android-datasources.xml База данных Android
- [PRODUCT_HOME]/conf/datasources/ios-datasources.xml База данных iOS
- [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&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>
Пример конфигурации БД для APIM в mysql (обратите внимание, параметр 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&relaxAutoCommit=true&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&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>