Closed dlee-blackline closed 1 year ago
I guess you need a docker expert. You may try to get some more logs from inside the container. Or you check, how to run a UDP client inside a container.
The container logs didn't provide any information about the problem
software-spikes-load-testing-1 | Mar 14, 2023 7:17:52 PM java.util.prefs.FileSystemPreferences$1 run
software-spikes-load-testing-1 | INFO: Created user preferences directory.
software-spikes-load-testing-1 | Creating summariser <summary>
software-spikes-load-testing-1 | Created the tree successfully using /mnt/test-plans/my_file.jmx
software-spikes-load-testing-1 | Starting standalone test @ 2023 Mar 14 19:17:53 UTC (1678821473035)
software-spikes-load-testing-1 | Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
software-spikes-load-testing-1 | Warning: Nashorn engine is planned to be removed from a future JDK release
software-spikes-load-testing-1 | summary = 0 in 00:00:00 = ******/s Avg: 0 Min: 9223372036854775807 Max: -9223372036854775808 Err: 0 (0.00%)
software-spikes-load-testing-1 | Tidying up ... @ 2023 Mar 14 19:18:14 UTC (1678821494235)
software-spikes-load-testing-1 | ... end of run
I have created another custom Sampler to send CoAP requests and It's working, so I think it's no problem to run UDP client inside a container
The container logs didn't provide any information about the problem
I have created another custom Sampler to send CoAP requests
I don't understand what you're doing and what's the issue.
Do you run the same JMeter CoAP plugin (cf-jmeter-plugin)? And you have two test plans: Without docker, both works. With docker only one?
Anyway, I will not go to test your jmeterTestPlan with jmeter in docker. I'm not able to help you with the information you provide.
coaps://californium.eclipseprojects.io/telemetry
<elementProp name="QUIET_MILLIS" elementType="Argument">
<stringProp name="Argument.name">QUIET_MILLIS</stringProp>
<stringProp name="Argument.value">0..0</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
this smells like a "load-test". Sorry, the sandbox is considered for functional tests, not for benchmarks and load-tests.
Please setup your own server!
Sorry to make you feel confusing.
The container logs I showed to you were about cf-jmeter-plugin (https://github.com/eclipse-californium/californium.tools/blob/main/cf-jmeter-plugin/src/main/java/org/eclipse/californium/tools/jmeter/plugin/CoapSampler.java). The sampler I created doesn't have any problem. I just want to show that it's no problem to run UDP client inside a container.
Although I use load testing as the name, but it only sends one request.
You can reproduce the result by following the steps:
cf-jmeter-plugin/target
to the directory apache-jmeter-5.5/lib/ext
my_file.jmx
under the directory test-plans
and paste the content I sent to you at the beginning into the file. If you suspect the file I sent to you is invalid, you can also create a new JMX file with a cf-plugin requestdocker-compose.yml
with the correct mount paths. (Note: You can run any JMX files in /mnt/test-plans by changing the command /mnt/apache-jmeter/bin/jmeter -n -t /mnt/test-plans/{your_jmx_file}
)
version: '3.9'
services:
test-cf-plugin:
image: openjdk:11.0.16-jre-slim-bullseye
command: /mnt/apache-jmeter/bin/jmeter -n -t /mnt/test-plans/my_file.jmx
volumes:
- ./test-plans:/mnt/test-plans
- ./apache-jmeter-5.5:/mnt/apache-jmeter
docker compose up
to run the dockerYou should get the result as bellow:
Mar 14, 2023 7:17:52 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Creating summariser <summary>
Created the tree successfully using /mnt/test-plans/my_file.jmx
Starting standalone test @ 2023 Mar 14 19:17:53 UTC (1678821473035)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
Warning: Nashorn engine is planned to be removed from a future JDK release
summary = 0 in 00:00:00 = ******/s Avg: 0 Min: 9223372036854775807 Max: -9223372036854775808 Err: 0 (0.00%)
Tidying up ... @ 2023 Mar 14 19:18:14 UTC (1678821494235)
... end of run
The container logs didn't provide any information about the problem
I have created another custom Sampler to send CoAP requests
I don't understand what you're doing and what's the issue.
Do you run the same JMeter CoAP plugin (cf-jmeter-plugin)? And you have two test plans: Without docker, both works. With docker only one?
Anyway, I will not go to test your jmeterTestPlan with jmeter in docker. I'm not able to help you with the information you provide.
coaps://californium.eclipseprojects.io/telemetry <elementProp name="QUIET_MILLIS" elementType="Argument"> <stringProp name="Argument.name">QUIET_MILLIS</stringProp> <stringProp name="Argument.value">0..0</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp>
this smells like a "load-test". Sorry, the sandbox is considered for functional tests, not for benchmarks and load-tests.
Please setup your own server!
the elementProp
you mentioned was using the default value. I did not change it
Sorry, this still unclear.
cf-jmeter-plugin runs one sampler successful inside the container? But cf-jmeter-plugin fails to runs the other sampler successful inside the container?
What is clear: I don't spend my time to test inside a container.
This project is about Californium. I added the jmeter plugin some time ago, but I'm no jmeter expert. Not do I support to run where ever. Especially, if the one sampler works, but the other not, it's up to you, to narrow down the issue. With the provided information, I don't have an idea, what causes a failure.
no, the case is the file I sent to you can be executed on local machines, but failed in a container.
Anyway, thanks for your response.
I created a Java request with the class org.eclipse.californium.tools.jmeter.plugin.CoapSampler in JMeter.
I can execute it on my local machine (jmeter -n -t my_file.jmx):
However, the file cannot be executed properly if I use a docker container. I can run the command
docker compose up
to start the following service:The container did not print any errors, but the request cannot be executed. The response is:
I tested the YML file with HTTP requests and It worked well. Only with the CoapSampler has this issue.
I am using the same JMeter version (https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.5.tgz) and JMX file in the both cases. Also, my local machine is using Java 11 as well.
How can I fix the issue happening in containers?