nodename nor servname provided, or not known in Jmeter - jmeter

When I run my JMeter scripts I get this error to a particular URL (site B) JMeter is trying to access.
nodename nor servname provided, or not known
For this URL, the access control allow origin has been set "site A". I was seeing this in response.
Is this the reason, it is failing from JMeter. Should this call be done only from "Site A". Is their any settings that we can pass from in the headers?

Related

Non HTTP response code: java.net.ConnectException in JMeter

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.

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.

How to set Apache proxy to bypass some hosts & domains

My problem:
My local Apache project returns ERROR CODE: 504 when talking to a local Java project. The local java project is a REST server, while the Apache project is a user interface.
The detailed error message:
Error code: 504 . Reason: ERROR: The requested URL could not be retrieved. The following error was encountered while trying to retrieve the URL: http://localhost:8080/um-rest/usermanagement/authenticate. Connection to 127.0.0.1 failed. The system returned:(111) Connection refused. The remote host or network may be down. Please try the request again. Your cache administrator is servicedesk#niwa.co.nz. Generated Mon, 10 Aug 2015 04:47:41 GMT by www-proxy.niwa.co.nz (squid/2.7.STABLE9)
I've setup the system's network proxies on my Mac:
ticked checkbox "Auto Proxy Discovery"
ticked checkbox "Web Proxy(HTTP)"
ticked checkbox "Secure Web Proxy(HTTPS)"
filled out "Web Proxy Server" host & port for both HTTP & HTTPS: localhost, 127.0.0.1, localhost:8080, 127.0.0.1:8080
Local Apache has also been set with proxy related Module, like proxy_module in httpd.conf file.
More clues:
When I use a browser to visit "http://localhost:8080/um-rest/usermanagement/authenticate" directly, it works. While when I use the apache project to communicate with the java REST server, it returns error. At the end of the whole error message, it says proxy returns this error. For me, it sounds localhost:8080 is still being passed to proxy, which should not happen.
Do I miss some setting of apache proxy, and apache will not use the system's proxy setting? Thanks!
I've found the reason, it's because my php project has a curl_options(with CURLOPT_PROXY => 'http://www-proxy.niwa.co.nz:80') in code. While I was always thinking it's the setting in Apache Server. So the only thing I need to do is commenting this setting.

jMeter on VM with no internet not finishing test

My company is trying to use JMeter in a VM (Windows Server 2003 :( )with no internet connectivity to hit another VM with a server set up and code running on IIS. I set up the ip address in my hosts file, let's call it server.dev for now. Our goal is to hit server.dev/doSomething When we go into IE and hit server.dev we get a response.
We use a keystore with JMeter and it says that it creates it correctly. In JMeter we have an HTTP Request where we hit the server.dev, and the path is set to /doSomething. JMeter then starts, and the log has no errors, but once it says "Creating the HTTPS Trusall Scheme" it hangs. When I put debug flags on it shows that it created the SOAP Request correctly and seems to send it out. The Headers should all be correct. It hangs here for about 1 minute and then shuts down with error with saying something along the lines of "Could not get response from server".
Does anyone have any ideas on where to go from here? I tried to debug for hours, but got nowhere. I can't seem to load up Fiddler to see the network traffic either, since there is no localhost set up.
Most likely that IE uses proxy and JMeter does not. Try other browser, i.e. Firefox (it doesn't respect system proxy settings if you won't import anything during installation) and if Firefox won't be able to establish the connection - my assumption is correct and you're sitting behind the proxy server.
There is a way to "tell" JMeter to use a proxy server, it is controllable via command-line arguments, to wit:
-H [proxy server hostname or ip address]
-P [proxy server port]
-N [nonproxy hosts] (e.g. *.apache.org|localhost)
-u [username for proxy authentication - if required]
-a [password for proxy authentication - if required]
See Using JMeter behind a proxy guide for details and Full list of command-line options for the full list.
You can also configure proxy settings in system.properties file (which lives under /bin folder of your JMeter installation), add the following lines to it:
http.proxyHost=your.proxy.ip.address.or.host.name
http.proxyPort=your.proxy.port
https.proxyHost=your.proxy.ip.address.or.host.name
https.proxyPort=your.proxy.port
And after JMeter restart everything should work as expected.
See Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of setting and overriding them

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.

Resources