Can't able to record jmeter with proxy server - proxy

I can't able to record jmeter using with proxy server.
I tried proxy settings in RUN command jmeter.bat -H 192.168.61.202 -P 8080.
Jmeter is recording with the browser actions, but not connecting the internet.
Showing error page on browser.
See the screenshot- Error shown in browser

are you able to record it using normal browser mode? If yes you should check for the firewall and add the specific port numbers to exclusions as some time back I faced the same issue, after i added the port number to excluded in Inbound and Outbound rules and disabling the antivirus setup on my machine made it work

Related

Why Jmeter is not recording application url starting Localhost?

I have an application installed on my machine for learning purposes. Its URL is http://Localhost:8080/*****. JMeter fails to record the requests whenever I use the URL above. If I replace "localhost" with the machine IP, JMeter records without any issues. Loadrunner can record both URLs.
Is it a bug or is the JMeter proxy setting designed in that way?
Thanks...
JMeter doesn't filter loopback URLs, however you browser can do this, at least latest Firefox does:
As per How to Run Performance Tests of Desktop Applications Using JMeter article you might also need to install Microsoft Loopback Adapter
And last, but not the least, the application, browser and JMeter might be looking into different protocols: IPv4 and IPv6, you need to ensure that your localhost hostname resolves into the same IP address for all 3 components.
Latest version of Firefox by default does not allow localhost or 127.0.0.1 to be proxied.
After searching a lot online, finally the following steps worked for me:
Enter about:config in the Firefox URL bar
Search for config network.proxy.allow_hijacking_localhost using the search box and toggle its value to true
Now try recording scripts in Jmeter from localhost related webpages.
Note:
I am using Firefox 80.0.1 (64-bit) and Apache JMeter 5.3
I found reference from Setup JMeter proxy to record activities on a local web application
Please find the about:config page for Firefox browser below.

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.

Setup JMeter proxy to record activities on a local web application

I'm new to JMeter and I want to load test a local web application recording test case with JMeter proxy.
I've first followed instruction here http://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf and all worked fine.
Than:
I launched my web application, say http://localhost:8080/my-application
Setup JMeter web proxy on port 8081
Added an HTTP Request Default to a Thread Group
Addea a Recording Controller
Invoked curl -X GET http://localhost:8081/my-application/index.html
I obtain:
Request are recorded but with wrong parameters, eg. https instead of http
I don't get the requested page with curl, but the exception: org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: https:///my-application/index.html/my-application/index.html
The parameters I've specified in Http Request Default seems to be ingnored? I placed configuration element under HTTP Proxy Server, and tried many settings.
What's going wrong? I missed some basic configuration? I'm using JMeter Proxy in the wrong manner?
Firefox default setting will bypass "localhost, 127.0.0.1" from proxy so your JMeter still not able to record it. You have to empty the "No Proxy for" field, by removing the "localhost, 127.0.0.1". Hope this will help.
Firefox by default does not allow localhost or 127.0.0.1 to be proxied.
You have to modify a setting in about:config
change network.proxy.allow_hijacking_localhost to true
Go To Browser LAN Settings
Make sure "Bypass proxy server for local addresses" is unchecked so that request will hit JMeter proxy server.
Simple steps to be followed for recording in jmeter:
open ur jmeter (contains testplan and workbench in default)
add a threadgroup
add “http request defaults” whic is under config( change the server name i.ethe site u need to record)
add “http proxy server (workbench-rightclick-non testing elements-http proxy server)change the default port 8080 to
someother(eg 9090)
start the proxy server
change the browser settings to manual setup with 9090 port and localhost
http://brittoc.wordpress.com/2011/03/28/jmeter-recording-steps/
I would suggest using Apache's own tutorial on this, it is located here...
JMeter Proxy Tutorial
I see that you say you have followed it, but it may have changed since you used it as some of your steps do not match the current tutorial. Perhaps your version had a bug or you missed a step, because I just double checked it 5 minutes ago and it worked for me and I don't see some of the steps you are talking about above.
I realize you have specific questions about specific errors that you are concerned with, but based on your current unfamiliarity with the process in general, I would abandon the curl part, and just do the basic proxy recording as Apache describes it to get a better general understanding, then take it from there.
The only caveat I would add to their tutorial, they have you create filters to only record certain types of actions, I actually leave those out so it will record all actions, then I just clean it up later.
This way you don't miss anything that could potentially be causing lag because that type of resource was filtered out.
* Now, one thing in your original question, you can try if you have no intention of doing the tutorial, try the browser, not curl, and setup your browser to use a proxy, and make sure the port matches the one you specify in jmeter on the proxy node.
Its very simple to configure. Please have a look to the attached screenshot.

Jmeter's proxy server does not record

New to JMeter. I have downloaded and configured proxy server as the step by step guide from JMeter website. Got right log message such as "protocol 8080 has been created" and "Proxy is up running" etc. But it just did not record localhost:8080 with Tomcat. Change to Neoload to record localhost:8080 and everything works fine but JMeter just does not record anything. There is no errors in the log or within the screen.
Did you start the proxy ?
Try stopping it to see if you get an error in browser.
Are you sure neoload is not already listening to this same port and jmeter could not start on this same one.
Finally you could try using your ip in browser address.
I don't know what mistake have you made. This is what you can do from scratch:
Create empty plan
Add HTTP Proxy Server to WorkBench
In its configuration set port to free one at your computer (maybe 8080 is busy). Click Start
Set browser proxy to localhost, choose the same port as in JMeter's proxy
Browse to any url
--> Samplers should appear in JMeter
You may also like to change Target Controller so samplers will appear in more appropriate place

Resources