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 ...
随机推荐
- Python中json.dump()和json.dumps()的区别
一.图解 json.dumps(dict, indent):将Python对象转换成json字符串 json.dump(dict, file_pointer):将Python对象写入json文件 二. ...
- SpringMVC 解决中文乱码问题以及前后端Json格式数据交互的测试
1.今日遇到的报错: 跳转网页出现404原因: 1.检查project structure里面的webapp路径是否正确: 2.检查project structure里的artifaccts里的WEB ...
- weexplus真机调试
一.连接真机 C:\Users\Lenovo>adb devices List of devices attached C9K7N15722004375 device 确定连接无误,否则执行we ...
- Java 泛型:理解和应用
概述 泛型是一种将类型参数化的动态机制,使用得到的话,可以从以下的方面提升的你的程序: 安全性:使用泛型可以使代码更加安全可靠,因为泛型提供了编译时的类型检查,使得编译器能够在编译阶段捕捉到类型错误. ...
- super在python 2.7和Python3中的使用
重写是继承机制中的重要内容,对于构造方法尤为重要.构造方法用来初始化新建对象的状态,大多数子类不仅要有自己的初始化代码,还要拥有超类的初始化代码.如果一个类的构造方法被重写,那么就需要调用超类的构造方 ...
- 【jmeter】测试socket接口的简单应用
一.场景 有一天开发问我,有没有什么工具可以测试socket,tcp,当时有点懵,这种需求还是少见 二.方法 使用Jmeter可以进行相关的测试 三.创建服务端环境 使用python搞个socket服 ...
- golang依赖注入工具digo
golang依赖注入工具 digo工具地址:https://github.com/werbenhu/digo 特性 使用注释中的注解 自动代码生成 自动检测循环依赖 编译时期依赖注入 自动初始化 支持 ...
- 为什么 Biopython 的在线 BLAST 这么慢?
用过网页版本 BLAST 的童鞋都会发现,提交的序列比对往往在几分钟,甚至几十秒就可以得到比对的结果:而通过调用 API 却要花费几十分钟或者更长的时间!这到底是为什么呢? NCBIWWW 基本用法 ...
- 如何让别人访问你本地允许的Vue本地项目
步骤一: 将config/index.js 中的host: localhost 改为 host:'0.0.0.0'步骤二:在package.json 将scripts 下面的dev 后 ...
- 20200825 BAT批处理文件详细教程
原文链接:https://www.jb51.net/article/151923.htm 纯转载.侵删. 第一章 批处理基础 第一节 常用批处理内部命令简介 批处理定义:顾名思义,批处理文件是将一系列 ...