You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "fsindustry (via GitHub)" <gi...@apache.org> on 2025/03/26 12:36:47 UTC

[I] ShardingSphere throws Exception "Unsupported cluster type: etcd " on starting up, when using etcd as metaservers. [shardingsphere]

fsindustry opened a new issue, #35079:
URL: https://github.com/apache/shardingsphere/issues/35079

   ### Which version of ShardingSphere did you use?
   version 5.5.2
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   We need to use etcd as metaservers for ShardingSphere, so that we can make some customized feature on it.
   We expect etcd can support all functions that ShardingSphere provided.
   
   ### Actual behavior
   Using etcd as metaserver, we got an exception  "Unsupported cluster type: etcd ", but the process is still exist and able to login.
   It seems that there are some bugs in RegistryCenterHolder class. 
   
   error log like this below:
   [WARN ] 2025-03-26 17:18:45.607 [main] o.a.s.s.c.j.s.c.StatisticsCollectJobWorker - Can not collect statistics because of unsupported cluster type: etcd
   [ERROR] 2025-03-26 17:18:45.620 [main] o.a.s.d.p.c.l.PipelineContextManagerLifecycleListener - Dispatch enable pipeline job start event failed
   java.lang.IllegalArgumentException: Unsupported cluster type: etcd
   at org.apache.shardingsphere.data.pipeline.core.job.api.PipelineAPIFactory$RegistryCenterHolder.lambda$createRegistryCenter$0(PipelineAPIFactory.java:150)
   at org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions.checkState(ShardingSpherePreconditions.java:44)
   at org.apache.shardingsphere.data.pipeline.core.job.api.PipelineAPIFactory$RegistryCenterHolder.createRegistryCenter(PipelineAPIFactory.java:150)
   at org.apache.shardingsphere.data.pipeline.core.job.api.PipelineAPIFactory$RegistryCenterHolder.(PipelineAPIFactory.java:141)
   at org.apache.shardingsphere.data.pipeline.core.job.api.PipelineAPIFactory$RegistryCenterHolder.lambda$getInstance$1(PipelineAPIFactory.java:155)
   at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
   at org.apache.shardingsphere.data.pipeline.core.job.api.PipelineAPIFactory$RegistryCenterHolder.getInstance(PipelineAPIFactory.java:155)
   at org.apache.shardingsphere.data.pipeline.core.job.api.PipelineAPIFactory.getRegistryCenter(PipelineAPIFactory.java:109)
   at org.apache.shardingsphere.data.pipeline.core.job.api.PipelineAPIFactory$ElasticJobAPIHolder.(PipelineAPIFactory.java:123)
   at org.apache.shardingsphere.data.pipeline.core.job.api.PipelineAPIFactory$ElasticJobAPIHolder.lambda$getInstance$0(PipelineAPIFactory.java:130)
   at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
   at org.apache.shardingsphere.data.pipeline.core.job.api.PipelineAPIFactory$ElasticJobAPIHolder.getInstance(PipelineAPIFactory.java:130)
   at org.apache.shardingsphere.data.pipeline.core.job.api.PipelineAPIFactory.getJobConfigurationAPI(PipelineAPIFactory.java:89)
   at org.apache.shardingsphere.data.pipeline.core.listener.PipelineContextManagerLifecycleListener.dispatchEnablePipelineJobStartEvent(PipelineContextManagerLifecycleListener.java:74)
   at org.apache.shardingsphere.data.pipeline.core.listener.PipelineContextManagerLifecycleListener.onInitialized(PipelineContextManagerLifecycleListener.java:65)
   at org.apache.shardingsphere.mode.manager.ContextManager.(ContextManager.java:77)
   at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.build(ClusterContextManagerBuilder.java:65)
   at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.createContextManager(BootstrapInitializer.java:61)
   at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.init(BootstrapInitializer.java:52)
   at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:64)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   Our metaserver configuration likes this below:
   mode:
   type: Cluster
   repository:
   type: etcd
   props:
   namespace: hello_cluster
   server-lists: [http://localhost:2379,http://localhost:2479,http://localhost:2579](http://localhost:2379,http//localhost:2479,http://localhost:2579)
   retryIntervalMilliseconds: 500
   timeToLiveSeconds: 60
   maxRetries: 3
   operationTimeoutMilliseconds: 50


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] ShardingSphere throws Exception "Unsupported cluster type: etcd " on starting up, when using etcd as metaservers. [shardingsphere]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #35079:
URL: https://github.com/apache/shardingsphere/issues/35079#issuecomment-2773919767

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] ShardingSphere throws Exception "Unsupported cluster type: etcd " on starting up, when using etcd as metaservers. [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #35079: ShardingSphere throws Exception "Unsupported cluster type: etcd " on starting up, when using etcd as metaservers.
URL: https://github.com/apache/shardingsphere/issues/35079


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] ShardingSphere throws Exception "Unsupported cluster type: etcd " on starting up, when using etcd as metaservers. [shardingsphere]

Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #35079:
URL: https://github.com/apache/shardingsphere/issues/35079#issuecomment-2830217662

   This is a duplicate of https://github.com/apache/shardingsphere/issues/33565 .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] ShardingSphere throws Exception "Unsupported cluster type: etcd " on starting up, when using etcd as metaservers. [shardingsphere]

Posted by "fsindustry (via GitHub)" <gi...@apache.org>.
fsindustry commented on issue #35079:
URL: https://github.com/apache/shardingsphere/issues/35079#issuecomment-2754442532

   Yes, I've checked it.
   
   <img width="824" alt="Image" src="https://github.com/user-attachments/assets/8992a657-6f88-4302-a165-4a5d6b8485f8" />
   
   <img width="603" alt="Image" src="https://github.com/user-attachments/assets/7e1d3a45-4b20-41f2-83d3-7281da013515" />
   
   It seems that the Exception is thrown from here,which is not related to concrete metaserver. But it has an hard coding "Zookeeper" in RegistryCenterHolder class
   
   ![Image](https://github.com/user-attachments/assets/1aa93209-cb61-45d8-be62-773999b50470)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] ShardingSphere throws Exception "Unsupported cluster type: etcd " on starting up, when using etcd as metaservers. [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #35079:
URL: https://github.com/apache/shardingsphere/issues/35079#issuecomment-2754277744

   Can you check your lib to make sure it include etcd dependencies?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org