Giter VIP home page Giter VIP logo

docker-jmeter's Introduction

Docker Build Patreon

docker-jmeter

Image on Docker Hub

Docker image for Apache JMeter. This Docker image can be run as the jmeter command. Find Images of this repo on Docker Hub. Starting version 5.4 Docker builds/pushes are executed via GitHub Workflows.

Donate

With over 10 Million Pulls from DockerHub, this Docker Image is increasingly popular. To support its active maintainance consider making a donation, for example via PayPal:

Donate with PayPal

Security Patches

As you may have seen in the news, a new zero-day exploit has been reported against the popular Log4J2 library which can allow an attacker to remotely execute code. The vulnerability has been reported with CVE-2021-44228 against the log4j-core jar and has been fixed in Log4J v2.16.0.

JMeter, at least in versions 5 and later uses the vulnerable Log4J versions. The good news though is that the vulnerability applies only to remotely accessible Java web-services. JMeter is a commandline/GUI tool one runs internally. Still it is good practice to patch this problem.

JMeter has been updated to 5.4.2 for security CVE-2021-45046 & CVE-2021-45046.

https://jmeter.apache.org/changes.html#Non-functional%20changes

The update to 5.4.2 includes the updated Apache log4j2 to 2.16.0 (from 2.13.3), thanks for PR #51!

Building

With the script build.sh the Docker image can be build from the Dockerfile but this is not really necessary as you may use your own docker build commandline. Or better: use one of the pre-built Images from Docker Hub.

See end of this doc for more detailed build/run/test instructions (thanks to @wilsonmar!)

Build Options

Build arguments (see build.sh) with default values if not passed to build:

  • JMETER_VERSION - JMeter version, default 5.4. Use as env variable to build with another version: export JMETER_VERSION=5.4
  • IMAGE_TIMEZONE - timezone of Docker image, default "Europe/Amsterdam". Use as env variable to build with another timezone: export IMAGE_TIMEZONE="Europe/Berlin"

Running

The Docker image will accept the same parameters as jmeter itself, assuming you run JMeter non-GUI with -n.

There is a shorthand run.sh command. See test.sh for an example of how to call run.sh.

User Defined Variables

This is a standard facility of JMeter: settings in a JMX test script may be defined symbolically and substituted at runtime via the commandline. These are called JMeter User Defined Variables or UDVs.

See test.sh and the trivial test plan for an example of UDVs passed to the Docker image via run.sh.

See also: https://www.novatec-gmbh.de/en/blog/how-to-pass-command-line-properties-to-a-jmeter-testplan/

Adjust Java Memory Options

By default, JMeter reads out the available memory from the host machine and uses a fixed value of 80% of it as a maximum. If this causes Issues, there is the option to use environment variables to adjust the JVM memory Parameters:

JVM_XMN to adjust maximum nursery size

JVM_XMS to adjust initial heap size

JVM_XMX to adjust maximum heap size

All three use values in Megabyte range.

Installing JMeter plugins

To run the container with custom JMeter plugins installed you need to mount a volume /plugins with the .jar files. For example:

sudo docker run --name ${NAME} -i -v ${LOCAL_PLUGINS_FOLDER}:/plugins -v ${LOCAL_JMX_WORK_DIR}:${CONTAINER_JMX_WORK_DIR} -w ${PWD} ${IMAGE} $@

The ${LOCAL_PLUGINS_FOLDER} must have only .jar files. Folders and another file extensions will not be considered.

Configuring the custom JMeter plugins folder location

It is also possible to define an alternate location to the custom JMeter plugins folder. Simply define a environment variable called JMETER_CUSTOM_PLUGINS_FOLDER with the desired folder path like in the example bellow:

sudo docker run --name ${NAME} -i -e JMETER_CUSTOM_PLUGINS_FOLDER=/jmeter/plugins -v ${LOCAL_PLUGINS_FOLDER}:/jmeter/plugins -v ${LOCAL_JMX_WORK_DIR}:${CONTAINER_JMX_WORK_DIR} -w ${PWD} ${IMAGE} $@

Do it for real: detailed build/run/test

Contribution by @wilsonmar

  1. In a Terminal/Command session, install Git, navigate/make a folder, then:

    git clone https://github.com/justb4/docker-jmeter.git
    cd docker-jmeter
    
  2. Run the Build script to download dependencies, including the docker CLI:

    ./build.sh
    

    If you view this file, the docker build command within the script is for a specific version of JMeter and implements the Dockerfile in the same folder.

    If you view the Dockerfile, notice the JMETER_VERSION specified is the same as the one in the build.sh script. The FROM keyword specifies the Alpine operating system, which is very small (less of an attack surface). Also, no JMeter plug-ins are used.

    At the bottom of the Dockerfile is the entrypoint.sh file. If you view it, that's where JVM memory settings are specified for jmeter before it is invoked. PROTIP: Such settings need to be adjusted for tests of more complexity.

    The last line in the response should be:

    Successfully tagged justb4/jmeter:5.5

  3. Run the test script:

    ./test.sh
    

    If you view the script, note it invokes the run.sh script file stored at the repo's root. View that file to see that it specifies docker image commands.

    File and folder names specified in the test.sh script is reflected in the last line in the response for its run:

    ==== HTML Test Report ====
    See HTML test report in tests/trivial/report/index.html
    

    Alternative exec by Makefile:

    Like the bash script, it is possible to run the tests through a Makefile simply with the make command or by sending parameters as follows:

    TARGET_HOST="www.map5.nl" \
    TARGET_PORT="80" \
    THREADS=10 \
    TEST=trivial \
    make
  4. Switch to your machine's Folder program and navigate to the folder containing files which replaces files cloned in from GitHub:

    cd tests/trivial
    

    The files are:

    • jmeter.log
    • reports folder (see below)
    • test-plan.jmx containing the JMeter test plan.
    • test-plan.jtl containing statistics from the run displayed by the index.html file.
  5. Navigate into the report folder and open the index.html file to pop up a browser window displaying the run report. On a Mac Terminal:

    cd report
    open index.html
    

    Here is a sample report:

    docker-jmeter-report

Specifics

The Docker image built from the Dockerfile inherits from the Alpine Linux distribution:

"Alpine Linux is built around musl libc and busybox. This makes it smaller and more resource efficient than traditional GNU/Linux distributions. A container requires no more than 8 MB and a minimal installation to disk requires around 130 MB of storage. Not only do you get a fully-fledged Linux environment but a large selection of packages from the repository."

See https://hub.docker.com/_/alpine/ for Alpine Docker images.

The Docker image will install (via Alpine apk) several required packages most specificly the OpenJDK Java JRE. JMeter is installed by simply downloading/unpacking a .tgz archive from http://mirror.serversupportforum.de/apache/jmeter/binaries within the Docker image.

A generic entrypoint.sh is copied into the Docker image and will be the script that is run when the Docker container is run. The entrypoint.sh simply calls jmeter passing all argumets provided to the Docker container, see run.sh script:

sudo docker run --name ${NAME} -i -v ${WORK_DIR}:${WORK_DIR} -w ${WORK_DIR} ${IMAGE} $@

Credits

Thanks to https://github.com/hauptmedia/docker-jmeter and https://github.com/hhcordero/docker-jmeter-server for providing the Dockerfiles that inspired me. @wilsonmar for contributing detailed instructions. Others that tested/reported after version updates.

docker-jmeter's People

Contributors

amauryortega avatar anasoid avatar andrelramos avatar askalski85 avatar darius-m avatar davidmpaz avatar dynamic-gravity avatar gifflet avatar justb4 avatar kareemshahin avatar mpielvitori avatar rpherrera avatar typekpb avatar wilsonmar avatar zhangsean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-jmeter's Issues

Please fix README

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

password

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?

Support request - how to run with X11?

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?

The '-c' returns an 'unknown option' when attempting a docker run

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?

Jmeter jmx file doesn't exist or can't be opened

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

image

Can not run my jmx file

I want to run my own jmeter, but it showed this issue.
CannotResolveClassException: org.apache.jmeter.protocol.ssh.sampler.SSHCommandSampler

Add FUNDING option

The Docker JMeter Image has like 7 Million Pulls. In order to keep maintenance funded add a FUNDING.yml Paypal file.

Crashes after a few minutes of use or idle behavior

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

can not run image when using --mount and -v command

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?

cp: can't stat '/plugins/*.jar': No such file or directory

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

Increase or support multiple Java versions

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

Use MemAvailable when computing Java memory limits

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.

https issue with current latest tag

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.

adding jmeter plugins - not working as expected

Hi,
Any chance this should be using JMETER_HOME instead of (pwd) ?

cp $plugin $(pwd)/lib/ext

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.

Reg : Unable to build docker image

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

inspired by https://github.com/hauptmedia/docker-jmeter and

https://github.com/hhcordero/docker-jmeter-server/blob/master/Dockerfile

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

Install extra packages

See gliderlabs/docker-alpine#136 (comment)

Change TimeZone TODO: TZ still is not set!

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

TODO: plugins (later)

&& unzip -oq "/tmp/dependencies/JMeterPlugins-*.zip" -d $JMETER_HOME

Set global PATH such that "jmeter" command is found

ENV PATH $PATH:$JMETER_BIN

Entrypoint has same signature as "jmeter" command

COPY entrypoint.sh /

WORKDIR ${JMETER_HOME}

ENTRYPOINT ["/entrypoint.sh"]

Thanks,
Sindhuja

docker build haunts

bash build.sh, gives the following output, and the execution pauses forever:
11

Issue while running jmeter with Docker by passing arguments in the command - The JVM should have exitted but did not.

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
JVMError
. attached the screenshot for reference.

cannot run test.sh An error occurred: The file /tmp/hsperfdata_root/tests/trivial/test-plan.jmx doesn't exist or can't be opened

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

entrypoint.sh JVM_ARGS doesn't work

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?

upgrade jmeter version

Would it be possible to upgrade to the latest version of Jmeter which has groovy 3 support?

Plugin copy error - "Read-only file system"

I'm using the image v5.5 to run in a kubernetes cluster. I used the custom plugins path having the prometheus listener but I'm getting Read Only file system error.

image

Below is a config yaml I used:

image

standard_init_linux.go:190: exec user process caused "no such file or directory"

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.

Log file not found / No permission to create

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

HTTPS Request Error

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 ?

Add ARM Support

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!

Can't run container with custom user

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)

Windows Docker Image

Team,

Is there any similar image available for windows Docker. I tried getting this image for windows but no luck.

Cheers.

-Saravanan S

Execution hangs and doesn't start jmeter

Hi,

I just followed the readme and able to build the image but when test.sh is invoked, I see logs up to line no.32 in entrypoint.sh i.e, echo "jmeter ALL ARGS=${EXTRA_ARGS} $@"

After this nothing happens.

image

Please help in resolving this issue.

Incorrect computation for the memory

The computation for memory usage is incorrect in

freeMem=`awk '/MemAvailable/ { print int($2/1024) }' /proc/meminfo`

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

Jmeter container not storing log result.jtl file as output

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
image

check this image when container got stopped and I am trying to extract file from stopped container to my HOST PC

image

/jmeter-entrypoint.sh: line 13: JVM_XMN: parameter not set

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,

The '-c' returns an 'unknown option' when attempting a docker run

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).

NO X11 DISPLAY variable was set

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?

Not able to build the Dockerfile

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?

question about plugins

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.