Proper procedure to install all JMeter Plugins

1,598 views
Skip to first unread message

dspe...@gmail.com

unread,
Mar 18, 2018, 1:45:28 PM3/18/18
to jmeter-plugins
I am the author of jmeter-ecs, which is a set of Docker images for distributed testing in AWS.

I am attempting to improve the Docker image to include all plugins using the Plugins Manager.  Here is an except from the Dockerfile:

ENV JMETER_VERSION apache-jmeter-4.0
ENV JMETER_HOME /opt/$JMETER_VERSION
ENV CMDRUNNER_VERSION 2.0
ENV PLUGINMGR_VERSION 0.19

WORKDIR /opt

  && tar -xvf $JMETER_VERSION.tgz \
  && rm $JMETER_VERSION.tgz \
  && rm -rf $JMETER_VERSION/docs $JMETER_VERSION/printable_docs \
  && cd $JMETER_HOME/lib \
  && cd $JMETER_HOME/lib/ext \
  && java -cp jmeter-plugins-manager-$PLUGINMGR_VERSION.jar org.jmeterplugins.repository.PluginManagerCMDInstaller \
  && PluginsManagerCMD.sh install-all-except

The install works great, but trying to use a .jmx which includes UDP plugin, I get this error:

Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/plans/demo-plugin.jmx', missing class 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:67)
class               : org.apache.jmeter.save.ScriptWrapper
required-type       : org.apache.jorphan.collections.ListedHashTree
converter-type      : org.apache.jmeter.save.ScriptWrapperConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree/kg.apc.jmeter.samplers.UDPSampler
line number         : 50
version             : 4.0 r1823414
-------------------------------

In attempting to fix this error, I include JMeterPlugins-Standard-1.4.0.zip, JMeterPlugins-Extras-1.4.0.zip & JMeterPlugins-ExtrasLibs-1.4.0.zip, which solve the above problem, but creates warnings from the Plugins Manager.  Here is the updates to the Dockerfile:


With these changes, I get the following warnings:

17:18:02.984 [main] WARN  org.jmeterplugins.repository.PluginManager - Found JAR conflict: /opt/apache-jmeter-4.0/lib/json-path-2.4.0.jar and /opt/apache-jmeter-4.0/lib/json-path-2.1.0.jar
2018-03-18 17:18:02,984 WARN o.j.r.PluginManager: Found JAR conflict: /opt/apache-jmeter-4.0/lib/json-path-2.4.0.jar and /opt/apache-jmeter-4.0/lib/json-path-2.1.0.jar
17:18:02.988 [main] WARN  org.jmeterplugins.repository.PluginManager - Found JAR conflict: /opt/apache-jmeter-4.0/lib/asm-6.0.jar and /opt/apache-jmeter-4.0/lib/asm-5.0.3.jar
2018-03-18 17:18:02,988 WARN o.j.r.PluginManager: Found JAR conflict: /opt/apache-jmeter-4.0/lib/asm-6.0.jar and /opt/apache-jmeter-4.0/lib/asm-5.0.3.jar
17:18:02.989 [main] WARN  org.jmeterplugins.repository.PluginManager - Found JAR conflict: /opt/apache-jmeter-4.0/lib/json-smart-2.2.jar and /opt/apache-jmeter-4.0/lib/json-smart-2.3.jar
2018-03-18 17:18:02,989 WARN o.j.r.PluginManager: Found JAR conflict: /opt/apache-jmeter-4.0/lib/json-smart-2.2.jar and /opt/apache-jmeter-4.0/lib/json-smart-2.3.jar
Mar 18, 2018 5:18:03 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
17:18:04.580 [main] WARN  org.jmeterplugins.repository.Plugin - Unable to load class: com.atlantbh.jmeter.plugins.oauth.OAuthSampler
java.lang.NoClassDefFoundError: org/apache/jmeter/protocol/http/sampler/HTTPSampler2
...
Caused by: java.lang.ClassNotFoundException: org.apache.jmeter.protocol.http.sampler.HTTPSampler2
2018-03-18 17:18:04,580 WARN o.j.r.Plugin: Unable to load class: com.atlantbh.jmeter.plugins.oauth.OAuthSampler
java.lang.NoClassDefFoundError: org/apache/jmeter/protocol/http/sampler/HTTPSampler2
...
Caused by: java.lang.ClassNotFoundException: org.apache.jmeter.protocol.http.sampler.HTTPSampler2

I am assuming installing even parts of the old style releases is not the way to go.  

Any thoughts on how to best install all available plugins with dependencies?  

Or is this possibly a bug in the UDP Plugin dependencies?

Andrey Pokhilko

unread,
Mar 19, 2018, 6:37:26 AM3/19/18
to jmeter-...@googlegroups.com

Hi,

Including any 1.4.0 "old" sets will most likely result in an unpredictable state of plugins. Those plugins are outdated for several years. The only correct way is to use Plugins Manager.

The real question is: is there "*udp*.jar" file inside lib/ext after install or not? Another thing is that modern Plugins Manager has "install-for-jmx" command to make sure all plugins are installed.

Finally, some of less popular plugins, like Hadoop, conflict with other plugins in terms of libraries installed. So it is risky practice to blindly install all plugins.

Andrey Pokhilko

18.03.2018 20:45, dspe...@gmail.com пишет:
--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Andrey Pokhilko

unread,
Mar 21, 2018, 8:02:39 AM3/21/18
to jmeter-...@googlegroups.com

Add "jpgc-oauth" to excludes also, it is deprecated plugin

Andrey Pokhilko

19.03.2018 20:27, dspe...@gmail.com пишет:
Andrey,

Using install-for-jmx is not an option here as our image is built for distributed testing.  The master node sees the JMX file, but the slave never sees it.  I am attempting to build a Docker Image that anyone could use with at least the most popular plugins.  Your information is very helpful for me to understand the challenges on plugin dependencies.

It turns out the UDP plugin was not installed in my image.  There is possibly an issue calling `PluginsManagerCMD.sh install-all-except` on a clean machine (image).  Running this in the Dockerfile:

RUN PluginsManagerCMD.sh install-all-except jpgc-hadoop \

  && PluginsManagerCMD.sh status


results in:

Step 13/18 : RUN PluginsManagerCMD.sh install-all-except jpgc-hadoop   && PluginsManagerCMD.sh status
 ---> Running in 1495a6d89bdc
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.
Mar 19, 2018 4:55:06 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
16:55:08.232 [main] INFO  org.jmeterplugins.repository.PluginManager - Plugins Status: [jpgc-plugins-manager=0.19, jmeter-core=4.0, jmeter-ftp=4.0, jmeter-http=4.0, jmeter-jdbc=4.0, jmeter-jms=4.0, jmeter-junit=4.0, jmeter-java=4.0, jmeter-ldap=4.0, jmeter-mail=4.0, jmeter-mongodb=4.0, jmeter-native=4.0, jmeter-tcp=4.0, jmeter-components=4.0]
2018-03-19 16:55:08,232 INFO o.j.r.PluginManager: Plugins Status: [jpgc-plugins-manager=0.19, jmeter-core=4.0, jmeter-ftp=4.0, jmeter-http=4.0, jmeter-jdbc=4.0, jmeter-jms=4.0, jmeter-junit=4.0, jmeter-java=4.0, jmeter-ldap=4.0, jmeter-mail=4.0, jmeter-mongodb=4.0, jmeter-native=4.0, jmeter-tcp=4.0, jmeter-components=4.0]
16:55:08.308 [main] INFO  org.jmeterplugins.repository.JARSourceHTTP - Downloading: https://search.maven.org/remotecontent?filepath=com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar

[installing lots of plugins]

16:55:33.852 [main] INFO  org.jmeterplugins.repository.JARSourceHTTP - Downloading: https://search.maven.org/remotecontent?filepath=kg/apc/jmeter-plugins-udp/0.3/jmeter-plugins-udp-0.3.jar

[installing lots of plugins]

16:55:39.202 [main] INFO  org.jmeterplugins.repository.PluginManager - Restarting JMeter...
2018-03-19 16:55:39,202 INFO o.j.r.PluginManager: Restarting JMeter...
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.
16:55:42.348 [main] INFO  org.jmeterplugins.repository.PluginManager - Plugins Status: [jpgc-plugins-manager=0.19, jmeter-core=4.0, jmeter-ftp=4.0, jmeter-http=4.0, jmeter-jdbc=4.0, jmeter-jms=4.0, jmeter-junit=4.0, jmeter-java=4.0, jmeter-ldap=4.0, jmeter-mail=4.0, jmeter-mongodb=4.0, jmeter-native=4.0, jmeter-tcp=4.0, jmeter-components=4.0]
2018-03-19 16:55:42,348 INFO o.j.r.PluginManager: Plugins Status: [jpgc-plugins-manager=0.19, jmeter-core=4.0, jmeter-ftp=4.0, jmeter-http=4.0, jmeter-jdbc=4.0, jmeter-jms=4.0, jmeter-junit=4.0, jmeter-java=4.0, jmeter-ldap=4.0, jmeter-mail=4.0, jmeter-mongodb=4.0, jmeter-native=4.0, jmeter-tcp=4.0, jmeter-components=4.0]
[jpgc-plugins-manager=0.19, jmeter-core=4.0, jmeter-ftp=4.0, jmeter-http=4.0, jmeter-jdbc=4.0, jmeter-jms=4.0, jmeter-junit=4.0, jmeter-java=4.0, jmeter-ldap=4.0, jmeter-mail=4.0, jmeter-mongodb=4.0, jmeter-native=4.0, jmeter-tcp=4.0, jmeter-components=4.0]
Removing intermediate container 1495a6d89bdc
 ---> 752e66777c89

If I modify the Dockerfile to install twice, I get all the plugins:

RUN PluginsManagerCMD.sh install-all-except jpgc-hadoop \

  && PluginsManagerCMD.sh install-all-except jpgc-hadoop \

  && PluginsManagerCMD.sh status


What is happening in the Plugins Manager during the state: "Restarting JMeter..."?  In this Docker use case, JMeter is not running yet.  Is it possible that since JMeter was never run that the plugin manager is not installing the plugins properly?

Also, are there other problematic plugins I should add to the install-all-except line?

Dave 

Message has been deleted

Andrey Pokhilko

unread,
Mar 24, 2018, 3:12:24 AM3/24/18
to jmeter-...@googlegroups.com

Sorry, I did not fully understand your question. Can you elaborate?

Andrey Pokhilko

21.03.2018 19:20, dspe...@gmail.com пишет:
Appreciate the detail.  Thoughts on how we could properly address plugin installation when JMeter is not running?  Should I add a feature request for a new command line switch like --no-restart such that this could be considered in the long term?

Dave
Message has been deleted
Message has been deleted

Vincent Daburon

unread,
Mar 25, 2018, 5:30:43 AM3/25/18
to jmeter-plugins
Hi,
The main difficulty is to have the PluginsManager runnable
Extract from my Dockerfile

ENV JMETER_VERSION=3.0
ENV JMETER_PATH=/opt/jmeter_jp
ENV PLUGINS_PATH=$JMETER_PATH/plugins

....


# get the PluginsManagerCMD.sh from the jar (the PluginsManagerCMD.sh is in the jar)
RUN cd $JMETER_PATH && \
java -cp apache-jmeter-$JMETER_VERSION/lib/ext/jmeter-plugins-manager-0.10.jar org.jmeterplugins.repository.PluginManagerCMDInstaller

RUN cd $JMETER_PATH/apache-jmeter-$JMETER_VERSION/bin && \
chmod u+x PluginsManagerCMD.sh

# a selection of usefull plugins from jmeter-plugins.org
ENV LIST_PLUGINS="jpgc-casutg=2.1,jpgc-csl=0.1,jpgc-dbmon=0.1,jpgc-dummy=0.1,jpgc-functions=2.0,jpgc-jmxmon=0.2,jpgc-perfmon=2.1,jpgc-graphs-basic=2.0,jpgc-graphs-additional=2.0,jpgc-graphs-dist=2.0,jpgc-graphs-vs=2.0,jpgc-cmd=2.1,jpgc-filterresults=2.1,jpgc-ggl=2.0,jpgc-mergeresults=2.0,jpgc-pde=0.1,jpgc-synthesis=2.0,jpgc-sts=2.2"

# Run the PluginsManager to download and install files (jars and scripts files)
RUN cd $JMETER_PATH/apache-jmeter-$JMETER_VERSION/bin && \
JVM_ARGS="-Dhttps.proxyHost=$ARG_https_proxyHost -Dhttps.proxyPort=$ARG_https_proxyPort" ./PluginsManagerCMD.sh install $LIST_PLUGINS && \
JVM_ARGS="-Dhttps.proxyHost=$ARG_https_proxyHost -Dhttps.proxyPort=$ARG_https_proxyPort" ./PluginsManagerCMD.sh status

Regards

Vincent D.

da...@getware.net

unread,
Mar 25, 2018, 11:09:32 AM3/25/18
to jmeter-plugins
Vincent,

Interesting that I did not run into the permissions issue on PluginsManagerCMD.sh.  The PluginManagerCMDInstaller step seems to take care of this.

In any event, what you have pointed out is that the issue I am seeing did not exist in version 0.10 of the PluginsManager.  I think you will run into the same issue when you upgrade to 0.19.

I did more digging around, and the issue appears to be one of timing.  The Plugins Manager launches JMeter which must be performing indexing of the newly downloaded plugins.  If it is not given time to do so, the download plugins will not appear in status.  This change works around the problem:

RUN PluginsManagerCMD.sh install-all-except jpgc-hadoop,jpgc-oauth \
  && sleep 2 \
  && PluginsManagerCMD.sh status

Thanks for your help!

Dave
Reply all
Reply to author
Forward
0 new messages