๐ Welcome to my GitHub profile!
justb4 / docker-jmeter Goto Github PK
View Code? Open in Web Editor NEWDocker image for Apache JMeter
License: MIT License
Docker image for Apache JMeter
License: MIT License
Hello,
I am trying to create a dockerfile that references the justb4/jmeter image and uses that to run a jmeter script that I have saved locally on my machine. When I go to the directory on my device where my dockerfile is located and do the command 'docker build -< Dockerfile', it builds successfully. However when I run it, it will output the following:
START Running Jmeter on Thu Aug 8 13:25:25 UTC 2019
JVM_ARGS=-Xmn260m -Xms1040m -Xmx1040m
jmeter args=/bin/sh -c jmeter /path/to/jmeter/script.jmx
Error: Unknown option -c
The 'jmeter /path/to/jmeter/script.jmx' is the command I have inside of my Dockerfile as it is the same command I use to run the script on my terminal. That file contains these lines:
FROM justb4/jmeter
CMD jmeter /path/to/jmeter/script.jmx
Is the -c there intentionally and if so where is it located? I was going to see if removing that flag would get the Dockerfile to run properly. I am on MAC OSX Mojave so I'm also curious if that is part of the issue here. Could be that it isn't available on MAC Terminal (just a guess).
While running jmeter examples and storing result in testresult.jtl
docker run bd547e9cfd67 -n -t bin/examples/CSVSample.jmx -l .bin/examples/runresult.jtl
I am not able to see it makes runresult.jtl or not howver while trying to fetch it in my HOST PC from container
I am not able to find it.
check this image for running container with jmeter
check this image when container got stopped and I am trying to extract file from stopped container to my HOST PC
Hi,
Any chance this should be using JMETER_HOME instead of (pwd) ?
Line 12 in bdf60f7
It works fine as long as I don't set the -w argument while spinning off the docker instance.
Once adding the -w argument, as in the examples, it copies the plugins to the wrong folder.
Or else I'm getting the usage wrong.
The Docker JMeter Image has like 7 Million Pulls. In order to keep maintenance funded add a FUNDING.yml Paypal file.
Would it make sense to have JMeter version in a variable that can be referenced in the various files, so that it only has to changed in one place?
I am trying to execute ./test.sh and ./run.sh but it asks for a password. Where do I find it? Is docker-jmeter restricted or for public use?
I need the image timezone to be different than Europe/Amsterdam.
Any plans to implement it anytime soon?
Jmeter_Download_URL no longer contains default JMETER_VERSION=3.3. Also it appers 5.0 has some profomance changes
jmeter keeps crashing on me when I run the GUI. The only hint is given by this in the output of docker log
Uncaught Exception java.lang.UnsupportedOperationException: PERPIXEL_TRANSLUCENT translucency is not supported in thread
Related issue: since the container stops when jmeter crashes, and since the log file is re-created every start, I have no easy way of seeing the contents of that file, post-mortem. (docker cp
to the rescue I suppose.)
OS: Mac (Monterey)
Docker: Docker-Desktop, engine v20.10.5
justb4/jmeter build: "org.opencontainers.image.revision": "aea50b54389e681ee891cddc35454c2530e00d94",
image creation date: 2022-06-03T20:04:49Z
https://hub.docker.com/r/justb4/jmeter/ the build.sh link does not work.
These are all avail now: upgrade. Also use Docker Image tags and make Docker Image slimmer by combining RUN
s.
I am kind of new to GitHub, so please bear with me.
I saw some discussion about support for JMeter plugins, but I do not see a plugins directory as you suggested.
Am I missing something?
At present, I was going to create my own Docker image, based on this one, that retrieves and installs plugins.
Thanks for making this.
Hi,
Any changes to the docker image planned for this vulnerability? I saw that version 2.13 is used.
Thanks!
Hi,
I have changed the test.sh file in order to include few jmeter parameters in the jmeter command.
But, when I try to execute, it gives me an error
Getting error "jmeter requires the checksum of saveservice properties" while running the test
Any idea how to fix it? @justb4
I am totally stuck for now.
Thanks,
Nishant Shah
Hi,
I'm running jmeter tests as part of my CI pipeline and I'd like to create artifacts from it's results/output. I'd like to run justb4/jmeter under a service user as without running it under the service user, the output files are created as root and can't be removed from the runner host by the service user. The service user does not have sudo right. Do you have any ideas how I could fix it? Currently, I use the --user option the following way:
docker run -u $(id -u ${USER}):$(id -g ${USER}) --volume ${{ github.workspace }}/utils:/tmp/ --volume ${{ runner.temp }}/${{ github.run_number }}/:/results justb4/jmeter -n -t /tmp/jmeter/qst_child_questions.jmx -l /results/qst_test_report.csv -e -o /results/html -Jthreads=1 -Jcsvfile=/tmp/jmeter/panda02_config.csv -JquestionCount=1 -JchildQuestionCount=200
This gives me the following output:
START Running Jmeter on Tue Jan 17 14:29:32 CET 2023
JVM_ARGS=-Xmn1274m -Xms5096m -Xmx5096m
jmeter args=-n -t /tmp/jmeter/qst_child_questions.jmx -l /results/qst_test_report.csv -e -o /results/html -Jthreads=1 -Jcsvfile=/tmp/jmeter/questionnaires_panda02_config.csv -JquestionCount=1 -JchildQuestionCount=200
jmeter ALL ARGS=-Dlog4j2.formatMsgNoLookups=true -n -t /tmp/jmeter/qst_child_questions.jmx -l /results/qst_test_report.csv -e -o /results/html -Jthreads=1 -Jcsvfile=/tmp/jmeter/questionnaires_panda02_config.csv -JquestionCount=1 -JchildQuestionCount=200
2023-01-17 14:29:33,434 main ERROR FileManager (jmeter.log) java.io.FileNotFoundException: jmeter.log (Permission denied) java.io.FileNotFoundException: jmeter.log (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory.createManager(FileManager.java:43[8](https://github.com/DiligentCorp/questionnaires-service/actions/runs/3939722738/jobs/6739911345#step:4:9))
at org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory.createManager(FileManager.java:422)
at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:144)
at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
at org.apache.logging.log4j.core.appender.FileManager.getFileManager(FileManager.java:182)
at org.apache.logging.log4j.core.appender.FileAppender$Builder.build(FileAppender.java:[9](https://github.com/DiligentCorp/questionnaires-service/actions/runs/3939722738/jobs/6739911345#step:4:10)6)
at org.apache.logging.log4j.core.appender.FileAppender$Builder.build(FileAppender.java:52)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:124)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1122)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:[10](https://github.com/DiligentCorp/questionnaires-service/actions/runs/3939722738/jobs/6739911345#step:4:11)47)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1039)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:249)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:295)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:621)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:694)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:7[11](https://github.com/DiligentCorp/questionnaires-service/actions/runs/3939722738/jobs/6739911345#step:4:12))
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:253)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:55)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at org.apache.jmeter.JMeter.<clinit>(JMeter.java:113)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.jmeter.NewDriver.main(NewDriver.java:257)
2023-01-17 14:29:33,444 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.FileAppender for element File: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory@5e0826e7] unable to create manager for [jmeter.log] with data [org.apache.logging.log4j.core.appender.FileManager$FactoryData@32eff876] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory@5e0826e7] unable to create manager for [jmeter.log] with data [org.apache.logging.log4j.core.appender.FileManager$FactoryData@32eff876]
at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:146)
at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
at org.apache.logging.log4j.core.appender.FileManager.getFileManager(FileManager.java:182)
at org.apache.logging.log4j.core.appender.FileAppender$Builder.build(FileAppender.java:96)
at org.apache.logging.log4j.core.appender.FileAppender$Builder.build(FileAppender.java:52)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:[12](https://github.com/DiligentCorp/questionnaires-service/actions/runs/3939722738/jobs/6739911345#step:4:13)4)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1122)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1047)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1039)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:249)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:295)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:621)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:694)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:711)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:253)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:[13](https://github.com/DiligentCorp/questionnaires-service/actions/runs/3939722738/jobs/6739911345#step:4:14)7)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:55)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at org.apache.jmeter.JMeter.<clinit>(JMeter.java:113)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.jmeter.NewDriver.main(NewDriver.java:257)
2023-01-17 [14](https://github.com/DiligentCorp/questionnaires-service/actions/runs/3939722738/jobs/6739911345#step:4:15):29:33,447 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.FileAppender for element File: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.FileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.FileAppender
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:238)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:136)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1122)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1047)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1039)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:249)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:295)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:621)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:694)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:711)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:253)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:[15](https://github.com/DiligentCorp/questionnaires-service/actions/runs/3939722738/jobs/6739911345#step:4:16)5)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:[19](https://github.com/DiligentCorp/questionnaires-service/actions/runs/3939722738/jobs/6739911345#step:4:20)6)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:55)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at org.apache.jmeter.JMeter.<clinit>(JMeter.java:113)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:4[23](https://github.com/DiligentCorp/questionnaires-service/actions/runs/3939722738/jobs/6739911345#step:4:24))
at org.apache.jmeter.NewDriver.main(NewDriver.java:[25](https://github.com/DiligentCorp/questionnaires-service/actions/runs/3939722738/jobs/6739911345#step:4:26)7)
HI,
While running the JMeter with Docker, normal command works fine. But when I pass variables in the command using -D or -J or -S property file, am able to run the JMeter and JTL file gets stored. Test is successful, but JVM is not getting exited. Please suggest how to resolve this issue.
Command Used :
docker run --mount type=bind,source="C:/Users/chitt/OneDrive/Documents/",target="/opt/apache-jmeter-5.4/bin" justb4/jmeter -n -t /opt/apache-jmeter-5.4/bin/FarmGo_PerformanceTesting_Script.jmx -l /opt/apache-jmeter-5.4/bin/DebugSampler9.jtl -S /opt/apache-jmeter-5.4/bin/Properties.txt
Even when i pass parameter using -D or -J , same error i observe but test is successful
. attached the screenshot for reference.
Executed as mentioned in ec2, not able to figure out why it is refereeing **/tmp/hsperfdata_root/**tests/trivial/test-plan.jmx doesn't exist or can't be opened
JVM_ARGS=-Xmn1280m -Xms5120m -Xmx5120m
jmeter args=-Dlog_level.jmeter=DEBUG -JTARGET_HOST=www.map5.nl -JTARGET_PORT=80 -JTARGET_PATH=/kaarten.html -JTARGET_KEYWORD=Kaartdiensten -n -t tests/trivial/test-plan.jmx -l tests/trivial/test-plan.jtl -j tests/trivial/jmeter.log -e -o tests/trivial/report
Jun 15, 2021 7:59:47 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
An error occurred: The file /tmp/hsperfdata_root/tests/trivial/test-plan.jmx doesn't exist or can't be opened
==== jmeter.log ====
cat: tests/trivial/jmeter.log: No such file or directory
==== Raw Test Report ====
cat: tests/trivial/test-plan.jtl: No such file or directory
==== HTML Test Report ====
See HTML test report in tests/trivial/report/index.html
Would it be possible to upgrade to the latest version of Jmeter which has groovy 3 support?
Thank you for the useful Docker image.
I can't see a link in README.md
See also: https://www.novatec-gmbh.de/en/blog/how-to-pass-command-line-properties-to-a-jmeter-testplan/ption
I want to run my own jmeter, but it showed this issue.
CannotResolveClassException: org.apache.jmeter.protocol.ssh.sampler.SSHCommandSampler
The computation for memory usage is incorrect in
Line 18 in 7a98d42
as that will give the system's memory rather than the container's limit memory.
In fact with newer JDKs there's no need to set it explicitly, instead you can let it compute it automatically. But don't that's also not good as it defaults to 25% of RAM that is allocated by default.
Instead specify the percentage usually 80% is good. -XX:MaxRAMPercentage=80
Here's how I used it https://github.com/trajano/spring-cloud-demo/blob/12deda06f3fb9c4101b4d4cf3c623a3001bd10d8/Dockerfile#L45
However, this would need to have an upgrade of the JDK as JDK8 does not support the parameter.
A workaround to this would be to use /sys/fs/cgroup/memory/memory.limit_in_bytes
You can verify this by
docker run --memory=1g --entrypoint /bin/cat -it justb4/jmeter /sys/fs/cgroup/memory/memory.limit_in_bytes
I have tried to execute jmeter test plan using below command,
sudo docker run --mount type=bind,source="/home/ubuntu/",target="/opt/apache-jmeter-5.4/bin" justb4/jmeter -n -t /home/ubuntu/SampleAPITest.jmx -l /home/ubuntu/testrun.jtl
and got the below error message that the file doesn't exist/can't be opened,
START Running Jmeter on Tue Jun 1 10:05:31 CEST 2021
JVM_ARGS=-Xmn28m -Xms112m -Xmx112m
jmeter args=-n -t /home/ubuntu/SampleAPITest.jmx -l /home/ubuntu/testrun.jtl
Jun 01, 2021 10:05:33 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
An error occurred: The file /home/ubuntu/SampleAPITest.jmx doesn't exist or can't be opened
Please note : The file SampleAPITest.jmx exists in the given path and it can be opened using cat or vi command.
SampleAPITest.zip
docker-jmeter 5.4 still depends on Java 8. Assuming most want to rely on LTS versions, both Java 11 and 17 are available for some time.
I haven't been able to upgrade Java using https://docs.docker.com/develop/develop-images/multistage-build/ yet, it seems quite hard.
(we're using a JMS driver that requires Java 11, hence this is a blocker)
Also I wonder why this image doesn't use any JDK as base, that would at least offer the opportunity to make this docker image reproducible.
As inspiration you might want to have a look at https://github.com/carlossg/docker-maven
Hello,
I took the entrypoint.sh to set up a docker image, i have created the dockerfile for jmeter, with the entrypoint.sh that you've provided.
the image build passes successfully, as following :
docker build -f Dockerfile-jmeter --build-arg <proxy> -t alpine.jmeter .
and i get my image
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine.jmeter latest ae5d190b10fc 26 minutes ago 889MB
how ever, in the moment when i want to run the image in a contianer, using command line
docker run --name alpine.jmeter -it alpine.jmeter
i get the following issue
/jmeter-entrypoint.sh: line 13: JVM_XMN: parameter not set
and its these parameter right here
[[ -z ${JVM_XMN} ]] && JVM_XMN=$(($freeMem/10*2))
[[ -z ${JVM_XMS} ]] && JVM_XMS=$(($freeMem/10*8))
[[ -z ${JVM_XMX} ]] && JVM_XMX=$(($freeMem/10*8))
can you help ?
thank you in advance,
Hello, I believe this URL no longer points to the right location.
See also: http://blog.novatec-gmbh.de/how-to-pass-command-line-properties-to-a-jmeter-testplan/
Thanks for the useful Docker image. I'm just diving into JMeter for a project and I'd like to be able to run the GUI to help build the tests, but then run them via command line. How would one go about running this container and using the GUI through X11?
Hello,
I am trying to create a dockerfile that references the justb4/jmeter image and uses that to run a jmeter script that I have saved locally on my machine. When I go to the directory on my device where my dockerfile is located and do the command 'docker build -< Dockerfile', it builds successfully. However when I run it, it will output the following:
START Running Jmeter on Thu Aug 8 13:25:25 UTC 2019
JVM_ARGS=-Xmn9640m -Xms38560m -Xmx38560m
jmeter args=sh -c if [ -x /usr/local/bin/bash ]; then
24 exec /usr/local/bin/bash
Error: Unknown option -c
Is the -c there intentionally?
DockerHub now requires Pro subscription (Open Source waiver is still in progress). But also for quicker CI/CD GitHub Workflows is a better option. Like the other Docker Images as GeoHealthCheck example:
https://github.com/geopython/GeoHealthCheck/blob/master/.github/workflows/docker.yml
I am trying simple jmeter test but want jtl log file in my host machine.
so tried to run image with --mount and -v command.
docker run --mount type=bind,source="E:/xxxxxx/dockerContent",target="/opt/apache-jmeter-5.3/bin" jmeter -n -t bin/examples/CSVSample.jmx -l bin/example-run1.jtl
docker run -v E/xxxxxxxx/dockerContent:/opt/apache-jmeter-5.3/bin jmeter -n -t bin/examples/CSVSample.jmx -l bin/example-run1.jtl
but both throws following error error
START Running Jmeter on Sun Jun 6 12:46:08 CEST 2021
JVM_ARGS=-Xmn2138m -Xms8552m -Xmx8552m
jmeter args=-n -t bin/example.jmx -l bin/example-run1.jtl
/entrypoint.sh: line 29: jmeter: command not found
why it is so?
When I run your files, I got this error message.
An error occurred:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
Does anyone face the same problem?
Hi,
I am trying to build the docker image through the steps mentioned in your portal, But i am getting connection refused error in docker build command
I have used git bash to run the commands
1.git clone https://github.com/justb4/docker-jmeter.git
cd docker-jmeter
2. ./build.sh - but it throws some error so i have given the below command
$ docker build --build-arg JMETER_VERSION=5.1.1 -t "justb4/jmeter" .
i got an error in build command stating like run command returned non-zero
"The command '/bin/sh -c curl -L --silent ${JMETER_DOWNLOAD_URL} > /tmp/dependencies/apache-jmeter-${JMETER_VERSION}.tgz' returned a non-zero code: 7
"
I have tried editing the below lines and reran the command
RUN apk update
&& apk upgrade
&& apk add ca-certificates
&& update-ca-certificates
&& apk add --update openjdk8-jre tzdata curl unzip bash
&& rm -rf /var/cache/apk/*
&& mkdir -p /tmp/dependencies
&& curl -L --silent ${JMETER_DOWNLOAD_URL} > /tmp/dependencies/apache-jmeter-${JMETER_VERSION}.tgz
&& mkdir -p /opt
&& tar -xzf /tmp/dependencies/apache-jmeter-${JMETER_VERSION}.tgz -C /opt
&& rm -rf /tmp/dependencies
where i could see the connection refused error
Step 17/26 : RUN wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.1.1.tgz
---> Running in ec3d762ec007
Connecting to archive.apache.org (163.172.17.199:443)
wget: can't connect to remote host (163.172.17.199): Connection refused
The command '/bin/sh -c wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.1.1.tgz' returned a non-zero code: 1
But if i tried to open the same url in browser it starts downloading.
I have tried in many possibilities but still no luck from my end. Can anyone help me here
This is my docker file
FROM alpine:3.9
MAINTAINER Just van den Broecke[email protected]
ARG JMETER_VERSION="5.1.1"
ENV JMETER_HOME /opt/apache-jmeter-${JMETER_VERSION}
ENV JMETER_BIN ${JMETER_HOME}/bin
ENV JMETER_DOWNLOAD_URL https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-${JMETER_VERSION}.tgz
ARG TZ="Europe/Amsterdam"
RUN apk update
RUN apk upgrade
RUN apk add ca-certificates
RUN update-ca-certificates
RUN apk add --update openjdk8-jre tzdata curl unzip bash
RUN apk add --no-cache nss
RUN rm -rf /var/cache/apk/*
RUN mkdir -p /tmp/dependencies
RUN curl -L --silent ${JMETER_DOWNLOAD_URL} > /tmp/dependencies/apache-jmeter-${JMETER_VERSION}.tgz
RUN mkdir -p /opt
RUN tar -xzf /tmp/dependencies/apache-jmeter-${JMETER_VERSION}.tgz -C /opt
RUN rm -rf /tmp/dependencies
ENV PATH $PATH:$JMETER_BIN
COPY entrypoint.sh /
WORKDIR ${JMETER_HOME}
ENTRYPOINT ["/entrypoint.sh"]
Thanks,
Sindhuja
My testplans were/are running fine against https servers with justb4/jmeter:3.3
but with latest
(i.e. jmeter 5) I get this now:
Uncaught Exception java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLSessionImpl. See log file for details.
I'm trying to build the Dockerfile, and getting the following error:
The command '/bin/sh -c apk update && apk upgrade && apk add ca-certificates && update-ca-certificates 2>/dev/null || true && apk add --update openjdk8-jre tzdata curl unzip bash && rm -rf /var/cache/apk/* && mkdir -p /tmp/dependencies && curl -L --silent ${JMETER_DOWNLOAD_URL} > /tmp/dependencies/apache-jmeter-${JMETER_VERSION}.tgz && mkdir -p /opt && tar -xzf /tmp/dependencies/apache-jmeter-${JMETER_VERSION}.tgz -C /opt && rm -rf /tmp/dependencies' returned a non-zero code: 35
Please, can you guys help me?
hi
I need some plugins in jmeter.
Any plans to add plugins setting functional?
Would be nice if you could tag a fixed version with custom plugins (not only latest).
Thanks
Version 5.4 is the latest and a stable version of jmeter.
Couldn't be added as the latest ?
Hello team,
Could you please add ARM support for justb4/jmeter
Docker image? Our customers are facing issues because jmeter does not run on ARM-based systems.
Thank you!
The logic:
freeMem=awk '/MemFree/ { print int($2/1024) }' /proc/meminfo
...
export JVM_ARGS="-Xmn${n}m -Xms${s}m -Xmx${x}m"
jmeter $@
seems not set the correct Xms/Xmx. It is always 1g.
jmeter(not jmeter.sh) doesn't honor the JVM_ARGS . Is it?
Hi
I test my JMX configuration i have got below exceptions from docker images.
root@ip-172-21-123-216 roles]# docker logs -f a783b4594fec
START Running Jmeter on Tue Apr 30 15:37:13 +03 2019
JVM_ARGS=-Xmn34988m -Xms139952m -Xmx139952m
jmeter args=-s -n -Jclient.rmi.localport=7000 -Jserver.rmi.localport=60000 -JCookieManager.save.cookies=true -Jserver.rmi.ssl.disable=true
Apr 30, 2019 3:37:15 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Using local port: 60000
Created remote object: UnicastServerRef2 [liveRef: [endpoint:172.18.0.10:60000,objID:[25669600:16a6e3fc92c:-7fff, 7522892051062824289]]]
Starting the test on host slave-6 @ Tue Apr 30 15:37:40 EET 2019 (1556627860302)
Uncaught Exception java.lang.ExceptionInInitializerError. See log file for details.
Uncaught Exception java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLSessionImpl. See log file for details.
Uncaught Exception java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLSessionImpl. See log file for details.
Finished the test on host slave-6 @ Tue Apr 30 15:37:44 EET 2019 (1556627864302)
Do you have any idea ?
Team,
Is there any similar image available for windows Docker. I tried getting this image for windows but no luck.
Cheers.
-Saravanan S
cp does not seem to be working when I try to run:
/jmeter_test_plan$ sudo docker run --rm --name jmeter -i -v /plugins:/plugins -v ${PWD}:${PWD} -w ${PWD} justb4/jmeter -n -t publish_mqtt_broker_with_delay.jmx -q publish_mqtt_broker_with_delay.properties
cp: can't stat '/plugins/*.jar': No such file or directory
The entry point script currently uses MemFree
to determine how much memory is available on the node. The amount of memory reported by this metric only includes the memory that is not used for any purpose, which means that it also excludes the memory used for caches. Linux likes to keep free memory occupied with cached files to reduce latency, which results in a low MemFree
number.
The MemAvailable
metric could be used instead, since it also includes the cache, that is automatically flushed when more memory is required for applications.
I'm trying to use the image in Kubernetes to automate Jmeter tests, but I am running into some odd permission problems regarding the Jmeter log files. See the issue in the following example:
Command:
docker run --volume `pwd`:/keptn/jmeter -n -t /keptn/jmeter/basiccheck.jmx -JSERVER_URL=`printf -- "%s" "${HOST##*/}"` -l /keptn/jmeter/log.jtl
Error Message:
2021-06-22 17:58:11,819 main ERROR FileManager (jmeter.log) java.io.FileNotFoundException: jmeter.log (Permission denied) java.io.FileNotFoundException: jmeter.log (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory.createManager(FileManager.java:434)
at org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory.createManager(FileManager.java:418)
at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:113)
at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
at org.apache.logging.log4j.core.appender.FileManager.getFileManager(FileManager.java:182)
at org.apache.logging.log4j.core.appender.FileAppender$Builder.build(FileAppender.java:96)
at org.apache.logging.log4j.core.appender.FileAppender$Builder.build(FileAppender.java:52)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1002)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:942)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:934)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:552)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:241)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:288)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:618)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:691)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:708)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:138)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:45)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:48)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at org.apache.jmeter.JMeter.<clinit>(JMeter.java:124)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.jmeter.NewDriver.main(NewDriver.java:250)
2021-06-22 17:58:11,829 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.FileAppender for element File: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory@c33b74f] unable to create manager for [jmeter.log] with data [org.apache.logging.log4j.core.appender.FileManager$FactoryData@130161f7] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory@c33b74f] unable to create manager for [jmeter.log] with data [org.apache.logging.log4j.core.appender.FileManager$FactoryData@130161f7]
at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:115)
at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
at org.apache.logging.log4j.core.appender.FileManager.getFileManager(FileManager.java:182)
at org.apache.logging.log4j.core.appender.FileAppender$Builder.build(FileAppender.java:96)
at org.apache.logging.log4j.core.appender.FileAppender$Builder.build(FileAppender.java:52)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1002)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:942)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:934)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:552)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:241)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:288)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:618)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:691)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:708)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:138)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:45)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:48)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at org.apache.jmeter.JMeter.<clinit>(JMeter.java:124)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.jmeter.NewDriver.main(NewDriver.java:250)
2021-06-22 17:58:11,831 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.FileAppender for element File: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.FileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.FileAppender
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:234)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:134)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1002)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:942)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:934)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:552)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:241)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:288)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:618)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:691)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:708)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:138)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:45)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:48)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at org.apache.jmeter.JMeter.<clinit>(JMeter.java:124)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.jmeter.NewDriver.main(NewDriver.java:250)
2021-06-22 17:58:11,837 main ERROR Null object returned for File in Appenders.
2021-06-22 17:58:11,848 main ERROR Unable to locate appender "jmeter-log" for logger config "root"
Jun 22, 2021 5:58:12 PM java.util.prefs.FileSystemPreferences$1 run
WARNING: Couldn't create user preferences directory. User preferences are unusable.
Jun 22, 2021 5:58:12 PM java.util.prefs.FileSystemPreferences$1 run
WARNING: java.io.IOException: No such file or directory
An error occurred: Unknown arg: null
It looks like the permissions to create the jmeter.log
files are missing inside of the container. I also tried to provide a custom path for the log file, giving me a different error.
Command:
docker run --volume `pwd`:/keptn/jmeter justb4/jmeter jmeter -n -t /keptn/jmeter/basiccheck.jmx -JSERVER_URL=`printf -- "%s" "${HOST##*/}"` -j /keptn/jmeter/test.log -l /keptn/jmeter/log.jtl
Error message:
Jun 15, 2021 2:36:55 PM java.util.prefs.FileSystemPreferences$1 run
WARNING: Couldn't create user preferences directory. User preferences are unusable.
Jun 15, 2021 2:36:55 PM java.util.prefs.FileSystemPreferences$1 run
WARNING: java.io.IOException: No such file or directory
An error occurred: Unknown arg: null
docker run jmeterdocker
standard_init_linux.go:190: exec user process caused "no such file or directory"
After I run my docker image I get this error:
standard_init_linux.go:190: exec user process caused "no such file or directory"
Did anyone else get this? I think it's something to do with entrypoint.sp and the first line.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.