Unable to establish connection b/w Jmeter & RDS db

597 views
Skip to first unread message

Shray Saxena

unread,
May 31, 2021, 11:19:33 AM5/31/21
to jmeter-plugins
I was asked to perform the database testing using JMeter. Currently i am using AWS Redshift (RDS) in my project. Below are the steps i performed to connect my database to Jmeter and i am getting error message in a response body -
Cannot create PoolableConnectionFactory (The connection attempt failed.)

Please Help !! 

Steps followed- 
1. Download Redshift JDBC driver, extract it and pasted .jar file in jmeter/lib folder as mentioned in https://aws.amazon.com/blogs/big-data/building-high-quality-benchmark-tests-for-amazon-redshift-using-apache-jmeter/
i have already installed mysql-connector.jar with me (but since i am using rds i dont thing it has anything to do with)

2. Used below config in JDBC Connection configuration element (below 2 screen-shots)
   JMeter_Connection_Config-1.png
   JMeter_Connection_Config.png

3. Below is the screen-shot showing JDBC Request - 
JDBC_Request.png

4. Got below Response - 

   Response.png



JMeter_Connection_Config-1.png
JDBC_Request.png
Response.png
JMeter_Connection_Config-2.png

DT

unread,
Jun 1, 2021, 1:54:09 AM6/1/21
to jmeter-plugins
Are you sure you're using correct port? As per Step 1: Set up prerequisites:

Amazon Redshift uses port 5439 by default 

So if you haven't change the default port during installation/configuration you might want to use 5439 instead of your 3306.

Additionally you will need to open the port in the Redshift Security Groups

More information:


If you want to validate or re-use the results you will also need to populate "Variable Names" and/or "Result Variable Name" sections of the JDBC Request sampler, see Debugging JDBC Sampler Results in JMeter  article for more details.

Shray Saxena

unread,
Jun 1, 2021, 3:39:08 AM6/1/21
to jmeter-...@googlegroups.com
It didn't worked with port 5439. Getting same error



Regards,

Shray Saxena
9910313663
"A hero is no braver than an ordinary man, 

But he is braver five minutes longer."



--
You received this message because you are subscribed to a topic in the Google Groups "jmeter-plugins" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jmeter-plugins/uU8Lzb-j15Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jmeter-plugin...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jmeter-plugins/673d5788-56bc-4702-afc3-6ce3086fe67bn%40googlegroups.com.

Shray Saxena

unread,
Jun 1, 2021, 5:06:51 AM6/1/21
to jmeter-...@googlegroups.com
There is one confusion. I have to connect my Jmeter to AWS RDS (and not Redshift). I upadted below setup after putting mysql-connector.jar in my /lib folder, used JDBC driver class and Database URL as shown below.

image.png

and getting response as shown below-

Cannot create PoolableConnectionFactory (Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.ConnectException: Connection timed out: connect
#Details logs attached



Regards,

Shray Saxena
9910313663
"A hero is no braver than an ordinary man, 

But he is braver five minutes longer."

Error_log.txt
Updated.png

Shray Saxena

unread,
Jun 1, 2021, 7:52:44 AM6/1/21
to jmeter-...@googlegroups.com
Now with the updated mysql-connector.jar file i got this error - 

Response message:java.sql.SQLException: Cannot create PoolableConnectionFactory (Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the se
rver.)

image.png

JDBC Connection Configuration remains the same which was shared in the last email.


Regards,

Shray Saxena
9910313663
"A hero is no braver than an ordinary man, 

But he is braver five minutes longer."


Reply all
Reply to author
Forward
0 new messages