You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/12/11 10:04:20 UTC
[GitHub] [shardingsphere] Zhai6319 opened a new issue, #22802: Must cluster mode be used for project cluster deployment?
Zhai6319 opened a new issue, #22802:
URL: https://github.com/apache/shardingsphere/issues/22802
<img width="1211" alt="image" src="https://user-images.githubusercontent.com/29478697/206897281-e23405f3-7835-4115-94fe-b7888340be90.png">
Must cluster mode be used for project cluster deployment?
I think the cluster mode is difficult to use. Zookeeper is always unable to start, and nacos always times out. What will happen if the cluster deployment project does not use the cluster mode?
--
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
[GitHub] [shardingsphere] Zhai6319 commented on issue #22802: Must cluster mode be used for project cluster deployment?
Posted by GitBox <gi...@apache.org>.
Zhai6319 commented on issue #22802:
URL: https://github.com/apache/shardingsphere/issues/22802#issuecomment-1346898467
> > > @Zhai6319 maybe you will check why this exception `com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed` is thrown
> >
> >
> > @azexcy
> > I just don't know why; It is ok to use nacos as the registry, but it is slow and often times out; It is ok to use stand-alone mode JDBC; However, an error is always reported when starting a project with zookeeper Data source shutdown Or I can provide a sample project in the evening Can you take a look?
>
> Sure. Please support your demo with ZooKeeper
hi @zhaojinchao95
this is my demo project. https://github.com/Zhai6319/sbx-system/tree/feature/init
--
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
[GitHub] [shardingsphere] Zhai6319 commented on issue #22802: Must cluster mode be used for project cluster deployment?
Posted by GitBox <gi...@apache.org>.
Zhai6319 commented on issue #22802:
URL: https://github.com/apache/shardingsphere/issues/22802#issuecomment-1345595109
> Hi @Zhai6319 , yes, cluster mode is required if you need cluster deployment.
>
> ZooKeeper should be started by yourself before starting ShardingSphere.
But I made a mistake using zookeeper,
Using nacos is slow, but it can be started successfully
You can also start successfully by using a stand-alone computer, but you can't start successfully by using zookeeper
2022-12-12 00:11:32.769 INFO 43019 --- [ain-EventThread] o.a.c.f.state.ConnectionStateManager : State change: CONNECTED
2022-12-12 00:11:32.819 INFO 43019 --- [ain-EventThread] o.a.c.framework.imps.EnsembleTracker : New config event received: {}
2022-12-12 00:11:32.819 INFO 43019 --- [ain-EventThread] o.a.c.framework.imps.EnsembleTracker : New config event received: {}
2022-12-12 00:11:33.559 INFO 43019 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-2} inited
2022-12-12 00:11:33.833 INFO 43019 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-3} inited
2022-12-12 00:11:33.923 INFO 43019 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-4} inited
2022-12-12 00:11:36.728 INFO 43019 --- [ main] org.apache.curator.utils.Compatibility : Using org.apache.zookeeper.server.quorum.MultipleAddresses
2022-12-12 00:11:37.346 ERROR 43019 --- [NotifyService-0] c.a.druid.pool.DruidAbstractDataSource : maxIdle is deprecated
2022-12-12 00:11:37.349 ERROR 43019 --- [NotifyService-0] c.a.druid.pool.DruidAbstractDataSource : maxIdle is deprecated
2022-12-12 00:11:37.351 ERROR 43019 --- [NotifyService-0] c.a.druid.pool.DruidAbstractDataSource : maxIdle is deprecated
2022-12-12 00:11:37.358 INFO 43019 --- [NotifyService-0] com.alibaba.druid.pool.DruidDataSource : {dataSource-5,DataSource-753396831} inited
2022-12-12 00:11:37.484 INFO 43019 --- [NotifyService-0] com.alibaba.druid.pool.DruidDataSource : {dataSource-6,DataSource-314139313} inited
2022-12-12 00:11:37.605 INFO 43019 --- [NotifyService-0] com.alibaba.druid.pool.DruidDataSource : {dataSource-7,DataSource-360989239} inited
2022-12-12 00:11:38.083 INFO 43019 --- [ool-13-thread-1] com.alibaba.druid.pool.DruidDataSource : {dataSource-3} closing ...
2022-12-12 00:11:38.083 INFO 43019 --- [ool-12-thread-1] com.alibaba.druid.pool.DruidDataSource : {dataSource-2} closing ...
2022-12-12 00:11:38.083 INFO 43019 --- [ool-14-thread-1] com.alibaba.druid.pool.DruidDataSource : {dataSource-4} closing ...
2022-12-12 00:11:38.092 INFO 43019 --- [ool-13-thread-1] com.alibaba.druid.pool.DruidDataSource : {dataSource-3} closed
2022-12-12 00:11:38.092 INFO 43019 --- [ool-14-thread-1] com.alibaba.druid.pool.DruidDataSource : {dataSource-4} closed
2022-12-12 00:11:38.092 INFO 43019 --- [ool-12-thread-1] com.alibaba.druid.pool.DruidDataSource : {dataSource-2} closed
2022-12-12 00:11:38.119 ERROR 43019 --- [ main] com.alibaba.druid.pool.DruidDataSource : init datasource error, url: jdbc:shardingsphere:classpath:sharding-dev.yaml
com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed at Mon Dec 12 00:11:38 CST 2022
at com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(DruidDataSource.java:1576)
at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java:1429)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1409)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1399)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:100)
at org.apache.shardingsphere.driver.jdbc.core.connection.ConnectionManager.createConnection(ConnectionManager.java:359)
at org.apache.shardingsphere.driver.jdbc.core.connection.ConnectionManager.createConnections(ConnectionManager.java:328)
at org.apache.shardingsphere.driver.jdbc.core.connection.ConnectionManager.getConnections(ConnectionManager.java:317)
at org.apache.shardingsphere.infra.executor.sql.prepare.driver.DriverExecutionPrepareEngine.group(DriverExecutionPrepareEngine.java:87)
at org.apache.shardingsphere.infra.executor.sql.prepare.AbstractExecutionPrepareEngine.prepare(AbstractExecutionPrepareEngine.java:62)
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createExecutionGroupContext(ShardingSphereStatement.java:525)
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.executeQuery0(ShardingSphereStatement.java:219)
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.executeQuery(ShardingSphereStatement.java:176)
at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2883)
at com.alibaba.druid.filter.FilterAdapter.statement_executeQuery(FilterAdapter.java:2514)
at com.alibaba.druid.filter.FilterEventAdapter.statement_executeQuery(FilterEventAdapter.java:302)
at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2880)
at com.alibaba.druid.filter.FilterAdapter.statement_executeQuery(FilterAdapter.java:2514)
at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2880)
at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.executeQuery(StatementProxyImpl.java:221)
at com.alibaba.druid.pool.DruidAbstractDataSource.validateConnection(DruidAbstractDataSource.java:1444)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1743)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:924)
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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1930)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1872)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1417)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:656)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:745)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:420)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:164)
at com.sbx.core.launch.Application.run(Application.java:76)
at com.sbx.app.SystemApplication.main(SystemApplication.java:21)
--
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
[GitHub] [shardingsphere] Zhai6319 commented on issue #22802: Must cluster mode be used for project cluster deployment?
Posted by GitBox <gi...@apache.org>.
Zhai6319 commented on issue #22802:
URL: https://github.com/apache/shardingsphere/issues/22802#issuecomment-1348079403
@zhaojinchao95 hello ?
--
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
[GitHub] [shardingsphere] zhaojinchao95 commented on issue #22802: Must cluster mode be used for project cluster deployment?
Posted by GitBox <gi...@apache.org>.
zhaojinchao95 commented on issue #22802:
URL: https://github.com/apache/shardingsphere/issues/22802#issuecomment-1346295221
> > @Zhai6319 maybe you will check why this exception `com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed` is thrown
>
> @azexcy
>
> I just don't know why; It is ok to use nacos as the registry, but it is slow and often times out; It is ok to use stand-alone mode JDBC; However, an error is always reported when starting a project with zookeeper Data source shutdown Or I can provide a sample project in the evening Can you take a look?
Sure. Please support your demo with ZooKeeper
--
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
[GitHub] [shardingsphere] zhaojinchao95 commented on issue #22802: Must cluster mode be used for project cluster deployment?
Posted by GitBox <gi...@apache.org>.
zhaojinchao95 commented on issue #22802:
URL: https://github.com/apache/shardingsphere/issues/22802#issuecomment-1350671285
Where are you `write_ds` data source name in your `application.yml`. By th way, your demo are very complex and huge. Can you simplify it?
--
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
[GitHub] [shardingsphere] Zhai6319 commented on issue #22802: Must cluster mode be used for project cluster deployment?
Posted by GitBox <gi...@apache.org>.
Zhai6319 commented on issue #22802:
URL: https://github.com/apache/shardingsphere/issues/22802#issuecomment-1352469084
The branch is feature/init
--
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
[GitHub] [shardingsphere] Zhai6319 commented on issue #22802: Must cluster mode be used for project cluster deployment?
Posted by GitBox <gi...@apache.org>.
Zhai6319 commented on issue #22802:
URL: https://github.com/apache/shardingsphere/issues/22802#issuecomment-1345811069
> @Zhai6319 maybe you will check why this exception `com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed` is thrown
@azexcy
I just don't know why;
It is ok to use nacos as the registry, but it is slow and often times out;
It is ok to use stand-alone mode JDBC;
However, an error is always reported when starting a project with zookeeper
Data source shutdown
Or I can provide a sample project in the evening
Can you take a look?
--
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
[GitHub] [shardingsphere] sandynz commented on issue #22802: Must cluster mode be used for project cluster deployment?
Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #22802:
URL: https://github.com/apache/shardingsphere/issues/22802#issuecomment-1345580063
Hi @Zhai6319 , yes, cluster mode is required if you need cluster deployment.
ZooKeeper should be started by yourself before starting ShardingSphere.
--
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
[GitHub] [shardingsphere] azexcy commented on issue #22802: Must cluster mode be used for project cluster deployment?
Posted by GitBox <gi...@apache.org>.
azexcy commented on issue #22802:
URL: https://github.com/apache/shardingsphere/issues/22802#issuecomment-1345790933
@Zhai6319 maybe you will check why this exception `com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed` is thrown
--
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
[GitHub] [shardingsphere] Zhai6319 commented on issue #22802: Must cluster mode be used for project cluster deployment?
Posted by GitBox <gi...@apache.org>.
Zhai6319 commented on issue #22802:
URL: https://github.com/apache/shardingsphere/issues/22802#issuecomment-1352458406
![image](https://user-images.githubusercontent.com/29478697/207754013-2459c2d3-d960-4ff4-a6fa-91374638d9c1.png)
The document does not say that the data source name needs to be configured separately
In addition, I can start normally through stand-alone mode and nacos
The project is normal. You just need to use the [settings-zhai.xml] provided by me to start the project
The database can either use your own, or send your IP to me, and I will add the white list
--
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