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

[GitHub] [shardingsphere-elasticjob] 100kit opened a new issue, #2236: java程序使用elasticjob3.x无法连接局域网内的zookeeper

100kit opened a new issue, #2236:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2236

   java程序使用elasticjob3.x能连接本地zookeeper,但无法连接局域网内的其他zookeeper。
   java程序换成elasticjob2.x可以连上,使用PrettyZoo也可以连上。
   
   局域网zookeeper:centos7部署的zookeeper3.5.x、zookeeper3.6.4、zookeeper3.7.1都测试过;
   centos7已关闭防火墙、关闭selinu、xswap;
   网络能ping通;
   spring项目依赖:elasticjob-lite-spring-boot-starter
   普通java程序依赖:elasticjob-lite-core
   
   报错内容:
   org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'zookeeperRegistryCenter' defined in class path resource [org/apache/shardingsphere/elasticjob/lite/spring/boot/reg/ElasticJobRegistryCenterConfiguration.class]: Invocation of init method failed; nested exception is org.apache.shardingsphere.elasticjob.reg.exception.RegException: org.apache.zookeeper.KeeperException$OperationTimeoutException: KeeperErrorCode = OperationTimeout
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1799) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:755) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
   	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
   	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
   	at com.hciot.elastic.job.App.main(App.java:10) [classes/:na]
   Caused by: org.apache.shardingsphere.elasticjob.reg.exception.RegException: org.apache.zookeeper.KeeperException$OperationTimeoutException: KeeperErrorCode = OperationTimeout
   	at org.apache.shardingsphere.elasticjob.reg.exception.RegExceptionHandler.handleException(RegExceptionHandler.java:55) ~[elasticjob-registry-center-api-3.0.3.jar:3.0.3]
   	at org.apache.shardingsphere.elasticjob.reg.zookeeper.ZookeeperRegistryCenter.init(ZookeeperRegistryCenter.java:120) ~[elasticjob-registry-center-zookeeper-curator-3.0.3.jar:3.0.3]
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_361]
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_361]
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_361]
   	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_361]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1925) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1867) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1795) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE]
   	... 16 common frames omitted
   Caused by: org.apache.zookeeper.KeeperException$OperationTimeoutException: KeeperErrorCode = OperationTimeout
   	at org.apache.shardingsphere.elasticjob.reg.zookeeper.ZookeeperRegistryCenter.init(ZookeeperRegistryCenter.java:115) ~[elasticjob-registry-center-zookeeper-curator-3.0.3.jar:3.0.3]
   	... 23 common frames omitted
   


-- 
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-elasticjob] songxiaosheng commented on issue #2236: java程序使用elasticjob3.x无法连接局域网内的zookeeper

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

   你用telnet验证下,如果正常的话再排查代码问题


-- 
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-elasticjob] tnessn commented on issue #2236: java程序使用elasticjob3.x无法连接局域网内的zookeeper

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

   我也是连不上 2.x是没问题的


-- 
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-elasticjob] linghengqian commented on issue #2236: java程序使用elasticjob3.x无法连接局域网内的zookeeper

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

   - Please provide a minimal reproducible example.


-- 
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