Skip to content

[Bug] Bug title spring容器关闭时,监控组件线程池释放顺序导致任务拒绝报错 #1582

Open
@ConnorLH

Description

@ConnorLH

Search before asking

  • I had searched in the issues and found no similar issues.

Environment

Windows

Hippo4j version

1.5.0

What happened

SpringBoot应用关闭时显示报错
SpringBoot版本 2.3.12.RELEASE

	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063) ~[na:1.8.0_411]
	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830) ~[na:1.8.0_411]
	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379) ~[na:1.8.0_411]
	at cn.hippo4j.core.executor.support.ThreadPoolExecutorTemplate.execute(ThreadPoolExecutorTemplate.java:41) ~[hippo4j-core-1.5.0.jar:1.5.0]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) ~[na:1.8.0_411]
	at cn.hippo4j.core.executor.support.ThreadPoolExecutorTemplate.submit(ThreadPoolExecutorTemplate.java:51) ~[hippo4j-core-1.5.0.jar:1.5.0]
	at cn.hippo4j.core.toolkit.inet.InetUtils.convertAddress(InetUtils.java:150) ~[hippo4j-core-1.5.0.jar:1.5.0]
	at cn.hippo4j.core.toolkit.inet.InetUtils.findFirstNonLoopBackHostInfo(InetUtils.java:65) ~[hippo4j-core-1.5.0.jar:1.5.0]
	at cn.hippo4j.core.executor.state.ThreadPoolRunStateHandler.supplement(ThreadPoolRunStateHandler.java:59) ~[hippo4j-core-1.5.0.jar:1.5.0]
	at cn.hippo4j.core.executor.state.AbstractThreadPoolRuntime.getPoolRunState(AbstractThreadPoolRuntime.java:88) ~[hippo4j-core-1.5.0.jar:1.5.0]
	at cn.hippo4j.core.executor.state.AbstractThreadPoolRuntime.getPoolRunState(AbstractThreadPoolRuntime.java:54) ~[hippo4j-core-1.5.0.jar:1.5.0]
	at cn.hippo4j.monitor.base.AbstractDynamicThreadPoolMonitor.lambda$collect$0(AbstractDynamicThreadPoolMonitor.java:45) ~[hippo4j-monitor-base-1.5.0.jar:1.5.0]
	at java.util.ArrayList.forEach(ArrayList.java:1259) ~[na:1.8.0_411]
	at cn.hippo4j.monitor.base.AbstractDynamicThreadPoolMonitor.collect(AbstractDynamicThreadPoolMonitor.java:45) ~[hippo4j-monitor-base-1.5.0.jar:1.5.0]
	at cn.hippo4j.config.springboot.starter.monitor.ThreadPoolMonitorExecutor.scheduleRunnable(ThreadPoolMonitorExecutor.java:93) ~[hippo4j-config-spring-boot-starter-1.5.0.jar:1.5.0]

How to reproduce

添加监控组件,关闭应用

Debug logs

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions