Reputation: 97
We've a distributed JMeter setup with 1 client and 3 servers. While submitting a test plan to client, that is using any JMeter plugin, eg. Arrival Thread Group, it's failing due to plugins not installed.
We used JMeter plugin manager cmd to install plugins from test plan (jmx):
PluginsManagerCMD install-for-jmx <test-plan>
But this installs plugins on client while on executing the test we get the following error from all servers (as plugin is not installed on them)-
Error in rconfigure() method java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: com.blazemeter.jmeter.threads.arrivals.ArrivalsThreadGroup (no security manager: RMI class loader disabled)
Questions:
How to install plugins on servers from test-plan in automated manner (from cmd, similar to jmeter client)?
Can we get the list of plugins required for a test-plan at client node and convey that list to servers for installation at their end?
Upvotes: 0
Views: 263
Reputation: 1891
Maybe my cookbook will help you. I'm using parallel, rsync and smallest awc instances as load generaters named performance1-10 and performance-master. Passwordless ssh access to all nodes needed. Replace yourname
aws ec2 describe-instances --output text --filters 'Name=tag:Name,Values=performance*' 'Name=instance-state-name,Values=running' --query 'Reservations[*].Instances[*].{Name:Tags[?Key==`Name`]|[0].Value,PublicIpAddress:PublicIpAddress} | sort_by(@, &[0].Name) | [*][*].PublicIpAddress' > ips
head -n -1 ips > ipswomaster #check!
cat ips | parallel -j20 ssh-keyscan -H {} >> ~/.ssh/known_hosts
parallel -j20 --tag --nonall --slf ips uptime
# for first time: parallel -j20 --tag --nonall --slf ips sudo mkdir /opt/perf_test
parallel -j20 --tag --nonall --slf ips sudo chown -R yourname:yourname /opt/perf_test
cat ips | parallel -j20 rsync -arvzu /opt/perf_test/ {}:/opt/perf_test
parallel -j20 --tag --nonall --slf ipswomaster "screen -dmS yourname bash -c 'cd /opt/perf_test; rm *.log; JVM_ARGS=\"-Xms512m -Xmx512m\" /opt/perf_test/apache-jmeter/bin/jmeter-server; exec bash'"
# on master node
screen -R yourname
cd /opt/perf_test
STROJE="";while read -r l; do STROJE="$STROJE$l:1099,"; done < ipswomaster;rm *.log; JVM_ARGS="-Xms512m -Xmx512m" /opt/perf_test/apache-jmeter/bin/jmeter -R"${STROJE::-1}" -n -t test.jmx
# stop test on master node
ctrl+a ctrl+c #create new screen tab
cd /opt/perf_test/apache-jmeter/bin/
./stoptest.sh
# java update (if needed)
parallel -j20 --tag --nonall --slf ips java -version
parallel -j20 --tag --nonall --slf ips sudo apt install -y openjdk-8-jdk-headless
parallel -j20 --tag --nonall --slf ips update-java-alternatives --list | sort
parallel -j20 --tag --nonall --slf ips sudo update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64
parallel -j20 --tag --nonall --slf ips java -version | sort
Upvotes: 1