自学内容网 自学内容网

xxl-job没有启动导致业务系统出现异常

2024-02-28 09:57:52 [registrationTask1] ERROR o.s.s.s.TaskUtils$LoggingErrorHandler
 - Unexpected error occurred in scheduled task
java.lang.IllegalArgumentException: dcf958460e95: dcf958460e95: System error
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.getLocalHost(DefaultApplicationFactory.java:186)
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.getServiceHost(DefaultApplicationFactory.java:168)
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.getServiceBaseUrl(DefaultApplicationFactory.java:103)
        at de.codecentric.boot.admin.client.registration.ServletApplicationFactory.getServiceUrl(ServletApplicationFactory.java:63)
        at de.codecentric.boot.admin.client.registration.ServletApplicationFactory.getManagementBaseUrl(ServletApplicationFactory.java:76)
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.getHealthUrl(DefaultApplicationFactory.java:154)
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.createApplication(DefaultApplicationFactory.java:80)
        at de.codecentric.boot.admin.client.registration.DefaultApplicationRegistrator.register(DefaultApplicationRegistrator.java:56)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.net.UnknownHostException: dcf958460e95: dcf958460e95: System error
        at java.net.InetAddress.getLocalHost(InetAddress.java:1512)
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.getLocalHost(DefaultApplicationFactory.java:183)
        ... 15 common frames omitted
Caused by: java.net.UnknownHostException: dcf958460e95: System error
        at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1330)
        at java.net.InetAddress.getLocalHost(InetAddress.java:1507)
        ... 16 common frames omitted
2024-02-28 09:57:57 [XNIO-1 Accept] WARN  org.xnio.nio
 - XNIO008001: Socket accept failed, backing off for 30000 milliseconds: java.io.IOException: Too many open files
2024-02-28 09:58:09 [xxl-job, executor ExecutorRegistryThread] ERROR c.x.job.core.util.XxlJobRemotingUtil
 - Connection refused (Connection refused)
java.net.ConnectException: Connection refused (Connection refused)
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:607)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
        at sun.net.www.http.HttpClient.New(HttpClient.java:339)
        at sun.net.www.http.HttpClient.New(HttpClient.java:357)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1228)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990)
        at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:99)
        at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:42)
        at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48)
        at java.lang.Thread.run(Thread.java:750)

如果xxl-job没有启动导致业务系统请求io异常,如果异常没有把io关闭,最终导致backing off for 30000 milliseconds: java.io.IOException: Too many open files,业务系统的io被耗尽,系统无法继续响应。

解决方法:

1、保证xxl-job定时任务服务正常

2、关闭业务系统xxl-job服务的调用


原文地址:https://blog.csdn.net/pianjiao006/article/details/136338529

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!