Jmeter:"An error occurred: Can't connect to X11 window server using 'lacalhost:12.0' as the value of the display variable." 解决办法
做各种不同项目的性能测试,都需要在项目本地压测服务器配置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." 解决办法的更多相关文章
- 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 ...
- 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 ...
- 【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 因为 ...
- 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
- Linux 下centos7启动 Tomcat 抛出Can't connect to X11 window server 问题的解决方法
1 问题 今天启动 Tomcat 后,登录页验证码不见了.在 localhost.xxx.log 发现以下错误: org.apache.catalina.core.StandardWrapperVal ...
- 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 ...
- Java在Linux下 不能处理图形的解决办法 Can't connect to X11 window server
java在图形处理时调用了本地的图形处理库.在利用Java作图形处理(比如:图片缩放,图片签名,生成报表)时,如果运行在windows上不会出问题.如果将程序移植到Linux/Unix上的时候有可能出 ...
- 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 ...
- 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 ...
- 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 ...
随机推荐
- 2022-09-10:以下go语言代码输出什么?A:编译错误;B:49.0;C:49。 package main import ( “fmt“ ) func main() { ch
2022-09-10:以下go语言代码输出什么?A:编译错误:B:49.0:C:49. package main import ( "fmt" ) func main() { ch ...
- 2021-10-02:单词搜索。给定一个 m x n 二维字符网格 board 和一个字符串单词 word 。如果 word 存在于网格中,返回 true ;否则,返回 false 。单词必须按照字母
2021-10-02:单词搜索.给定一个 m x n 二维字符网格 board 和一个字符串单词 word .如果 word 存在于网格中,返回 true :否则,返回 false .单词必须按照字母 ...
- Netty实战(一)
目录 第一章 Java网络编程 1.1 Java NIO 1.2 选择器 第二章 Netty是什么 2.1 Netty简介 2.2 Netty的特性 2.2.1 设计 2.2.2 易于使用 2.2.3 ...
- git push origin master 提示输入用户名和密码
今天更换了一台电脑,重新配置了SSH keys:但是在push得时候提示我输入用户名和密码 taodeMacBook-Pro:my_trip_proj tao$ git push origin mas ...
- Kali下压缩解压缩命令大全zip,tar,tar.gz,tar.bz2(转)
转自http://blog.csdn.net/yangjin_unique/article/details/7824852 tar 解包:tar xvf FileName.tar 打包:tar cvf ...
- ODOO13 之十 :Odoo 13开发之后台视图 – 设计用户界面
Odoo 13开发之后台视图 – 设计用户界面 本文将学习如何为用户创建图形化界面来与图书应用交互.我们将了解不同视图类型和小组件(widgets)之间的差别,以及如何使用它们来提供更优的用户体验. ...
- Django认证流程源码及自定义 Backend
Django自己的认证方法只能认证用户名和密码 user = authenticate(**credentials) # authenticate会自动校验用户名和密码 authenticate 源码 ...
- 使用CNI网络插件(calico)实现docker容器跨主机互联
目录 一.系统环境 二.前言 三.CNI网络插件简介 四.常见的几种CNI网络插件对比 五.Calico网络之间是如何通信的 六.配置calico让物理机A上的docker容器c1可以访问物理机B上的 ...
- 插件化工程R文件瘦身技术方案 | 京东云技术团队
随着业务的发展及版本迭代,客户端工程中不断增加新的业务逻辑.引入新的资源,随之而来的问题就是安装包体积变大,前期各个业务模块通过无用资源删减.大图压缩或转上云.AB实验业务逻辑下线或其他手段在降低包体 ...
- 6 种方式读取 Springboot 的配置,老鸟都这么玩(原理+实战)
大家好,我是小富- 从配置文件中获取属性应该是SpringBoot开发中最为常用的功能之一,但就是这么常用的功能,仍然有很多开发者在这个方面踩坑. 我整理了几种获取配置属性的方式,目的不仅是要让大家学 ...