justb4 / docker-jmeter

Docker image for Apache JMeter
MIT License
278 stars 310 forks source link

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

Closed Vic152 closed 2 years ago

Vic152 commented 2 years ago

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

Vic152 commented 2 years ago

This seems to take care of this

/plugins:${PWD}/plugins

but I am still missing plugins

/jmeter_test_plan$ sudo docker run --name jmeter -i -v /plugins:${PWD}/plugins -v ${PWD}:${PWD} -w ${PWD} justb4/jmeter -n -t publish_mqtt_broker_with_delay.jmx -q publish_mqtt_broker_with_delay.properties START Running Jmeter on Thu Dec 2 14:26:09 CET 2021 JVM_ARGS=-Xmn424m -Xms1696m -Xmx1696m jmeter args=-n -t publish_mqtt_broker_with_delay.jmx -q publish_mqtt_broker_with_delay.properties Dec 02, 2021 2:26:10 PM java.util.prefs.FileSystemPreferences$1 run INFO: Created user preferences directory. Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/jmeter_test_plan/publish_mqtt_broker_with_delay.jmx'. Cause: CannotResolveClassException: net.xmeter.samplers.ConnectSampler

Detail:com.thoughtworks.xstream.converters.ConversionException: ---- Debugging information ---- cause-exception : com.thoughtworks.xstream.converters.ConversionException cause-message : first-jmeter-class : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:66) class : org.apache.jmeter.save.ScriptWrapper required-type : org.apache.jmeter.save.ScriptWrapper converter-type : org.apache.jmeter.save.ScriptWrapperConverter path : /jmeterTestPlan/hashTree/hashTree/hashTree[2]/net.xmeter.samplers.ConnectSampler line number : 75 version : 5.3

An error occurred: Error in NonGUIDriver Problem loading XML from:'/jmeter_test_plan/publish_mqtt_broker_with_delay.jmx'. Cause: CannotResolveClassException: net.xmeter.samplers.ConnectSampler

Detail:com.thoughtworks.xstream.converters.ConversionException: ---- Debugging information ---- cause-exception : com.thoughtworks.xstream.converters.ConversionException cause-message : first-jmeter-class : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:66) class : org.apache.jmeter.save.ScriptWrapper required-type : org.apache.jmeter.save.ScriptWrapper converter-type : org.apache.jmeter.save.ScriptWrapperConverter path : /jmeterTestPlan/hashTree/hashTree/hashTree[2]/net.xmeter.samplers.ConnectSampler line number : 75 version : 5.3

justb4 commented 2 years ago

Looks like your mounting is not correct and the plugin is not found:

/plugins:${PWD}/plugins

should be

${PWD}/plugins:/plugins.

At least when you have a plugins directory within the dir where you run the command. This results that the class net.xmeter.samplers.ConnectSampler cannot be instantiated.

(From the first attempt you also may have an empty /plugins on your local system).

justb4 commented 2 years ago

Should be solved via #56 ..

justb4 commented 2 years ago

Closing, pls reopen if still a problem.