Fitnesse error on Hudson slave - continuous-integration

I have configured fitnesse plugin [version 1.4] with Hudson.
I have set it up to start a new fitnesse server on every job run. Everything work fine when i configure job to run on Hudson Master but when i configure job to run on Hudson slave. I get following error :
Connnecting to http://localhost:9998/somepath?test&format=xml&includehtml
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
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 sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:411)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:525)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:208)
at sun.net.www.http.HttpClient.New(HttpClient.java:291)
at sun.net.www.http.HttpClient.New(HttpClient.java:310)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:987)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:923)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
at hudson.plugins.fitnesse.FitnesseExecutor.getHttpBytes(FitnesseExecutor.java:225)
at hudson.plugins.fitnesse.FitnesseExecutor$1.run(FitnesseExecutor.java:202)
at java.lang.Thread.run(Thread.java:662)
Any suggestions to resolve this?

Did you try connecting connecting it with a different port? It could be that the port is being by some other application and you aren't aware of that. It has happened to me a couple of times.

I was getting the exact same error as you described and it turned out that restarting the server hosting FitNesse cleared out the problem, I believe that a connection was never terminated correctly by the FitNesse Service and therefore new connection were refused. Hopefully this helps someone.

Related

Jmeter RTE Plugin Connection timed out: connect

I'm trying to use Jmeter RTE Plugin to make mainframe tests.
Using a pconn or wc3270, it`s connects good but trying to record or using an existent JMX file, i'm getting a connection exception.
There is any other configuration that I need to do?
com.blazemeter.jmeter.rte.core.exceptions.RteIOException: Communication error wit server: 192.168.2.2
at com.blazemeter.jmeter.rte.core.listener.ExceptionHandler.throwAnyPendingError(ExceptionHandler.java:41)
at com.blazemeter.jmeter.rte.protocols.tn3270.Tn3270Client.connect(Tn3270Client.java:159)
at com.blazemeter.jmeter.rte.sampler.RTESampler.buildClient(RTESampler.java:617)
at com.blazemeter.jmeter.rte.sampler.RTESampler.sample(RTESampler.java:516)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.base/java.net.PlainSocketImpl.waitForConnect(Native Method)
at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:107)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.base/java.net.Socket.connect(Socket.java:608)
at com.bytezone.dm3270.streams.TerminalServer.run(TerminalServer.java:48)
... 1 more
I already tried; reinstall jmeter, java, get a jmeter working installation and script but nothing fixed that issue.
Configs of wc3270 and rte plugin
Unfortunately we're not able to help without seeing your wc3270 and RTE Config (or RTE Recorder) configuration details.
The exception means that JMeter cannot connect to the host 192.168.2.2 on the given port so I would recommend double checking that you can reach that host using telnet or equivalent.
You can also enable debug logging and see whether jmeter.log file contains any clues.
And finally you can check out Testing Mainframe Environments Using Open Source Tools and cross check it with your setup, maybe you're missing something obvious.
Coming back on this thread to share the solution and add an information.
My jmeter test it`s connecting through VPN connection and the problem it was Java trying to use IPv4 over IPv6 for IPv4 connections.
resolution: setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true

Hive problems of connection to port 10000

Currently we are running mapr three node cluster where hive is installed and we use it very frequently for analytics and reporting but due to many connection or some other reason hue(UI panel) show error that
"Could not connect to cm:10000"
and after hs2 stop and start(restart) that start working fine what is issue I am really failed to fix it what should I do and how I can fix it
Could not connect to cm:10000 (code THRIFTTRANSPORT): TTransportException('Could not connect to cm:10000',)
its happening very frequently 1 - 2 times in a day .
Please suggest .
I had the same issue connecting to Port 10000. Below is the error.
WARN jdbc.HiveConnection: Failed to connect to localhost:10000
Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)
Beeline version 3.1.0.3.1.0.0-78 by Apache Hive
This forum has several posts about this error already. Common suggestions are:
Checking hive.log. I am using HDP but do not know the location of
hive.log. I checked the path "/var/log/hive" but files in that folder are
days old.
I checked the port using "netstat -an |grep 10000". It did
not return anything. But I know HiveServer2 is running from the
Ambari interface. Besides, I am able to connect to HiveServer2 via
embedded mode.

Jenkins - slave mac - unable to connect

I have a Jenkins build server (v2.77) installed on a windows server 2016 and I'd like to add a mac as a slave node. I set the node to run via "Java Web Start". On the mac side I downloaded the slave-agent.jnlp file from jenkins, but it doesn't connects to the server.
This is the exception:
java.io.IOException: Failed to connect to 37.210.56.16:49693
at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:243)
at hudson.remoting.Engine.connect(Engine.java:660)
at hudson.remoting.Engine.innerRun(Engine.java:524)
at hudson.remoting.Engine.run(Engine.java:447)
Caused by: java.net.ConnectException: Operation timed out
at java.base/sun.nio.ch.Net.connect0(Native Method)
...
I tried to turn off the windows firewall, to change the TCP port for JNLP agents option in jenkins to fixed/random, but they didn't connected.
Any ideas?
Thanks for help
Finally I found the solution. I rent the server from the google, and in the google cloud console I had to define for this VM instance a firewall rule to accept a specific port number for this JNLP agent connection. Now it's working well.

Problems recording http requests in Jmeter

I'm trying to record my use of a web application, so that I can replicate it for the purpose of load tests. I've never used JMeter before, so I wanted to start with a simple example.
I follow this tutorial: http://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf and when I get to step 23 (navigating to a webpage), the page gives me back an error:
org.apache.http.conn.HttpHostConnectException: Connection to http://jmeter.apache.org refused at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:481) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:298) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1105) at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:236) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391) at java.net.Socket.connect(Socket.java:579) at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) ... 10 more
Has anyone seen this problem before? Have I made a mistake in the proxy-config?
At "step 18. Address – enter “localhost” or the IP address of your system"
I entered localhost, even though the web app I'm recording (http://jmeter.apache.org/index.html) isn't deployed locally. Is that a mistake?
Can anyone give me more insight?
No this is not a mistake. Enter localhost as your proxy.
Also make sure your Testscript recorder is actually on and recording.
Follow The steps mentioned below:
Open Commandline.
Goto the location where the JMeter files are coppied.
Run the following command: jmeter -H proxyname -P 8080 -u username -a password -N localhost (username, password, localhost are optional).
This opens JMeter in UI mode.
Now, follow usual steps to record the application.
Bear in mind that, as it says in the user manual:
Parameters provided on a command-line may be visible to other users on the system.

distributed load testing on aws with jmeter

I have been trying to setup aws ec2 machines for load testing of my web server using jmeter but I am stuck. I have a jmeter client on my local machine and I want to set up multiple jmeter-server nodes on ec2 to do the load testing and I am, thus far, just trying to get one server node up and running. But it hasn't worked out for me yet.
I have the same jmeter running on my local machine and the server and the java version was a little different but I don't think that is the problem. Most of the people have had problems with getting the correct ip for connecting between the client and the server nodes but I, after a lot of searching, have gotten through all those problems. I am stuck at when the server node attempts to return the result and tries to connect to the client, my local machine. The server tries to connect to the external ip address of my local machine. But it throws a connection refused error, which apparently was caused by connection timeout. I guess it's some firewall issue but I tried turning off the firewall on my local machine but it still throws the same error. I am not sure how can I get past this and it's taking way too much time then it should.
Could somebody please suggest me something to solve this? Thanks!
My local machine is a Mac OS X 10.7.5 and my server nodes are on ubuntu.
This is the error that it throws:
2013/01/29 12:23:37 ERROR - jmeter.samplers.RemoteListenerWrapper: testStarted(host) java.rmi.ConnectException: Connection refused to host: xxx.xxx.xxx.10; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
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:636)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at java.net.Socket.connect(Socket.java:495)
at java.net.Socket.<init>(Socket.java:392)
at java.net.Socket.<init>(Socket.java:206)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 8 more
Well, I finally solved the problem. I ended up using ssh reverse tunnels. I am not sure if there is a better way to do this though. So, in case anyone has a similar problem, this is how I did it:
Create a reverse ssh tunnel from the server to the client. So, at client side:
ssh -Nf -R [client.rmi.localport]:localhost:[client.rmi.localport on serverside] user#server
start server and have a client.rmi.localport as well; the port at which the tunnel was created;
start the client as: ./bin/jmeter-server -Djava.rmi.server.hostname=127.0.0.1.
And that's it! You have your distributed testing ready.
Solution that worked for me on Linux/OSX:
1.On the client edit bin/jmeter.properties and add:
remote_hosts=127.0.0.1:55501
client.rmi.localport=55512
mode=Batch
num_sample_threshold=250
2.On the server edit bin/jmeter.properties and add:
server_port=55501
server.rmi.localhostname=127.0.0.1
server.rmi.localport=55511
3.Now connect to the server using this ssh tunel:
ssh -L 55501:127.0.0.1:55501 -L 55511:127.0.0.1:55511 -R 55512:127.0.0.1:55512 user#hostname
4.Edit jmeter-server script to start jmeter.sh
${DIRNAME}/jmeter.sh ${RMI_HOST_DEF} -Dserver_port=${SERVER_PORT:-1099} -s -j jmeter-server.log "$#"
5.Now run on the server:
bin/jmeter-server -Djava.rmi.server.hostname=127.0.0.1
6.And on the client run jmeter with gui or add -n if gui is not needed:
bin/jmeter.sh -Djava.rmi.server.hostname=127.0.0.1
or, with test plan:
bin/jmeter.sh -Djava.rmi.server.hostname=127.0.0.1 -t /path/to/test-plan.jmx
Looks like you have to move your jmeter-master instance (jmeter client) to EC2 instance too.
As per JMeter Distributed Testing Step-by-step:
2. check all the clients are on the same subnet;
For distributed testing to work, the systems must be on the same subnet, otherwise RMI will not be able to connect.
Looks like to be your case: jmeter-slaves are in one subnet (EC2) and jmeter-master in another (your local workstation).
I wrote a free, open source script to help do exactly this. I went through the same issues listed by the OP and, even though I did get things working in the end, it was never great and I wanted something to automate away the hassle.

Resources