JMeter is the Most used open-source performance testing tool. This tool is designed used for performance testing for applications designed on protocol communications like  HTTP. Https, FTP, SFTP, SMTP, Database testing, TCP IP protocol, For Message queues, and whatnot. JMeter has the option to design its own plugins as it is open source, Moreover, this is designed based on Java language, which is platform independent so plugins that are designed for windows applications would support Linux and mac operating systems also.

JMeter is under GPL license so we can use core JMeter features and customize it and create a new tool similar to BlazeMeter and OctoPerf which uses JMeter as background and implemented web and cloud integrations for existing features.

JMeter with default installation will support only a few protocols which are basic HTTP, TCP, FTP JDBC if you want to support jpos, Web socket, Kafka, and parallel controller we need to download the plugins from the JMeter plugin manager website. Initially, we used to download the required plugins which are nothing but jar files used to download from the browser and copy into Jmeter/lib/ext folder and restart JMeter to take effect now these manual tasks are replaced by JMeter plugin manager for that we need to download the plugin manager jar manually and place it in JMeter.lib/ext folder and restart JMeter. Once JMeter is started we can download any plugin from the plugin manager UI which will be shown in JMeter like below

  • From the Available tab we can download the plugins by just checking the check box and clicking the “Apply change sand restart JMeter” button

This seems to be a very quick and easy way to download jar  until you see issues while opening the  plugin manager or while downloading the plugin you would be seeing the below exception in the JMeter log and failed message in the plugin manager

Warning count in JMeter

And below exception in JMeter log

<pre>avax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.ssl.Alerts.getSSLException(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.Handshaker.fatalSE(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.Handshaker.fatalSE(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.Handshaker.processLoop(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.Handshaker.process_record(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) ~[?:1.8.0_202]
    at org.apache.http.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:570) ~[httpclient-4.5.13.jar:4.5.13]
    at org.apache.http.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:450) ~[httpclient-4.5.13.jar:4.5.13]
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.updateSecureConnection(DefaultClientConnectionOperator.java:220) ~[httpclient-4.5.13.jar:4.5.13]
    at org.apache.http.impl.conn.ManagedClientConnectionImpl.layerProtocol(ManagedClientConnectionImpl.java:419) ~[httpclient-4.5.13.jar:4.5.13]
    at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:808) ~[httpclient-4.5.13.jar:4.5.13]
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:609) ~[httpclient-4.5.13.jar:4.5.13]
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440) ~[httpclient-4.5.13.jar:4.5.13]
    at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) ~[httpclient-4.5.13.jar:4.5.13]
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.13.jar:4.5.13]
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient-4.5.13.jar:4.5.13]
    at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:499) ~[jmeter-plugins-manager-1.7.jar:?]
    at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:494) ~[jmeter-plugins-manager-1.7.jar:?]
    at org.jmeterplugins.repository.JARSourceHTTP.reportStats(JARSourceHTTP.java:451) ~[jmeter-plugins-manager-1.7.jar:?]
    at org.jmeterplugins.repository.http.StatsReporter.run(StatsReporter.java:24) ~[jmeter-plugins-manager-1.7.jar:?]
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(Unknown Source) ~[?:1.8.0_202]
    at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) ~[?:1.8.0_202]
    at sun.security.validator.Validator.validate(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) ~[?:1.8.0_202]
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ~[?:1.8.0_202]
    ... 22 more
</pre>

Above exception saying that  “unable to find valid certification path to requested target” which means it was trying to connect to HTTPS server which is unable to find the certificate of the server, this could happen when you are connected to the internet with some proxy or your corporate proxy options so in this case, we need to follow below steps

  • If you are connected to a Corporate proxy, go to internet options go to the proxy system you should be able to see the proxy script which will start with “HTTPS” copy this URL and enter it in the browser, and download the proxy server machine certificate
  • To download the certificate go to chrome  browser and click on the lock icon in the address bar and select the connection secure option  and click the certificate is a valid option it will open like below

  • After clicking on Certificate is valid it will open below popup

  • Click on the details tab you should see copy to file option

  • Next need to provide the file path to where it has to save then need to import this certificate to JVM with the below command

While importing the certificate chrome will ask the certificate type to be saved like below select highlighted option

  • Go to JRE installed folder/lib/security and copy the cacerts file and keep its copied before you run this command

now we need to run the below command in the command prompt

 keytool -import -alias example -keystore "C:\Program Files\Java\jre1.8.0_202\lib\security\cacerts" -file example.cer

In above command

  • “-alias example” is my alias name change as per your domain name or proxy server name
  • “example.cer” is the exported certificate for our server which we imported previously

sometimes it will ask for a password and then use “changeit“. at last, you need to mention “yes” to save once the command is executed you should see the below screen in the command prompt

Once you see the above statements then restart JMeter or kill the process and start the JMeter again and try it it will work now

Happy learning

 

 

JMeter Failed to load the Plugin Manager with PKIX Path Building Failed

Leave a Reply

Your email address will not be published. Required fields are marked *