Jmeter server and Jmeter GUI client remote setup issues - jmeter

I was trying to setup remote jmeter server and jmeter client.
Server public IP : 111.111.111.111
Client public IP : 222.222.222.222
I am able to start jmeter server which is on rackspace cloud.
My desktop is behind a firewall with a NAT public IP address. I opened the port 1099 on firewall and added a public IP for the desktop. Also added remote address on jmeter.properties on desktop and started jmeter GUI client.
when i hit remote start from client i am able to see the request reached to jmeter server by this console log
Starting the test on host 111.111.111.111:1099 # Wed Apr 25 17:40:09 UTC 2012 (1335375609190)"
but on client i am getting anything and when i checked jmeter-server.log there was some errors:
2012/04/25 17:42:36 ERROR - jmeter.samplers.RemoteListenerWrapper: testStarted(host) java.rmi.ConnectException: Connection refused to host: 222.222.222.222; nested exception is:
java.net.ConnectException: Connection timed out
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
at org.apache.jmeter.samplers.RemoteSampleListenerImpl_Stub.testStarted(Unknown Source)
at org.apache.jmeter.samplers.RemoteListenerWrapper.testStarted(RemoteListenerWrapper.java:83)
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:226)
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:349)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
... 8 more
Please suggest me what i am doing wrong here, i am able to telnet server on port 1099 from client and vice versa.

Have you disabled any firewalls/antivirus software on the remote machine as well?
Also, in addition to the port being opened, your local antivirus software could be denying the connection.
I ran into similar issues and found that disabling antivirus software on both machines helped.

You must change host file of your client (GUI), to this:
xxx.xxx.xxx.xxx localhost <your computer name>
Which: xxx.xxx.xxx.xxx is real local IP of your client, such as 192.168.1.5
Hope this help.

Related

Issue: Error in rconfigure() method java.rmi.ConnectException: Connection refused to host: 192.xx;

I have an issue when i run jmeter distributed :
Error in rconfigure() method java.rmi.ConnectException: Connection refused to host: 192.168.200.22; nested exception is: java.net.ConnectException: Connection timed out: connect
Master: 192.168.200.21
Slave: 192.168.200.22
i have configured remote-hosts in jmeter.properties and started jmeter-server.bat in the master machine and slave machine
enter image description here
How do I fix it?
I try connect to the slave machine
Most probably you need to open port 1099 (or whatever is the value of your server_port property) in your operating system firewall
Also be aware that the slave will need to send the test results back to the master so you need to open client.rmi.localport and up to 3 ports up in the master machine.
And finally for any JMeter configuration overrides you should use user.properties file
More information:
Remote hosts and RMI configuration
Configuring JMeter
How to Perform Distributed Testing in JMeter

Trying to setup Master Slave setup of Jmeter in Cloud, Receiving "java.net.ConnectException: Connection timed out: connect"

I'm Trying to setup Master Slave setup of Jmeter in Cloud.
Things I have done the setup in CLOUD for Master and Slave
I have created rmi.keystore.jks file in Master and copied the same to Slave machine.
I have installed the same versions of Java and Jmeter in both the Machines
I have added IP address of Slave machine in jmeter.properties file of Master
Please help me why I'm facing connection timed out error when trying to execute jmeter script in Cloud machine. Receiving:
Connection refused to host: 10.XXX.XX.XXX; nested exception is: java.net.ConnectException: Connection timed out: connect
If this is really in CLOUD then:
My expectation is that you need to use external IP addresses as I can only see Class B network-type address which most probably cannot be connected from the outer world
You need to ensure that the following ports are open in the CLOUD (whatever you mean by this term) and in operating system firewalls/security groups:
1099 (or whatever port you define as the server_port)
the port you define as the server.rmi.localport
the port(s) you define as the client.rmi.localport
More information:
Remote hosts and RMI configuration
How to Perform Distributed Testing in JMeter

postgres: client could not connect to server

For clarification, please note that I have found several similar questions on stackoverflow, but I could not fix my issue.
psql: could not connect to server: Connection refused” Error when connecting to remote database
psql: How to Allow Remote Access to PostgreSQL database
I am trying to connect to a postgres DB installed in a remote server.
To create a connection from the client I am using QGIS plugin (Add PostGIS Layer):
The error that occurs is:
could not connect to server: Connection refused (0x0000274D/10061) is the server running on host "localhost" (::1) and accepting TCP/IP connection on port 5432
Additionally I added the host's IP Adress in the Host field, but then another error message occurs:
could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "hosts_ip_adress" and accepting TCP/IP connections on port 5432?
My settings are:
Postgres installed version is 10.0 with PostGIS extension
Host operating System: Windows 7
Client operating System: Windows 7
I edited pg_hba.conf to:
host all all 0.0.0.0/0 md5
and changes listen parameter in 'postgresql.conf' to:
listen_addresses = '*'
both files are located in C:\Program Files\PostgreSQL\10\data
restartet pgAdmin4
My devices are in the same network. Each one is connected via LAN cable.
I suppose that a firewall is preventing the connection?

HC can not connect to DC for EAP7.1

I installed eap7.1 by unzip the zip file on RHEL73, but failed to start host control to connect with domain controller, here is detail:
domain controller runs on node1:
/opt/jboss-eap-7.1/bin/domain.sh --host-config=host-master.xml -Djboss.bind.address.management=192.168.56.11
Log:
[Host Controller] 10:53:53,258 INFO [org.jboss.as.remoting] (MSC service thread 1-4) WFLYRMT0001: Listening on 192.168.56.81:9999
Start host controller on node2:
/opt/jboss-eap-7.1/bin/domain.sh --host-config=host-slave.xml -Djboss.bind.address.management=192.168.56.127 -Djboss.domain.master.address=192.168.56.11
I added remotehost1 by using add-user.sh on node1.
I added the authentication info in host-slave.xml on node2:
<server-identities>
<secret value="cmVkaGF0MUA="/>
</server-identities>
...
<domain-controller>
<remote security-realm="ManagementRealm" username="remotehost1">
host-controller failed startup with the following error:
10:57:17,068 WARN [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0001: Could not connect to remote domain controller remote://192.168.56.81:9999: java.net.ConnectException: WFLYPRT0023: Could not connect to remote://192.168.56.81:9999. The connection timed out
...
ERROR [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0002: Could not connect to master. Error was: java.lang.IllegalStateException: WFLYHC0120: Tried all domain controller discovery option(s) but unable to connect.
netstat -an|grep 9999 show it's listening on 192.168.56.11(node1 public interface)
I stopped iptables, firewalled and selinux, I used nc -v 192.168.56.11 9999 and verified the address is accessable from node2, what could be the reason for this?
Best regards
Lan
The issue has been fixed.
The test is based on 2 guest VMs runing on window10 as host, windows 10 was restarted and I didn't notice that the firewall on windows was opened after restart, the VM uses host-only adapter to communication with each other, after disable firewall on windows, the communication works.

SSH -L connection successful, but localhost port forwarding not working "channel 3: open failed: connect failed: Connection refused"

My lab runs RStudio on a server. A couple weeks ago, from my cousin's house, I successfully ssh'd into the server and pulled up the server-side RStudio through my local Firefox browser. Now when I try to access the server RStudio from home (via my own router), it doesn't work. I need help troubleshooting, and I'm guessing it's some problem on the router. I'm running Mac OSX 10.6.8. No idea what the university server's running, but I don't think it's a server-side problem.
Here's how it worked the first time I did it, at my cousin's house: first, I VPN into the university network; then I call SSH with port forwarding; then I open a Firefox browser, connect to my localhost port, and it opens up RStudio on the server side which I can access through my local browser window.
Here's the problem I'm having right now when I try to log-in from my home network:
I can make the VPN connection successfully. I can also set up SSH successfully with this command:
ssh -v -L 8783:localhost:8783 myacct#server.com
Here are the last several lines of the verbose output from the successful ssh command:
debug1: Authentication succeeded (password).
debug1: Local connections to LOCALHOST:8783 forwarded to remote address localhost:8783
debug1: Local forwarding listening on 127.0.0.1 port 8783.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on ::1 port 8783.
debug1: channel 1: new [port listener]
debug1: channel 2: new [client-session]
debug1: Entering interactive session.
Last login: Mon Sep 2 04:02:40 2013 from vpnipaddress
So I think I'm still succeeding at the VPN and SSH stage (though I don't know why it says my last login was Sep 2 when I've logged in a few times since then).
Next, I open Firefox, and I type localhost:8783, and instead of getting an RStudio server app through my browser window, I get the following errors:
In the Firefox browser window, it says: Server not found, Firefox can't find the server at www.localhost.com, Check the address for typing errors etc.
In the terminal window, it says:
debug1: Connection to port 8783 forwarding to localhost port 8783 requested.
debug1: channel 3: new [direct-tcpip]
channel 3: open failed: connect failed: Connection refused
debug1: channel 3: free: direct-tcpip: listening port 8783 for localhost port 8783, connect from 127.0.0.1 port 50420, nchannels 4
I'm not sure what I've got wrong. I haven't changed anything on my laptop since my last successful connection. I'm on my own router (instead of my cousin's), so maybe I need to mess with the firewall? I already allowed ports 22 and 8783 to come through the firewall to my laptop (I'm not even sure I needed to do that though). Help?
ssh -v -L 8783:localhost:8783 myacct#server.com
...
channel 3: open failed: connect failed: Connection refused
When you connect to port 8783 on your local system, that connection is tunneled through your ssh link to the ssh server on server.com. From there, the ssh server makes TCP connection to localhost port 8783 and relays data between the tunneled connection and the connection to target of the tunnel.
The "connection refused" error is coming from the ssh server on server.com when it tries to make the TCP connection to the target of the tunnel. "Connection refused" means that a connection attempt was rejected. The simplest explanation for the rejection is that, on server.com, there's nothing listening for connections on localhost port 8783. In other words, the server software that you were trying to tunnel to isn't running, or else it is running but it's not listening on that port.
Posting this to help someone.
Symptom:
channel 2: open failed: connect failed: Connection refused
debug1: channel 2: free: direct-tcpip:
listening port 8890 for 169.254.76.1 port 8890,
connect from ::1 port 52337 to ::1 port 8890, nchannels 8
My scenario; i had to use the remote server as a bastion host to connect elsewhere. Final Destination/Target: 169.254.76.1, port 8890. Through intermediary server with public ip: ec2-54-162-180-7.compute-1.amazonaws.com
SSH local port forwarding command:
ssh -i ~/keys/dev.tst -vnNT -L :8890:169.254.76.1:8890
glue#ec2-54-162-180-7.compute-1.amazonaws.com
What the problem was:
There was no service bound on port 8890 in the target host. i had forgotten to start the service.
How did i trouble shoot:
SSH into bastion host and then do curl.
Hope this helps.
Note: localhost is the hostname for an address using the local (loopback) network interface, and 127.0.0.1 is its IP in the IPv4 network standard (it's ::1 in IPv6). 0.0.0.0 is the IPv4 standard "current network" IP address.
I experienced this error with a Docker setup. I had a Docker container running on an external server, and I'd (correctly) mapped its ports out as 127.0.0.1:9232:9232. By port-forwarding ssh remote -L 9232:127.0.0.1:9232, I'd expected to be able to communicate with the remote server's port 9232 as if it were my own local port.
It turned out that the Docker container was internally running its process on 127.0.0.1:9232 rather than 0.0.0.0:9232, and so even though I'd specified the container's port-mappings correctly, they weren't on the correct interface for being mapped out.
In my case, it worked after running the vncserver on linux.
Entered this on linux command line : sudo ssh -L 5901:localhost:5901 -i <ssh_private_key> <username>#<public-IP-address>
Type there vncserver
Go to VncViewer application and connect using localhost:5901
I used to meet the similar problem because 'localhost' was not available on server when it restarted network service, e.g. 'ifdown -a' but followed by only 'ifup -eo1'. Besides server is not listening to the port, you can also check 'localhost' is available or not.
ps: Post it just hope someone who has the similar problem may benefit.
I had this problem when I wanted to make a vnc connection via a tunnel.
But the vncserver was not running.
I solved it by opening the channel on the remote machine with vncserver :3.
In my case, it worked after checking the correct IP address of the user credentials
previously I was using the wrong IP of the server
ssh -NfL 127.0.0.1:8084:127.0.0.1:8888 user#ip_address_of_server
after correcting it, works fine.
Encountered with the same error.
In my case, I found the problem was in the config file of jupyter.
Let's say there are 3 computers named A, B, and C, and A can access B but can't access C; B can access C.
To access jupyter-notebook service of C from A, first I established ssh tunnel from A to C through B, then I access jupyter-notebook by typing localhost:port_number, then I got the error.
Finally the problem was solved by writing the "c.NotebookApp.ip = '0.0.0.0'" in jupyter-notebook's config file, where '0.0.0.0' allows the access of other IPs.
Hope someone in a similar situation may benefit.
I had the same error when I was trying to tunnel my mlflow ui over ssh to view remotely. As mentioned in the first answer, the error arises because nothing on the server is listening for the port. This, for me, is because I forgot to start the mlflow app on my remote machine! So in general – make sure the app you're trying to access remotely is running.
Just replace localhost with 127.0.0.1.
(The answer is based on answers of other people on this page.)
This means the remote vm is not listening to current port i solved this by adding the port in the vm server

Resources