Не удалось настроить узлы диспетчера для кластера siddhi из-за того, что «указанный ключ слишком длинный; максимальная длина ключа составляет 3072 байта» - PullRequest
0 голосов
/ 10 июня 2018

Я пытаюсь настроить полностью распределенное развертывание для потокового процессора siddhi.мой кластерный узел менеджера имеет следующую конфигурацию:

wso2.datasources:
  dataSources:
  - name: SP_MGT_DB
    description: The datasource used for registry and user manager
      # JNDI mapping of a data source
    jndiConfig:
      name: jdbc/WSO2ClusterDB
    definition:
      type: RDBMS
      configuration:
        jdbcUrl: 'jdbc:mysql://localhost:3306/SP_MGT_DB?useSSL=false'
        username: test
        password: test123
        driverClassName: com.mysql.cj.jdbc.Driver
        maxPoolSize: 50
        idleTimeout: 60000
        connectionTestQuery: SELECT 1
        validationTimeout: 30000
        isAutoCommit: false

  - name: WSO2_PERMISSIONS_DB
    description: The datasource used for permission feature
    jndiConfig:
      name: jdbc/PERMISSION_DB
      useJndiReference: true
    definition:
      type: RDBMS
      configuration:
        jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/PERMISSION_DB;IFEXISTS=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE'
        username: wso2carbon
        password: wso2carbon
        driverClassName: org.h2.Driver
        maxPoolSize: 50
        idleTimeout: 60000
        connectionTestQuery: SELECT 1
        validationTimeout: 30000
        isAutoCommit: false

  # Cluster Configuration
cluster.config:
  enabled: true
  groupId: manager-group-id-1
  coordinationStrategyClass: org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCoordinationStrategy
  strategyConfig:
    datasource: SP_MGT_DB     # define a mysql datasource configured to the shared database
    heartbeatInterval: 1000
    heartbeatMaxRetry: 2
    eventPollingInterval: 1000

  # Deployment Configuration for Distributed Deployment
deployment.config:
  type: distributed
  httpInterface:
    host: localhost
    port: 9181
  heartbeatInterval: 2000
  heartbeatMaxRetry: 2
  datasource: SP_MGT_DB           # define a mysql datasource in datasources and refer it from here.
  minResourceCount: 1
  bootstrapURLs: localhost:9192, localhost:9292   # kafka urls
  zooKeeperURLs: localhost:2181   # zookeeper urls

после запуска кластера zookeeper и kafka, когда я пытаюсь запустить manager.sh, я сталкиваюсь со следующей ошибкой:

[2018-06-11 00:28:00,065]  INFO {org.wso2.carbon.databridge.agent.internal.DataAgentDS} - Successfully deployed Agent Server 
[2018-06-11 00:28:00,600] ERROR {org.eclipse.equinox.ds} - [SCR] Exception while activating instance org.wso2.carbon.cluster.coordinator.rdbms.internal.RDBMSCoordinationServiceComponent@dd8b5c9 of component org.wso2.carbon.cluster.coordinator.rdbms.internal.RDBMSCoordinationServiceComponent  java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:235)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
    at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
    at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:915)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:999)
    at org.wso2.carbon.datasource.core.internal.DataSourceListenerComponent.onAllRequiredCapabilitiesAvailable(DataSourceListenerComponent.java:128)
    at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.lambda$notifySatisfiableComponents$7(StartupComponentManager.java:266)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.notifySatisfiableComponents(StartupComponentManager.java:252)
    at org.wso2.carbon.kernel.internal.startupresolver.StartupOrderResolver$1.run(StartupOrderResolver.java:204)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)

    Caused by: org.wso2.carbon.cluster.coordinator.commons.exception.ClusterCoordinationException: Error in executing create cluster node status table query.
        at org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCommunicationBusContextImpl.createClusterNodeStatusTable(RDBMSCommunicationBusContextImpl.java:144)
        at org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCommunicationBusContextImpl.createTables(RDBMSCommunicationBusContextImpl.java:102)
        at org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCommunicationBusContextImpl.<init>(RDBMSCommunicationBusContextImpl.java:89)
        at org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCoordinationStrategy.<init>(RDBMSCoordinationStrategy.java:103)
        at org.wso2.carbon.cluster.coordinator.rdbms.internal.RDBMSCoordinationServiceComponent.start(RDBMSCoordinationServiceComponent.java:81)
        ... 29 more
    Caused by: java.sql.SQLSyntaxErrorException: Specified key was too long; max key length is 3072 bytes
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:118)
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:960)
        at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:388)
        at com.zaxxer.hikari.proxy.PreparedStatementProxy.execute(PreparedStatementProxy.java:44)
        at com.zaxxer.hikari.proxy.HikariPreparedStatementProxy.execute(HikariPreparedStatementProxy.java)
        at org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCommunicationBusContextImpl.createClusterNodeStatusTable(RDBMSCommunicationBusContextImpl.java:138)

У меня два менеджераузлы и два рабочих узла все работают локально.Я создал базу данных с именем SP_MGT_DB для пользовательского теста.

1 Ответ

0 голосов
/ 11 июня 2018

Кажется, проблема в связи с сервером MySQL и клиентом.Какие версии MySQL-сервера и клиента вы тестируете.

...