做各种不同项目的性能测试,都需要在项目本地压测服务器配置jmeter,需要时还要调出jmeter图形化界面来调试jmeter脚本。

标题中的问题遇过多次,这次做个记录。


1. 启动jmeter报错

  在配置好jmeter环境变量的linux系统执行jmeter命令,报错如下:

[root@localhost ~]# jmeter
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Don't use GUI mode for load testing !, only for Test creation and Test debugging.
For load testing, use CLI Mode (was NON GUI):
jmeter -n -t [jmx file] -l [results file] -e -a [Path to web report falder]
& increase Java Heap to meet your test requirements:
Modify current env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the jmeter batch file
Check:https://jmeter.apache.org/usermanual/best-practices.html
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
An error occurred: Can't connect to X11 window server using 'lacalhost:12.0' as the value of the display variable.

2. 解决问题

2.1 设置DISPLAY变量

[root@localhost ~]# export DISPLAY=:0.0

2.2 安装xhost 

[root@localhost ~]# yum -y install xhost 

  执行xhost+

[root@localhost ~]# xhost +

3. 启动jmeter

  至此,问题解决。执行jmeter命令启动图形化界面。

[root@localhost ~]# jmeter
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Don't use GUI mode for load testing !, only for Test creation and Test debugging.
For load testing, use CLI Mode (was NON GUI):
jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]
& increase Java Heap to meet your test requirements:
Modify current env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the jmeter batch file
Check :https://jmeter.apache.org/usermanual/best-practices.html
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Jun 12, 2023 10:59:54 AM com.kitfox.svg.Text buildText
WARNING: Could not create font Arial
Jun 12, 2023 10:59:54 AM com.kitfox.svg.Text buildText
WARNING: Could not create font Arial
Jun 12, 2023 10:59:54 AM com.kitfox.svg.Text buildText
WARNING: Could not create font Arial
Jun 12, 2023 10:59:54 AM com.kitfox.svg.Text buildText
WARNING: Could not create font Arial
Jun 12, 2023 10:59:54 AM com.kitfox.svg.Text buildText
WARNING: Could not create font Arial

类似问题。可参考:https://www.cnblogs.com/silgen/p/16668902.html

Jmeter:"An error occurred: Can't connect to X11 window server using 'lacalhost:12.0' as the value of the display variable." 解决办法的更多相关文章

  1. Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.

    刚刚在一台Linux服务器上安装了jdk和Tomcat,然后部署了一个web项目,在项目中有个添加图片的功能,保存图片时报错 org.springframework.web.util.NestedSe ...

  2. Linux启动应用(比如jmeter)报An error occurred: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.

    Linux启动应用(比如jmeter)报An error occurred: Can't connect to X11 window server using ':0.0' as the value ...

  3. 【java异常】org.springframework.web.util.NestedServletException: Handler processing failed;Can't connect to X11 window server using 'localhost:10.0' as the value of th

    tomcat工程中创建二维码失败.抛出异常Can't connect to X11 window server using 'localhost:10.0' as the value of th 因为 ...

  4. 23. Can't connect to X11 window server using '127.0.0.1:0.0' as the value of the DISPLAY variable.解决办法

    在终端里 以root用户执行 #xhost + 然后su - oracle 执行#export DISPLAY=:0 运行runinstaller

  5. Linux 下centos7启动 Tomcat 抛出Can't connect to X11 window server 问题的解决方法

    1 问题 今天启动 Tomcat 后,登录页验证码不见了.在 localhost.xxx.log 发现以下错误: org.apache.catalina.core.StandardWrapperVal ...

  6. oracle Can't connect to X11 window server using ':0.0' /Checking monitor: must be configured to display at least 256 colors解决方法

    Can't connect to X11 window server using ':0.0' 解决方法 1. 以oracle 用户登陆X window 或者 2. root 身份执行 # xhost ...

  7. Java在Linux下 不能处理图形的解决办法 Can't connect to X11 window server

    java在图形处理时调用了本地的图形处理库.在利用Java作图形处理(比如:图片缩放,图片签名,生成报表)时,如果运行在windows上不会出问题.如果将程序移植到Linux/Unix上的时候有可能出 ...

  8. Can't connect to X11 window server using ':1.0' as the value of the DISPLAY variable.

    安装oracle数据时需要用到图形界面安装,当我们用root用户登录后切换到oracle用户时运行./runInstaller提示报错: Can't connect to X11 window ser ...

  9. Linux上 Can't connect to X11 window server using XX as the value of the DISPLAY 错误解决方法

    在Linux上运行需要图形界面的程序时出现如下错误提示: No protocol specified Exception in thread "main" java.awt.AWT ...

  10. Can't connect to X11 window server using 'localhost:0.0' 的解决

    Can't connect to X11 window server using 'localhost:0.0' 的解决 http://lufei-99999.blog.163.com/blog/st ...

随机推荐

  1. vue项目使用rem布局刷新页面瞬间元素尺寸由小变大,页面闪现错乱样式

    vue项目使用px2remLoader插件,在index.html自定义设置font-size的大小,尤其是在首屏加载的时候,会出现页面各个元素尺寸由小变大的一个过程,很难看 刚开始一直在想是不是因为 ...

  2. 2023-04-28:将一个给定字符串 s 根据给定的行数 numRows 以从上往下、从左到右进行 Z 字形排列 比如输入字符串为 “PAYPALISHIRING“ 行数为 3 时,排列如下 P

    2023-04-28:将一个给定字符串 s 根据给定的行数 numRows 以从上往下.从左到右进行 Z 字形排列 比如输入字符串为 "PAYPALISHIRING" 行数为 3 ...

  3. 2023-04-23:给定你一个整数数组 nums 我们要将 nums 数组中的每个元素移动到 A 集合 或者 B 集合中 使得 A 集合和 B 集合不为空,并且 average(A) == aver

    2023-04-23:给定你一个整数数组 nums 我们要将 nums 数组中的每个元素移动到 A 集合 或者 B 集合中 使得 A 集合和 B 集合不为空,并且 average(A) == aver ...

  4. 2022-07-27:小红拿到了一个长度为N的数组arr,她准备只进行一次修改, 可以将数组中任意一个数arr[i],修改为不大于P的正数(修改后的数必须和原数不同), 并使得所有数之和为X的倍数。

    2022-07-27:小红拿到了一个长度为N的数组arr,她准备只进行一次修改, 可以将数组中任意一个数arr[i],修改为不大于P的正数(修改后的数必须和原数不同), 并使得所有数之和为X的倍数. ...

  5. 2021-03-23:给定一个正整数组成的无序数组arr,给定一个正整数值K,找到arr的所有子数组里,哪个子数组的累加和等于K并且是长度最大的。返回其长度。

    2021-03-23:给定一个正整数组成的无序数组arr,给定一个正整数值K,找到arr的所有子数组里,哪个子数组的累加和等于K并且是长度最大的.返回其长度. 福大大 答案2021-03-23: 双指 ...

  6. 2022-04-15:给定一个非负数组arr,学生依次坐在0~N-1位置,每个值表示学生的安静值, 如果在i位置安置插班生,那么i位置的安静值变成0,同时任何同学都会被影响到而减少安静值, 同学安静值

    2022-04-15:给定一个非负数组arr,学生依次坐在0~N-1位置,每个值表示学生的安静值, 如果在i位置安置插班生,那么i位置的安静值变成0,同时任何同学都会被影响到而减少安静值, 同学安静值 ...

  7. Hugging News #0512: 🤗 Transformers、🧨 Diffusers 更新,AI 游戏是下个新热点吗

    每一周,我们的同事都会向社区的成员们发布一些关于 Hugging Face 相关的更新,包括我们的产品和平台更新.社区活动.学习资源和内容更新.开源库和模型更新等,我们将其称之为「Hugging Ne ...

  8. pywin32和wmi的安装和测试

    E:\pyAPP\Madking\MadKingClient>python bin\NedStark.py collect_dataE:\pyAPP\Madking\MadKingClientT ...

  9. 2023-05-21:给定一个字符串 s 和一个整数 k 。你可以从 s 的前 k 个字母中选择一个, 并把它加到字符串的末尾。 返回 在应用上述步骤的任意数量的移动后,字典上最小的字符串。 输入:s

    2023-05-21:给定一个字符串 s 和一个整数 k .你可以从 s 的前 k 个字母中选择一个, 并把它加到字符串的末尾. 返回 在应用上述步骤的任意数量的移动后,字典上最小的字符串. 输入:s ...

  10. AcWing 278. 数字组合

    给定 N 个正整数 A1,A2,-,AN,从中选出若干个数,使它们的和为 M,求有多少种选择方案. 输入格式 第一行包含两个整数 N 和 M. 第二行包含 N 个整数,表示 A1,A2,-,AN. 输 ...