Phantomjs conversion error com.thoughtworks.xstream.converters.ConversionException: - jmeter

I've created a jmeter load test using phantomjs and I've run it locally without issues. When I place the test on an EC2 the test fails every time. I've looked around on the internet and tried all the suggestions that I could find, but no luck so far. I'm 100% sure that the "jmeter-plugins-webdriver-1.4.0.jar" is in the jmeter/lib/ext folder. I've ensured that my EC2 contains all of the dependencies that Phantomjs, and Jmeter require to run. The EC2 does not have a gui. Any help would be appreciated.
jmeter -n -t 1joinOnly.jmx -l error101.jtl
Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/home/ubuntu/jmeter-bootstrap/bin/apache-jmeter-3.0/bin/1joinOnly.jmx', conversion error 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/com.blazemeter.jmeter.webdriver.phantomjs.PhantomJSDriverConfig
line number : 60
version : 2.13.20161028
-------------------------------

What jar? In what folder?
The error clearly indicates missing WebDriver Sampler plugin so my expectations are (NB: below instructions are applicable to Debian Linux and derivatives, the commands and paths might be different for other Linux distributions):
you installed JMeter using apt package manager
you put Selenium and WebDriver Sampler libraries to wrong folders
Selenium libraries should go to /usr/share/jmeter/lib
WebDriver libraries should go to /usr/share/jmeter/lib/ext
(NB: I don't have Ubuntu nearby so the folders might differ, please double check them using dpkg-query command like dpkg-query -L jmeter | grep lib)
you didn't restart JMeter to pick the .jars up
My recommendation is to switch to latest JMeter version from the one which comes with Debian (or Ubuntu):
Install latest version of JDK (not less than JDK 8)
Install latest version of JMeter (3.2 as of now) by downloading the tarball and unpacking it somewhere to your local file system. See How to install latest jmeter in Ubuntu 15.10 answers and comments if you need detailed steps
Install JMeter Plugins Manager
Install Selenium/WebDriver Support package using the Plugins Manager

I was able to install the missing plugins via the Plugins Manager Command line. https://jmeter-plugins.org/wiki/PluginsManagerAutomated/

Related

Server agent not opening in JMeter

I installed serverAgent 2.2.3
When I run it in cmd I get this error.
enter image description here
I tried starting the startAgent. bat. It automatically closes.
Thanks for looking.
That's very weird because the error states that sl4j library cannot be found in CLASSPATH and ServerAgent doesn't use this library at all.
Try downloading it from Github and unpacking it somewhere else. Also if you have CLASSPATH environment variable set - try clearing/unsetting it.
set CLASSPATH= && startAgent.bat
More information: How to Monitor Your Server Health & Performance During a JMeter Load Test
Alternatively you can try downloading sl4j.jar and dropping it near ServerAgent.jar but it is not a part of normal ServerAgent installation procedure.

Jmeter _ Input file path setup in batch file

I tried to set input file path as below. But getting error as
"WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.".
Can some one help me.
This is how I've configured:
cd D:\Automation\Jmeter_Param\apache-jmeter-4.0\apache-jmeter-4.0\bin\
set my_dataset=D:\Automation\Jmeter_Param\apache-jmeter-4.0\apache-jmeter-4.0\bin\Deactivate.csv
set my_txnset=D:\Automation\Jmeter_Param\apache-jmeter-4.0\apache-jmeter-4.0\bin\Deactivate\credentials_prod.csv
jmeter -n -t D:\Automation\Jmeter_Param\apache-jmeter-4.0\apache-jmeter-4.0\bin\Deactivate\Deactivate.jmx
Here my_dataset and my_txnset has been called out under Global and used.
As per JMeter release notes:
Note that under some windows systems you may have this WARNING:
java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0
x80000002. Windows RegCreateKeyEx(…) returned error code 5.
The fix is to run JMeter as Administrator, it will create the registry key for you, then you can restart JMeter as a normal user and you won't have the warning anymore.
So just run the command prompt as Administrator once and issue will go away.
Also be aware that according to 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article you should always be using the latest version of JMeter so consider upgrading to JMeter 5.2.1 (or whatever is the latest stable version available at JMeter Downloads page) on next available opportunity

JMeter - list of installed plugins

I am using JMeter 5.2, only via Command Line Mode.
For debugging purposes I need to get a list of all currently installed plugins for the JMeter version.
How I could achieve that?
You can use plugin manager using CLI:
command-line is simple:
PluginsManagerCMD <command> [<params>]
In your case execute status
PluginsManagerCMD status

mod_was_ap22_http.so is not available on Websphere 9?

I'm trying to integrate IBM Http Server to WAS on windows server. Webspher, IHS, Plugins, all installed on same server by installation manager, all of them are version 9 and 64bit.
Then I follow the steps on this(https://geekflare.com/integrate-http-server-with-websphere-8-5/) to start my integration, but something when wrong: I cannot find mod_was_ap22_http.so in my plugin folder. I when to check the folder X:\IBM\WebSphere\Plugins\bin\64bits and D:\IBM\WebSphere\Plugins\bin\32bits, I see mod_was_ap24_http.dll and mod_was_ap22_http.dll but not the .so that I need. I also tried to use mod_was_ap24_http.dll in my httpd.conf file but it's not working, then I got the following error
The IBMHTTPServer9 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
httpd: Syntax error on line 116 of X:/IBM/HTTPServer/conf/httpd.conf: Cannot loa
d X:/IBM/WebSphere/Plugins/bin/64bits/mod_was_ap24_http.dll into server: %1 \xa4
\xa3\xacO\xa6\xb3\xae\xc4\xaa\xba Win32 \xc0\xb3\xa5\xce\xb5{\xa6\xa1\xa1C
Is there something that I'm not doing right?
The guide is written for Linux and you're on Windows. Further, the guide has typos in configuration files. I'd suggest following the official docs and running PCT/WCT instead of manually configuring all of this.
Just add mentioned module:
[root#172 bin]# locate mod_was_ap22_http.so
Go to location:
/opt/IBM/HTTPServer/conf
vim http.conf
(add mentioned below module)
LoadModule was_ap22_module /opt/IBM/WebSphere/Plugins/bin/64bits/mod_was_ap22_http.so
./apachectl -k start

[Selenium]Arbitrary error with Firefox Binary

I'm running some automated Selenium tests on my Debian server, every hour.
But, randomly, I have this error :
Failed to connect to binary
FirefoxBinary(/usr/lib/iceweasel/firefox-bin) on port 7071;
I run Selenium with a jar file, and I'm using Xvfb as my server is headless.
DISPLAY=:7 java -jar /selenium/SeleniumTest.jar
I wasn't able to tell why it happens (about 2 times each 5 runs).
Does someone have an idea of what is going on ?
EDIT :
Selenium : Selenium Java 2.21.0
Firefox : Mozilla Iceweasel 3.5.16
Debian : 6.0.4

Resources