Non HTTP response code: java.net.ConnectException in JMeter - amazon-ec2

I am new to JMeter. I have created one script for our application. Now our complete system architecture is deployed on AWS. So, we have created one EC2 instance as "Load Generator" to run my script with 100 user load. Script is working fine on my local system but it is not working on that instance.
Every time I am getting below error. I have also tried to run from non-GUI mode as well but result is same.
Error: Response code: Non HTTP response code: java.net.ConnectException Response message: Non HTTP response message:
Connection timed out (Connection timed out)
Please help me out here. How to resolve this issue on EC2 instance.

I had a similar problem (my tests were executed on Microsoft's Azure).
The issue was that the system being tested had a IP white list.
When I ran it on my local machine, it was already within our VPN
(whitelisted).
When it was executed on Azure, the VM had a
dynamic IP which was not whitelisted.

Related

Connection refused exception on JMeter Script Execution in VSTS

I was trying to execute the JMeter jmx scripts in Microsoft Visual Team Services (VSTS), The scripts were working fine when executed using JMeter tool[GUI as well Non-GUI mode] but when tried to execute the same in VSTS, I was facing the below mentioned issues,
1) Non HTTP response message: Connection refused: connect – For localhost application,
2) Non HTTP response code: java.net.UnknownHostException – When used to run using IP address.
It looks like you're trying to test application deployed locally from Internet. Make sure you're using public IP address instead of private, you can determine it using service like What Is My IP?, however you need to ensure your application is not behind NAT and VSTS host(s) can reach it. It might be also a matter of firewall configuration preventing inbound connections from VSTS hosts(s).
See Top 3 Options for Running Performance Tests Behind Your Corporate Firewall article for more information and possible solutions.

Host resolution error while recording in Jmeter

I am getting one error in Jmeter while trying to do some actions in my application. In my company, I am using some XX proxy to connect to the Internet. However, while trying to record using Jmeter , am using localhost with the port as 80. After did basic settings in workbench -- click on start-- navigate to the browser to do some actions. But, when I click on any button in my application. I am getting this error
java.net.UnknownHostException: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server at
Try to record the application after changing the port different from 80.

SONAR not working on Web Browser

I am trying to access Sonar through web browser. I already started it on my terminal but when I try to access it on web browser through , it shows nothing. However, the status shows Sonar is running. How can I make it running on the web browser ?
The configuration for Sonar web is:
sonar.web.host=127.0.0.1
sonar.web.context=/sonar
sonar.web.port=9000
sonar.web.host=127.0.0.1
I think this is the problematic line in your conf. This line indicates which IP address the Web Server will bind to. If you set it to 127.0.0.1, then Server will only respond if you reach to it through the IP 127.0.0.1, that is, you'll only be able to access it from localhost, though IPv4. (Your browser will probably prefer IPv6, with ::1 being the host)
Comment out the line (prepending a #) in order to have it listen to every IP the machine is called by.
If you can verify access from the host machine itself, but the above doesn't help, then you might want to check if your firewall is blocking requests.
With the settings you provided, make sure you're using this URL and trying to access the server from the same box: http://127.0.0.1:9000/sonar/
If you're attempting to reach http://127.0.0.1:9000/ and getting the empty page, it's due to the sonar.web.context value you're using.
Note: unless you're hosting SonarQube in an external webserver, you don't need to set the sonar.web.context, in which case, you would just go to http://127.0.0.1:9000/
If this URL isn't working for you, I would suggest looking at the SonarQube server logs in the /logs folder to determine if there were any errors starting the server. If so, you'll want to update this posting with the details from the log, including which operating system you're running.

Performance Testing in AWS using jmeter tool returns 403 error after a duration of 45- 60 minutes duration

I am running a performance test in AWS environment using jmeter tool. we have a cluster with auto scaling enabled and having memcache session failover jars. we are using jmeter master slave so we don't get the response data from the JTL file. The response code returned after 45 minutes of test durations:
Response code: 403
Response message: Forbidden
How to resolve the issue?
After researching more I found the cause ca be session failover jars of the memcache I have upgraded the jars version to 1.6.5 but still facing the same problem.
Are you using an ELB? If so, read here: http://community.blazemeter.com/knowledgebase/articles/94060-testing-amazon-elbs
It looks like you are using an ELB. An ELB has a CNAME attached to it. AWS changes the IP attached to the CNAME. This happens quite often.
When your test starts, JMeter does a DNS lookup for the ELB CNAME. The response is then cached. From this point onwards, the test sends traffic to the IP address that was in the response that is now cached.
The result is that at some point (after the IP changed) you are testing an old IP that can now belong to a different server or belong to NO server. This is probably why you are getting the 403.
To resolve this, you need to set Cache TTL to 0 (zero). This will instruct JMeter to NOT cache the DNS lookup response and always do it again (which is more realistic in any case). You should add the following to your JMeter line: -Dsun.net.inetaddr.ttl=0.
More info here: http://community.blazemeter.com/knowledgebase/articles/94060-testing-amazon-elbs

Amazon Instance Ec2 Connection Timeout

I am using Amazon EC2 services & and its working correctly but suddenly from 3-days before when we try to access our instance using ssh connection we got following error:
"ssh: connect to host ec2----***.compute-1.amazonaws.com port **: Connection timed out"
when I try to access our sites deployed on our EC2 instance, I received the same error ,
"The connection has timed out
The server at ec2----***.compute-1.amazonaws.com is taking too long to respond"
there is no problem in network connection from our side as we are able to access other web site and services smoothly.
I can't even able to access hosted site without this.
I encountered the same problem.
I followed the troubleshooting in http://alestic.com/2010/05/ec2-move-ebs-boot-instance
Then when I tried to start a new instance, I got an message from Amazon:
Server.InsufficientInstanceCapacity: We currently do not have sufficient m1.small capacity in the Availability Zone you requested (us-east-1b). Our system will be working on provisioning additional capacity. You can currently get m1.small capacity by not specifying an Availability Zone in your request or choosing us-east-1d, us-east-1c, us-east-1a.
Maybe, you have an instance is us-east-1b, too.
You can try to access the System Console (either via the amazon web console or elasticfox) and check for any errors/messages that might help you arrive at the cause of this.
In ~/.ssh/config, add the following lines:
ServerAliveInterval 50
This will keep on pinging the server every 50 seconds to keep the connection alive.

Resources