You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2021/08/27 08:41:24 UTC

[Bug 65522] New: jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

            Bug ID: 65522
           Summary: jmeter script file is named with a file name that
                    contains English, Chinese, and spaces, it will cause
                    jmeter to fail to restart.
           Product: JMeter
           Version: 5.4.1
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: czhongbao2020@gmail.com
  Target Milestone: JMETER_5.5

Steps to reproduce:
                 1. Make a file name "shell 脚本.jmx".
                 2. Use jmeter5.4.1 to open the file.
                 3. Select file  - >  restart option
Desired result:
                   The restart is successful, you can see the gui.
actual results:
                jmeter did not restart



Both jmeter5.3 and jmeter 5.4.1 found this error.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Status|NEW                         |NEEDINFO

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
Thanks for the report. I can't reproduce the problem with a current build from
trunk under Ubuntu (utf-8 as character set).

Have you tried a current build from trunk
(https://jmeter.apache.org/nightly.html )?

What is your exact setup? (JVM, OS, character set)
Are there any errors logged in jmeter.log or on the console (if you started
JMeter from a console)?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

--- Comment #10 from chazhongbao <cz...@gmail.com> ---
Yes, removing the spaces can solve the problem, but if the bug can be fixed, it
would be even better.But fixing it may be a bit difficult for me.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

chazhongbao <cz...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEEDINFO                    |RESOLVED

--- Comment #12 from chazhongbao <cz...@gmail.com> ---
After verification, the problem has been resolved

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

chazhongbao <cz...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |czhongbao2020@gmail.com

--- Comment #3 from chazhongbao <cz...@gmail.com> ---
Created attachment 37999
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37999&action=edit
jmeter  restart  log

After the jmeter log mode is adjusted from info to debug, please check the
output log.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #7 from Felix Schumacher <fe...@internetallee.de> ---
Can you try if setting JAVA_HOME to "dos short names" or any path, that has no
space in it?

Maybe it helps to have a setenv.bat in the bin directory of your jmeter
installation with the following content (if JAVA_HOME is set before start of
jmeter):

set JAVA_HOME=%~sJAVA_HOME%

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

--- Comment #9 from Felix Schumacher <fe...@internetallee.de> ---
OK, I can reproduce this when JMeter is started with "-t 'plan with
space.jmx'". The problem here is, that the restart logic has no knowledge of
the parameters at the time when preparing the restart. So it fails to escape
the spaces.

Same thing would happen, if you would use any other starting parameter with
spaces in it, like specifying a log file that contains spaces.

As a workaround stop using spaces in file names :) If you want to work on a
fix, look into Restart.java in core
(https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/gui/action/Restart.java)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #4 from Felix Schumacher <fe...@internetallee.de> ---
What is the path to your Java installation?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

chazhongbao <cz...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #8 from chazhongbao <cz...@gmail.com> ---
I reinstalled java, there is no space in the installation path, the problem
still exists. I think it is not a java environment problem. After removing the
spaces in the file name, restart jmeter normally. This should be an exception
when reading the jmx file during the restart, but I did not see an error log in
jmeter.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #11 from Felix Schumacher <fe...@internetallee.de> ---
I applied a fix (hopefully) to trunk. Can you test next nightly or built from
trunk (https://jmeter.apache.org/nightly.html )?

commit b9cbab843b13f1d4c61e93ce4b87bff3ef995b66
AuthorDate: Sun Aug 29 17:19:00 2021 +0200

    Restart does not work when parameters contain spaces

    Try to re-combine the parameters to regard spaces in file names

    Java command line has no knowledge of the 'real' parameters and
    we have to do a bit of guessing to re-assemble the parameters with
    spaces and the drop the spaces, that should split the parameters.

    So we guess, that each parameter starts with a dash (-) and
    everything else are values, that should be stitched together.

    Bugzilla Id: 65522
---
 .../java/org/apache/jmeter/gui/action/Restart.java | 70 +++++++++++++++++-----
 xdocs/changes.xml                                  |  1 +
 2 files changed, 57 insertions(+), 14 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

--- Comment #6 from chazhongbao <cz...@gmail.com> ---
Created attachment 38000
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38000&action=edit
File name screenshot

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

chazhongbao <cz...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #2 from chazhongbao <cz...@gmail.com> ---

OS information:
Version Windows 10 Home Chinese Version
Version number 21H1
Installation date ‎2021/‎8/‎1
Operating system internal version 19043.1165
Serial number YX029CKY
Experience Windows Feature Experience Pack 120.2212.3530.0

jdk  version:
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)



jmeter 5.4.1   download    from  https://jmeter.apache.org/download_jmeter.cgi 
 page 

After clicking the restart button, jmeter exited the program, but did not
restart, and there was no abnormal output in the jmeter log.

Can this information help you?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65522] jmeter script file is named with a file name that contains English, Chinese, and spaces, it will cause jmeter to fail to restart.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65522

chazhongbao <cz...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #5 from chazhongbao <cz...@gmail.com> ---
JAVA HOME    :              C:\Program FilesVava\jdk1.8.0_131

CLASSPATH    :              ;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar

path          :              %JAVA_HOME%\jre\bin

-- 
You are receiving this mail because:
You are the assignee for the bug.