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/04/11 05:17:23 UTC
[GitHub] [shardingsphere-elasticjob] icetea916 commented on issue #1858: Elasticjob unable to get local IP address, runtime In JDK version 1.8.0_40
icetea916 commented on issue #1858:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1858#issuecomment-1094562041
There is the same problem in a windows system with JDK version 1.8.0_73, but there is no problem in another windows system with JDK version 1.8.0_131.
**After I upgrade the JDK to 1.8.0_131, the program can start normally.**
#### Maven dependency:
```xml
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-lite-spring-boot-starter</artifactId>
<version>3.0.1</version>
</dependency>
```
#### Exception log (jdk=1.8.0_73)
```
09:52:40.675 [main] INFO o.q.i.StdSchedulerFactory - [instantiate,1362] - Quartz scheduler 'demoSimpleJob' initialized from an externally provided properties instance.
09:52:40.675 [main] INFO o.q.i.StdSchedulerFactory - [instantiate,1366] - Quartz scheduler version: 2.3.1
09:52:40.683 [main] INFO o.a.c.u.Compatibility - [<clinit>,47] - Using org.apache.zookeeper.server.quorum.MultipleAddresses
09:52:41.010 [main] ERROR o.s.b.SpringApplication - [reportFailure,823] - Application run failed
org.apache.shardingsphere.elasticjob.infra.env.HostException: ip is null
at org.apache.shardingsphere.elasticjob.infra.env.IpUtils.getIp(IpUtils.java:70)
at org.apache.shardingsphere.elasticjob.infra.handler.sharding.JobInstance.<init>(JobInstance.java:44)
at org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobScheduler.registerStartUpInfo(JobScheduler.java:176)
at org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobScheduler.createJobScheduleController(JobScheduler.java:140)
at org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobScheduler.<init>(JobScheduler.java:90)
at org.apache.shardingsphere.elasticjob.lite.api.bootstrap.impl.ScheduleJobBootstrap.<init>(ScheduleJobBootstrap.java:36)
at org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobBootstrapConfiguration.registerClassedJob(ElasticJobBootstrapConfiguration.java:108)
at org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobBootstrapConfiguration.constructJobBootstraps(ElasticJobBootstrapConfiguration.java:91)
at org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobBootstrapConfiguration.createJobBootstrapBeans(ElasticJobBootstrapConfiguration.java:64)
at org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobBootstrapConfiguration.afterSingletonsInstantiated(ElasticJobBootstrapConfiguration.java:52)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:862)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204)
at com.szpt.task.SzptTaskApplication.main(SzptTaskApplication.java:13)
09:52:41.012 [main] INFO o.q.c.QuartzScheduler - [shutdown,666] - Scheduler quartzScheduler_$_NON_CLUSTERED shutting down.
09:52:41.012 [main] INFO o.q.c.QuartzScheduler - [standby,585] - Scheduler quartzScheduler_$_NON_CLUSTERED paused.
09:52:41.012 [main] INFO o.q.c.QuartzScheduler - [shutdown,740] - Scheduler quartzScheduler_$_NON_CLUSTERED shutdown complete.
09:52:41.527 [Curator-Framework-0] INFO o.a.c.f.i.CuratorFrameworkImpl - [backgroundOperationsLoop,964] - backgroundOperationsLoop exiting
09:52:41.645 [main-EventThread] INFO o.a.z.ClientCnxn - [run,566] - EventThread shut down for session: 0x10cfa647f780009
09:52:41.645 [main] INFO o.a.z.ZooKeeper - [close,1618] - Session: 0x10cfa647f780009 closed
```
#### Normal log (jdk=1.8.0_131)
```
13:07:30.325 [main] INFO o.a.s.e.l.i.s.JobShutdownHookPlugin - [registerShutdownHook,75] - Registering Quartz shutdown hook. demoSimpleJob
13:07:30.325 [main] INFO o.q.s.RAMJobStore - [initialize,155] - RAMJobStore initialized.
13:07:30.325 [main] INFO o.q.c.QuartzScheduler - [initialize,294] - Scheduler meta-data: Quartz Scheduler (v2.3.1) 'demoSimpleJob' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
13:07:30.325 [main] INFO o.q.i.StdSchedulerFactory - [instantiate,1362] - Quartz scheduler 'demoSimpleJob' initialized from an externally provided properties instance.
13:07:30.325 [main] INFO o.q.i.StdSchedulerFactory - [instantiate,1366] - Quartz scheduler version: 2.3.1
13:07:30.340 [main] INFO o.a.c.u.Compatibility - [<clinit>,47] - Using org.apache.zookeeper.server.quorum.MultipleAddresses
13:07:30.684 [main] INFO o.q.i.StdSchedulerFactory - [instantiate,1208] - Using default implementation for ThreadExecutor
13:07:30.684 [main] INFO o.q.c.SchedulerSignalerImpl - [<init>,61] - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
13:07:30.684 [main] INFO o.q.c.QuartzScheduler - [<init>,229] - Quartz Scheduler v.2.3.1 created.
```
--
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