解决ServerAgent-2.2.3闪退问题
问题描述
Jmeter使用ServerAgent-2.2.3监控服务器时,运行脚本时就会闪退,错误日志如下:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000010014ed4, pid=11524, tid=11388
#
# JRE version: Java(TM) SE Runtime Environment (17.0.6+9) (build 17.0.6+9-LTS-190)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.6+9-LTS-190, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C [sigar-amd64-winnt.dll+0x14ed4]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
问题原因
ServerAgent-2.2.3与jdk版本不匹配导致
问题解决
方法一
替换安装目录下lib目录中的sigar-amd64-winnt.dll文件
文件下载地址:https://files.cnblogs.com/files/5ishare/sigar-amd64-winnt.rar?t=1694355788&download=true
方法二:
删除安装目录下lib目录中的 log4j.jar
在安装目录下lib目录中添加3个jar包如下:
log4j-1.2.12.jar
slf4j-api-1.7.5.jar
slf4j-log4j12-1.7.21.jar
方法三
在安装目录下新建一个文件夹,名为jre
下载一个老版本的jre到这个文件夹中
在安装目录下找到startAgent.bat文件(windows端,Linux端为startAgent.sh),右键编辑该文件,在@echo off下一行加上这句话:cd jre安装目录下的路径
例如:cd D:\Program Files\ServerAgent-2.2.3\JRE\bin