Особенности:
- Менеджер API версии 3.0.0
- Аналитика версии 3.1.0
Сценарий:
В API Manager
Изменить имя пользователя и пароль API Manager. [API_M] /reporsitory/conf/deployment.toml
deploy.toml
[super_admin]
username = "administracion.demomatic.com"
password = "123456789"
create_admin_account = true
- Изменить базу данных API Manager, за этими шагами я следую База данных WSO2-Api Manager MySQL
В аналитике
В [API-Analytics] /conf/worker/deployment.yaml
deploy.yaml
#Main datasource used in API Manager
- name: AM_DB
description: Main datasource used by API Manager
jndiConfig:
name: jdbc/AM_DB
definition:
type: RDBMS
configuration:
jdbcUrl: "jdbc:mysql://localhost:3306/apim_db?useSSL=false"
username: wso2carbon
password: wso2carbon
driverClassName: com.mysql.jdbc.Driver
maxPoolSize: 10
idleTimeout: 60000
connectionTestQuery: SELECT 1
validationTimeout: 30000
isAutoCommit: false
# Authentication configuration
auth.configs:
type: 'local' # Type of the IdP client used
userManager:
adminRole: admin # Admin role which is granted all permissions
userStore: # User store
users:
-
user:
username: administracion.demomatic.com
password: MTIzNDU2Nzg5
roles: 1
roles:
-
role:
id: 1
displayName: admin
В [API-Analytics] /conf/dashboard/deployment.yaml
deploy.yaml
#Main datasource used in API Manager
- name: AM_DB
description: Main datasource used by API Manager
jndiConfig:
name: jdbc/AM_DB
definition:
type: RDBMS
configuration:
jdbcUrl: "jdbc:mysql://localhost:3306/apim_db?useSSL=false"
username: wso2carbon
password: wso2carbon
driverClassName: com.mysql.jdbc.Driver
maxPoolSize: 10
idleTimeout: 60000
connectionTestQuery: SELECT 1
validationTimeout: 30000
isAutoCommit: false
# credentials for worker nodes
username: administracion.demomamtic.com
password: 123456789
## Authentication configuration
auth.configs:
type: apim
ssoEnabled: true
properties:
adminScope: apim_analytics:admin_carbon.super
allScopes: apim_analytics:admin apim_analytics:product_manager apim_analytics:api_developer apim_analytics:app_developer apim_analytics:devops_engineer apim_analytics:analytics_viewer apim_analytics:$
adminServiceBaseUrl: https://localhost:9443
adminUsername: administracion.demomatic.com
adminPassword: 123456789
kmDcrUrl: https://localhost:9443/client-registration/v0.15/register
kmTokenUrlForRedirection: https://localhost:9443/oauth2
kmTokenUrl: https://localhost:9443/oauth2
kmUsername: administracion.demomatic.com
kmPassword: 123456789
portalAppContext: analytics-dashboard
businessRulesAppContext : business-rules
cacheTimeout: 900
baseUrl: https://localhost:9643
grantType: authorization_code
publisherUrl: https://localhost:9443
#storeUrl: https://localhost:9443
Наконец НАЧИНАЕТСЯ с серверов в этом порядке:
sh worker.sh
, Analytics Worker sh wso2server.sh
, API Manager На этом шаге можно просмотреть в терминале INFO {org.wso2.carbon.databridge.core.DataBridge} - user administracion.demomatic.com connected
sh dashboard.sh
, панель аналитики
Все серверы ОК , но при входе на страницу панели мониторинга загрузка продолжается
Терминал отправляет
ERROR {org.wso2.carbon.data.provider.endpoint.DataProviderEndPoint} - Error occurred while authorizing the access to data provider. RDBMSStreamingDataProvider. class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap') java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')
at org.wso2.carbon.dashboards.core.DashboardDataProviderAuthorizer.getPropertyValueFromParentMap(DashboardDataProviderAuthorizer.java:408)
at org.wso2.carbon.dashboards.core.DashboardDataProviderAuthorizer.getTenantId(DashboardDataProviderAuthorizer.java:344)
at org.wso2.carbon.dashboards.core.DashboardDataProviderAuthorizer.assembleQuery(DashboardDataProviderAuthorizer.java:306)
at org.wso2.carbon.dashboards.core.DashboardDataProviderAuthorizer.authorize(DashboardDataProviderAuthorizer.java:216)
at org.wso2.carbon.data.provider.endpoint.DataProviderEndPoint.onMessage(DataProviderEndPoint.java:152)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.wso2.msf4j.internal.MSF4JWSConnectorListener.executeMethod(MSF4JWSConnectorListener.java:360)
at org.wso2.msf4j.internal.MSF4JWSConnectorListener.lambda$handleTextWebSocketMessage$61(MSF4JWSConnectorListener.java:196)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at org.wso2.msf4j.internal.MSF4JWSConnectorListener.handleTextWebSocketMessage(MSF4JWSConnectorListener.java:177)
at org.wso2.msf4j.internal.MSF4JWSConnectorListener.onMessage(MSF4JWSConnectorListener.java:85)
at org.wso2.transport.http.netty.contractimpl.websocket.DefaultWebSocketConnectorFuture.notifyWebSocketListener(DefaultWebSocketConnectorFuture.java:52)
at org.wso2.transport.http.netty.contractimpl.websocket.WebSocketInboundFrameHandler.notifyTextMessage(WebSocketInboundFrameHandler.java:207)
at org.wso2.transport.http.netty.contractimpl.websocket.WebSocketInboundFrameHandler.channelRead(WebSocketInboundFrameHandler.java:157)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at org.wso2.transport.http.netty.contractimpl.listener.UriAndHeaderLengthValidator.channelRead(UriAndHeaderLengthValidator.java:68)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.handler.codec.http.websocketx.Utf8FrameValidator.channelRead(Utf8FrameValidator.java:77)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1380)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1159)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1194)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:141)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Как исправить эту ошибку, потому что я пытаюсь с именем пользователя, administratorracion.demomati c, администрацией и ничего?
Также я пытался использовать [API_M] /reporsitory/conf/deployment.toml
deploy.toml
[apim.analytics]
username = "$ref{super_admin.username}"
password = "$ref{super_admin.password}"
Но отправляет ту же ошибку, Как используется эта часть ?
РЕДАКТИРОВАТЬ Изменить на ve rsion 3.0.0 Analytics, но у меня та же ошибка:
Терминал отправляет ошибки:
ERROR {org.wso2.carbon.data.provider.endpoint.DataProviderEndPoint} - Error found in method : java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')
ERROR {org.wso2.carbon.data.provider.endpoint.DataProviderEndPoint} - Error occurred while authorizing the access to data provider. RDBMSStreamingDataProvider. class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap') java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')
at org.wso2.carbon.dashboards.core.DashboardDataProviderAuthorizer.getPropertyValueFromParentMap(DashboardDataProviderAuthorizer.java:408)
at org.wso2.carbon.dashboards.core.DashboardDataProviderAuthorizer.getTenantId(DashboardDataProviderAuthorizer.java:344)
at org.wso2.carbon.dashboards.core.DashboardDataProviderAuthorizer.assembleQuery(DashboardDataProviderAuthorizer.java:306)
at org.wso2.carbon.dashboards.core.DashboardDataProviderAuthorizer.authorize(DashboardDataProviderAuthorizer.java:216)
at org.wso2.carbon.data.provider.endpoint.DataProviderEndPoint.onMessage(DataProviderEndPoint.java:152)
at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.wso2.msf4j.internal.MSF4JWSConnectorListener.executeMethod(MSF4JWSConnectorListener.java:360)
at org.wso2.msf4j.internal.MSF4JWSConnectorListener.lambda$handleTextWebSocketMessage$61(MSF4JWSConnectorListener.java:196)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at org.wso2.msf4j.internal.MSF4JWSConnectorListener.handleTextWebSocketMessage(MSF4JWSConnectorListener.java:177)
at org.wso2.msf4j.internal.MSF4JWSConnectorListener.onMessage(MSF4JWSConnectorListener.java:85)
at org.wso2.transport.http.netty.contractimpl.websocket.DefaultWebSocketConnectorFuture.notifyWebSocketListener(DefaultWebSocketConnectorFuture.java:52)
at org.wso2.transport.http.netty.contractimpl.websocket.WebSocketInboundFrameHandler.notifyTextMessage(WebSocketInboundFrameHandler.java:207)
at org.wso2.transport.http.netty.contractimpl.websocket.WebSocketInboundFrameHandler.channelRead(WebSocketInboundFrameHandler.java:157)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at org.wso2.transport.http.netty.contractimpl.listener.UriAndHeaderLengthValidator.channelRead(UriAndHeaderLengthValidator.java:68)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.handler.codec.http.websocketx.Utf8FrameValidator.channelRead(Utf8FrameValidator.java:77)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1380)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1159)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1194)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:141)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Также через некоторое время, примерно через 10 минут, терминал приборной панели отправляет эту ошибку:
ERROR {org.wso2.carbon.data.provider.endpoint.DataProviderEndPoint} - Error found in method : org.wso2.carbon.analytics.permissions.exceptions.PermissionException: Failed getting roles of the user. Unable to check permissions.
РЕДАКТИРОВАТЬ 2
После использования Analytics без базы данных я сделал тесты изменены на пользователя, адрес электронной почты и т. д. c.
при изменении на пользователя, а не на пароль, все ОК.
Ошибка при отправке при изменении пароля, 123456789 , в API Manager или Analytics.
Попробуйте использовать другой пароль, подобный, admin_1 + !!! и OK, поэтому я думаю, что не принимать цифры для начала пароля. Спасибо всем