how to connect remote mysql database from local machine using jmeter - jdbc

i have tried to connect from Jmeter to external mysql server using JDBC sampler. But I am getting erros. its possible to connect to the local mysql server.I am confused how to connect jmeter from my local machine to server database in other machine using JDBC CONNECTION

Make sure you remote MySQL server is accepting remote connections. Locate bind-address line in my.cnf file and set it to listen on all interfaces:
bind-address = 0.0.0.0
See Troubleshooting Problems Connecting to MySQL for more details. You will need restart MySQL server in order to pick up any changes made in my.cnf file
Make sure your operating system firewall on MySQL server side allows incoming connections to MySQL server TCP port (default is 3306).
Verify that you able to hit port 3306 with a telnet client or equivalent
If you will be still experiencing problems - update your question with JDBC Request sampler output and jmeter.log file contents. I would also recommend checking out The Real Secret to Building a Database Test Plan With JMeter to learn more about the concept of databases load testing using JMeter

If you are able to connect to that server using MySQL Workbench or another tool just use the below config for JMeter.
Just remember that you need to have mysql-connector-java-5.1.40-bin.jar (or another version of it) under apache-jmeter-3.0\lib\ folder.
Hope this helps!

Related

JMeter-JDBC Connection error

While running an SQl query in JMeter using JDBC request, I'm getting:
SQL ConnectionException:Cannot create Poolable Connectionfactory
(IO error:Network Adapter could not establish the connection).
Installed Oracle11g in virtual machine.
Please give me solution.
Thanks in Advance.
Make sure you have Oracle JDBC driver somewhere in JMeter Classpath
Make sure you have configured network adapter in the virtual machine in Bridge mode (not "host-only", not "NAT") so the virtual machine would have its own IP address.
Make sure port 1521 (or whatever is used by Oracle) is not blocked by OS firewall. Check if you are able to connect to the port using i.e. telnet client
Add JDBC Connection Configuration test element and provide JDBC url of your Oracle instance along with credentials there.
See The Real Secret to Building a Database Test Plan With JMeter guide to learn more about setting up JMeter for databases load testing

How to connect to Neo4j server running on Windows machine from Ubuntu machine?

I am using Neo4j graph database. Its running on Windows PC at url: http://localhost:7474/browser/. Now I want to get access to this server from machine running Ubuntu OS, so that I can access Neo4j browser and can use it for development purpose as well.
Here is what you need to do: -
Uncomment "org.neo4j.server.webserver.address" and provide a valid IP-Address on which you want to bind your neo4j http service at port 7474 in your neo4j-server.properties and restart your neo4j server.
Try accessing you Neo4j server on local machine by entering URL - http://:7474/ (Do not use localhost).
Switch off all firewalls and ensure :7474 is accessible from any remote machine. You may test it with Telnet too.
In case all the above works then you are done and your Neo4j server is accessible from remote machine.
I think you'll need to configure your conf/neo4j-server.properties file to allow access from non-localhost addresses. Here's the relevant part of my file:
# Let the webserver only listen on the specified IP. Default is localhost (only
# accept local connections). Uncomment to allow any connection. Please see the
# security section in the neo4j manual before modifying this.
#org.neo4j.server.webserver.address=0.0.0.0

JMeter Oracle JDBC configuration

I have a problem connecting to Oracle from JMeter. I received this error:
Response code: null 17002
Response message: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection"
I have ojdb14, 6, 5 and more in /lib
added class12 in /lib and /lib/ext
Then in test plan, I added jars to classpath, all pointing to jar lib.
Any suggestions? Thanks.
could it be in how to write the JDBC:
Make sure you have Oracle JDBC driver somewhere in JMeter Classpath
Make sure you have configured network adapter in the virtual machine in Bridge mode (not "host-only", not "NAT") so the virtual machine would have its own IP address.
Make sure port 1521 (or whatever is used by Oracle) is not blocked by OS firewall. Check if you are able to connect to the port using i.e. telnet client
Add JDBC Connection Configuration test element and provide JDBC url of your Oracle instance along with credentials there.

Jmeter Distributed Load Testing

I am performing jmeter distributed load testing, On starting remote server from local machine in gui mode test starts but not able to store results on local machine.
It gives connection refused exception on server
Can any one suggest what could be the right step and solution for this?
Did you try updating this?
java.rmi.server.hostname=[ip]
If hostname is updated, enable port 1099 in your local for incoming reequest or disable firewall in the local machine. So that server can contact local machine to send the results.

connect to oracle through socks proxy

My application (linux and windows) connects to oracle through OCI interface. Is it possible to connect to oracle through socks proxy? or some other similar proxy method? Simple ssh tunnel is not enough as I need to access multiple services (including oracle) through single port.
Edit: I have tried configuring the proxy as suggested in the answer, but it did not work. And I could not find anywhere information, that oracle can work through socks5 proxy.
I got the same issue to get solved. Anyway the solution above cannot work. You need to tell the client to just USE the proxy for connection initialization, but the target to connect to is supposed to be the oracle database server IP and port. Other forums read there is no such possibility via tnsnames.ora. But you're supposed to be able to achieve that using the Connection Manager. Haven't found out yet how to even download and install it though...
As I see Oracle doesn't support socks proxy.
To work around this for my self I did following:
Install proxifier www.freecap.ru
Start PL/SQL Developer from freecap
As I can see - this method not always work.
PL/SQL Developer was able to connect to database only on 3-4 try.
But after successful connect - it's seems stable enough for work.
Second option - is to use Java based tools like SQL Developer.
For Java there is system options for using SOCKS5 out of the box.
-DsocksProxyHost=localhost
-DsocksProxyPort=8081
there is official doc about SOCKS in java
Yes, this is possible. Your client tnsnames.ora file (or EZConnect string) should specify the proxy host as the database host, and the proxy listening port as the port. The SERVICE_NAME or SID is whatever the SQL*Net listener on the other side of the proxy is expecting.
[Edit]
If your proxy host is listening and forwarding on 1522, you should be able to:
telnet proxyhost 1522
and see:
Trying xx.xxx.xx.xxx...
Connected to proxyhost.domain.
Escape character is '^]'.

Resources