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.
Related
I'm trying to expose my local web server IIS Express using ngrok.
Followed steps from https://ngrok.com/docs and fired the tunnel, but can't get response.
Screenshot - ngrok fired
I'm using Visual studio via IIS Express. (Debug mode, local website works well.)
If local website not started, access to XXXXX.eu.ngrok.io will get error directly:
Failed to complete tunnel connection
The connection to https://2713343d.eu.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:44320.Make sure that a web service is running on localhost:44320 and that it is a valid address.The error encountered was: dial tcp [::1]:44320: connectex: No connection could be made because the target machine actively refused it.
No errors shows on Ngrok's Web Interface too.
Is there any way to check where the problems are? or see ngrok's log?
Indeed it works with http, but it is strongly recommended to work with https, so you should properly start ngrok in order to work with https:
ngrok http -host-header=localhost https://localhost:{your_IIS_express_port}
After this you should be able to access your URL:
https://{id}.ngrok.io
Credits
Try make your service as http, not https.
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
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.
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
I made a proxy server,and I'm testing it using a client name Proxifier.
I made the first part with autentication to work,but i don't know what to do next.
I called Connect() an the address received from the client,but that is from a webpage.
So i need to connect to the webpage? What next then? I can't browse the net with the proxy on.
So i hope someone could help me an what to do next.Thanks.
to test a proxy server is simple as these.
In your browser, configure the proxy settings to the ip:port of your proxy server, in these case if you are testing on local machine, your ip is 127.0.0.1 and you are listening on port 80.
browse a webpage mostly google with the browser and see if it loads properly, if it does, then you proxy server is working