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 2021/01/27 10:37:27 UTC

[GitHub] [shardingsphere-elasticjob] wefun94 opened a new issue #1823: Run the demo job but got a exception "KeeperErrorCode = Unimplemented for /my-job/MyJob/config"

wefun94 opened a new issue #1823:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1823


   I run the demo job according to the document (https://shardingsphere.apache.org/elasticjob/current/en/quick-start/elasticjob-lite/#import-maven-dependency), but it crashed.
   
   **Please help me find what i am wrong.**
   
   Import the dependency 
   
   ```
   <dependency>
               <groupId>org.apache.shardingsphere.elasticjob</groupId>
               <artifactId>elasticjob-lite-core</artifactId>
               <version>3.0.0-RC1</version>
    </dependency>
   
   ```
   
   Then add my job
   ```
   public class MyJob implements SimpleJob {
   
       @Override
       public void execute(ShardingContext context) {
           System.out.println("test");
       }
   }
   
   ```
   
   ```
   public class MyJobDemo {
       public static void main(String[] args) {
           new ScheduleJobBootstrap(createRegistryCenter(), new MyJob(), createJobConfiguration()).schedule();
       }
   
   
       private static CoordinatorRegistryCenter createRegistryCenter() {
           CoordinatorRegistryCenter regCenter = new ZookeeperRegistryCenter(new ZookeeperConfiguration("127.0.0.1:2181", "my-job"));
           regCenter.init();
           return regCenter;
       }
   
       private static JobConfiguration createJobConfiguration() {
           return JobConfiguration.newBuilder("MyJob", 3).cron("0/5 * * * * ?").build();
       }
   }
   ```
   
   The error msg is 
   
   ```
   Exception in thread "main" org.apache.shardingsphere.elasticjob.reg.exception.RegException: org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for /my-job/MyJob/config
   	at org.apache.shardingsphere.elasticjob.reg.exception.RegExceptionHandler.handleException(RegExceptionHandler.java:48)
   	at org.apache.shardingsphere.elasticjob.reg.zookeeper.ZookeeperRegistryCenter.persist(ZookeeperRegistryCenter.java:219)
   	at org.apache.shardingsphere.elasticjob.lite.internal.storage.JobNodeStorage.replaceJobNode(JobNodeStorage.java:170)
   	at org.apache.shardingsphere.elasticjob.lite.internal.config.ConfigurationService.setUpJobConfiguration(ConfigurationService.java:72)
   	at org.apache.shardingsphere.elasticjob.lite.internal.setup.SetUpFacade.setUpJobConfiguration(SetUpFacade.java:66)
   	at org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobScheduler.<init>(JobScheduler.java:84)
   	at org.apache.shardingsphere.elasticjob.lite.api.bootstrap.impl.ScheduleJobBootstrap.<init>(ScheduleJobBootstrap.java:36)
   	at elastic_job.MyJobDemo.main(MyJobDemo.java:15)
   Caused by: org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for /my-job/MyJob/config
   ```
   


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

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



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #1823: Run the demo job but got a exception "KeeperErrorCode = Unimplemented for /my-job/MyJob/config"

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #1823:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1823#issuecomment-768208089


   Hi @wefun94 
   Which version of Zookeeper do you use?


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

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



[GitHub] [shardingsphere-elasticjob] wefun94 commented on issue #1823: Run the demo job but got a exception "KeeperErrorCode = Unimplemented for /my-job/MyJob/config"

Posted by GitBox <gi...@apache.org>.
wefun94 commented on issue #1823:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1823#issuecomment-768213179


   > Hi @wefun94
   > Which version of Zookeeper do you use?
   
           <dependency>
               <groupId>org.apache.zookeeper</groupId>
               <artifactId>zookeeper</artifactId>
               <version>3.6.0</version>
           </dependency>


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

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



[GitHub] [shardingsphere-elasticjob] TeslaCN closed issue #1823: Run the demo job but got a exception "KeeperErrorCode = Unimplemented for /my-job/MyJob/config"

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #1823:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1823


   


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

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



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #1823: Run the demo job but got a exception "KeeperErrorCode = Unimplemented for /my-job/MyJob/config"

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #1823:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1823#issuecomment-769493537


   It requires Zookeeper server's version >= 3.6.0


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

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



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #1823: Run the demo job but got a exception "KeeperErrorCode = Unimplemented for /my-job/MyJob/config"

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #1823:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1823#issuecomment-783404589


   Close due to no response.


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

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