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

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


1. 启动jmeter报错

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

  1. [root@localhost ~]# jmeter
  2. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  3. Don't use GUI mode for load testing !, only for Test creation and Test debugging.
  4. For load testing, use CLI Mode (was NON GUI):
  5. jmeter -n -t [jmx file] -l [results file] -e -a [Path to web report falder]
  6. & increase Java Heap to meet your test requirements:
  7. Modify current env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the jmeter batch file
  8. Check:https://jmeter.apache.org/usermanual/best-practices.html
  9. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  10. 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变量

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

2.2 安装xhost 

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

  执行xhost+

  1. [root@localhost ~]# xhost +

3. 启动jmeter

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

  1. [root@localhost ~]# jmeter
  2. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  3. Don't use GUI mode for load testing !, only for Test creation and Test debugging.
  4. For load testing, use CLI Mode (was NON GUI):
  5. jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]
  6. & increase Java Heap to meet your test requirements:
  7. Modify current env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the jmeter batch file
  8. Check :https://jmeter.apache.org/usermanual/best-practices.html
  9. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  10. Jun 12, 2023 10:59:54 AM com.kitfox.svg.Text buildText
  11. WARNING: Could not create font Arial
  12. Jun 12, 2023 10:59:54 AM com.kitfox.svg.Text buildText
  13. WARNING: Could not create font Arial
  14. Jun 12, 2023 10:59:54 AM com.kitfox.svg.Text buildText
  15. WARNING: Could not create font Arial
  16. Jun 12, 2023 10:59:54 AM com.kitfox.svg.Text buildText
  17. WARNING: Could not create font Arial
  18. Jun 12, 2023 10:59:54 AM com.kitfox.svg.Text buildText
  19. 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. 2023-04-17:设计一个包含一些单词的特殊词典,并能够通过前缀和后缀来检索单词。 实现 WordFilter 类: WordFilter(string[] words) 使用词典中的单词 wor

    2023-04-17:设计一个包含一些单词的特殊词典,并能够通过前缀和后缀来检索单词. 实现 WordFilter 类: WordFilter(string[] words) 使用词典中的单词 wor ...

  2. 2020-12-02:mysql中,一张表里面有 ID 自增主键,当 insert 了 17 条记录之后,删除了第 15,16,17 条记录,再把 Mysql 重启,再 insert 一条记录,这条记

    2020-12-02:mysql中,一张表里面有 ID 自增主键,当 insert 了 17 条记录之后,删除了第 15,16,17 条记录,再把 Mysql 重启,再 insert 一条记录,这条记 ...

  3. uniapp开发企业微信应用中的定位问题记录

    项目背景:开发工具为HBuilderX,框架为uniapp,开发移动端的Web应用,在企业微信中使用(自建应用),Web开发的应用,不是小程序. 需求点:获取用户当前的位置信息,技术流程包括以下几个环 ...

  4. 百度飞桨(PaddlePaddle) - PaddleOCR 文字识别简单使用

    百度飞桨(PaddlePaddle)安装 OCR 文字检测(Differentiable Binarization --- DB) OCR的技术路线 PaddleHub 预训练模型的网络结构是 DB ...

  5. ET框架6.0分析三、网络通信

    概述 ET框架的消息机制贯彻始终,包含Entity消息(Awake,Update ...),自定义(Customer)消息,网络消息等.而ET系统的进程包含了客户端.Gate等各种类型的服务器,进程包 ...

  6. Isito 入门:为什么学 Istio、Istio 是什么

    1,Istio 概述 聊聊微服务设计 似乎用上 Kubernetes ,就是微服务系统了. 碰到很多人或公司盲目崇拜 Kubernetes ,一直喊着要上 Kubernetes,但是本身既没有技术储备 ...

  7. Android Studio中SQLite的使用,主要介绍sqlite插入和读出图片(ViewBinder)的操作方法

    sqlite简介 本人最近在写一个小的安卓项目,开发app过程中用到了安卓自带的sqlite.本文主要对sqlite图片操作进行介绍,其他存入文本之类的操作和普通数据库一样,众所周知,sqlite是一 ...

  8. GPT生成式预训练Transformer架构应用实战

    目录 1. 引言 2. 技术原理及概念 2.1 基本概念解释 2.2 技术原理介绍 2.3 相关技术比较 3. 实现步骤与流程 3.1 准备工作:环境配置与依赖安装 3.2 核心模块实现 3.3 集成 ...

  9. nacos连接不上配置的坑

    问题: 今天在使用nacos时,发现怎么样都连接不上配置 思路: 毋庸置疑这个肯定是配置问题,下面是我现在的配置 nacos: username: nacos password: nacos serv ...

  10. 实例讲解看nsenter带你“上帝视角”看网络

    摘要:本文重点关注进入目标进程的"网络ns"视角,即站在「容器中的进程视角」看待容器里面的网络世界,并在那个视角中执行命令. 本文分享自华为云社区<<跟唐老师学习云网络 ...