java JVM 报C [libresolv.so.2+0x7e7d] __libc_res_nquery+0x4dd 解决

2020-09-15 10:16:52 浏览数 (2)

记一次内网环境报错

java 启动报错

代码语言:javascript复制
A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f74ab8e7e7d, pid=7345, tid=0x00007f74abefe700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_191-b12) (build 1.8.0_191-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.191-b12 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libresolv.so.2 0x7e7d]  __libc_res_nquery 0x4dd
#
# Core dump written. Default location: /home/sbtest/core or core.7345 (max size 1 kB). To ensure a full core dump, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/sbtest/hs_err_pid7345.log

日志查看

代码语言:javascript复制
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  java.net.Inet6AddressImpl.lookupAllHostAddr(Ljava/lang/String;)[Ljava/net/InetAddress; 0
j  java.net.InetAddress$2.lookupAllHostAddr(Ljava/lang/String;)[Ljava/net/InetAddress; 4
j  java.net.InetAddress.getAddressesFromNameService(Ljava/lang/String;Ljava/net/InetAddress;)[Ljava/net/InetAddress; 51
j  java.net.InetAddress.getAllByName0(Ljava/lang/String;Ljava/net/InetAddress;Z)[Ljava/net/InetAddress; 29
j  java.net.InetAddress.getAllByName(Ljava/lang/String;Ljava/net/InetAddress;)[Ljava/net/InetAddress; 383
j  java.net.InetAddress.getAllByName(Ljava/lang/String;)[Ljava/net/InetAddress; 2
j  java.net.InetAddress.getByName(Ljava/lang/String;)Ljava/net/InetAddress; 1
j  java.net.InetSocketAddress.<init>(Ljava/lang/String;I)V 15
j  sun.net.NetworkClient.doConnect(Ljava/lang/String;I)Ljava/net/Socket; 92
j  sun.net.www.http.HttpClient.openServer(Ljava/lang/String;I)V 4
j  sun.net.www.http.HttpClient.openServer()V 114
j  sun.net.www.http.HttpClient.<init>(Ljava/net/URL;Ljava/net/Proxy;I)V 125
j  sun.net.www.http.HttpClient.New(Ljava/net/URL;Ljava/net/Proxy;IZLsun/net/www/protocol/http/HttpURLConnection;)Lsun/net/www/http/HttpClient; 259
j  sun.net.www.http.HttpClient.New(Ljava/net/URL;Ljava/net/Proxy;ILsun/net/www/protocol/http/HttpURLConnection;)Lsun/net/www/http/HttpClient; 5
j  sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Ljava/net/URL;Ljava/net/Proxy;I)Lsun/net/www/http/HttpClient; 4
j  sun.net.www.protocol.http.HttpURLConnection.plainConnect0()V 357
j  sun.net.www.protocol.http.HttpURLConnection.plainConnect()V 71
j  sun.net.www.protocol.http.HttpURLConnection.connect()V 20
j  sun.net.www.protocol.http.HttpURLConnection.getInputStream0()Ljava/io/InputStream; 195
j  sun.net.www.protocol.http.HttpURLConnection.getInputStream()Ljava/io/InputStream; 52
j  org.quartz.utils.UpdateChecker.getUpdateProperties(Ljava/net/URL;)Ljava/util/Properties; 13
j  org.quartz.utils.UpdateChecker.doCheck()V 17
j  org.quartz.utils.UpdateChecker.checkForUpdate()V 1
j  org.quartz.utils.UpdateChecker.run()V 1
j  java.util.TimerThread.mainLoop()V 221
j  java.util.TimerThread.run()V 1
v  ~StubRoutines::call_stub

quartz 进行Quartz version update check failed 导致

解决方案禁用检查

1、启动参数中加入

代码语言:javascript复制
-Dorg.terracotta.quartz.skipUpdateCheck=true

2、bean 注入关闭

代码语言:javascript复制
<bean id="z" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
 <property name="triggers">
 <list></list>
 </property>
 <property name="quartzProperties"> 
 <props>
 <!-- 主要是这个参数 -->
 <prop key="org.quartz.scheduler.skipUpdateCheck">true</prop> 
 </props>
 </property>
 </bean>

3、在启动的时候main 上加入配置

代码语言:javascript复制
System.setProperty("org.terracotta.quartz.skipUpdateCheck","true");

0 人点赞