This question already has answers here:
Update center behind proxy : howto with https bintray repository?
(3 answers)
Closed 7 years ago.
I have a SonarQube 5.1.2 installation, and I am trying to install and update some plugins, the server have no direct internet access, we have a proxy here, lets say http://1.1.2.3:9191/ is our proxy and we have user and password authentication. Well I have write the sonar.properties accord to the docs
http.proxyHost=10.1.2.3
http.proxyPort=9191
http.proxyUser=theuser
http.proxyPassword=thepassword
I go to the http://sonar.sub.domain:9000/updatecenter/updates and I can see the list of plugins and the updates, so I assume in this point the communication by proxy is OK.
But, when I try to update or install a plugin I have this error in the page (Notice the no proxy message).
Fail to download the plugin (scmsvn, version 1.2) from https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (error is : Fail to download: https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (no proxy)) [hide]
So I do debug logging and try and this appears in logs
2015.09.11 09:32:47 DEBUG web[o.s.a.u.HttpDownloader$BaseHttpDownloader$HttpInputSupplier] Download: http://update.sonarsource.org/update-center.properties (HTTP proxy: 1.1.2.3:9191)
2015.09.11 09:32:49 DEBUG web[o.s.a.u.HttpDownloader$BaseHttpDownloader$HttpInputSupplier] Download: https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (no proxy)
2015.09.11 09:33:10 DEBUG web[o.s.s.p.PluginDownloader] Fail to download the plugin (scmsvn, version 1.2) from https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (error is : Fail to download: https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (no proxy))
org.sonar.api.utils.SonarException: Fail to download: https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (no proxy)
...
And a lot of lines of StackTrace,
So, When it is trying to reaching the update-center.properties resource there is no problem and it goes through proxy as show the (HTTP proxy: 1.1.2.3:9191) message. But when it is trying to download the packages, it just bypass the proxy (and I don't know why) as show the message (no proxy) in the end of the second and third lines
So my question is, how I have to configure SonarQube for use with proxy?
NOTE: this question is similar to SonarQube Proxy Configuration, Tricky but I think is not the same I can see the plugins and updates list, but can download them, so I think is not duplicate.
The problem was that sonar configuration file allows you to set up http proxy but it has nothing to do with https or ftp, then those update sites with https fail.
So the solution:
Add to sonar.properties
sonar.web.javaAdditionalOpts=-Dhttps.proxyHost=10.1.2.3 -Dhttps.proxyPort=9191 -Dhttps.proxyUser=theuser -Dhttps.proxyPassword=thepassword
We also faced this issue, when we were using IP address of proxy. When I switched to proxy name, it worked fine.
DEBUG web[o.s.a.u.HttpDownloader$BaseHttpDownloader$HttpInputSupplier] Download: http://update.sonarsource.org/update-center.properties (HTTP proxy: www-proxy5.in.my.com:11)
DEBUG web[o.s.a.u.HttpDownloader$BaseHttpDownloader$HttpInputSupplier] Download: http://downloads.sonarsource.com/plugins/org/codehaus/sonar-plugins/python/sonar-python-plugin/1.5/sonar-python-plugin-1.5.jar (HTTP proxy: www-proxy5.in.my.com:11)
Try using a proxy name rather IP address and we were not doing any authentication so left the user/password blank. Please post entire stacktrace if this does not work.
Related
I am trying to execute a Gatling scenario to the https://demostore.gatling.io website, after register it through Chrome HAR export (inside my dev environment).
Import and everything goes smoothly, but when I run the scenario I receive the following error:
i.n.c.ConnectTimeoutException: connection timed out: demostore.gatling.io/54.147.169.32:80
I then tried to set up the IntelliJ proxy from Settings → System Settings → HTTP Proxy, setting it to Manually and providing the correct proxy configuration → Test Connection vs http://demostore.gatling.io and the IDE returns Connection Succesful.
Currently, my environment is as follow:
Intellij IDEA 2020.3
Gatling 3.5.1
Ubuntu 20.04 LTS 64 bit (on VirtualBox)
I am behind a VPN with proxy (need this since Maven is configured to use the internal Nexus repo)
This question was answered by #StéphaneLANDELLE, but the thread was deleted after editing something in the above question.
Stéphane was pointing me correctly to: Proxy parameters in the official Gatling documentation and after setting:
http.proxy(Proxy("<URL>", <PORT>).credentials("<user>", "<pwd>"))
everything started working as expected.
We have a SonarQube server which is by default running on HTTP and 9000 port. We decided to use SonarQube over HTTPS configured using IIS reverse proxy and disable HTTP.
Previously in sonar-scanner.properties,sonar.host.url is configured to run as mentioned below.
sonar.host.url=http://localhost:9000 and now we want to change it to sonar.host.url=https://localhost.
On the browser https://localhost works fine. However when I configure this url in sonar-scanner.properties and try to run the sonar analysis, it says url can not be reached. Could anyone give me some suggestions to fix this issue.
Regards,
Sharieff.
Assign a valid certificate to your website. Using localhost is not the best choice; you should use and configure a valid domain name (https:/mycompany.com for example). On the machine you use to analyse you must update the Java Runtime by registering the certificate associated with this name and maybe also other (root) certificates in the certificate chain. See this blog for all the details. After executing these steps you should be able to upload the analysis to you SonarQube instance.
Have a Sonar instance running behind basic auth (not Sonar auth).
Using the Sonar Gradle plugin and specifying the Sonar host URL in gradle.properties via:
systemProp.sonar.host.url=https://admin:password#sonarqube.host.com
However this does not seem to authenticate as in Gradle logs I see:
SonarQube server [https://admin:password#sonarqube.host.com] can not
be reached
If I curl the same URL I get a 200 response as expected.
Not sure why the sonar.host.url isn't playing nicely?
Two things:
proxy authentication between SonarQube Scanner and Server is only
supported since SonarQube 6.1
( SONAR-8084 )
with the above, http.proxyUser and http.proxyPassword are leveraged for basic proxy authentication (and you can leave sonar.host.url to the actual HTTP URL)
I'm not sure if my answer helps with the gradle plugin.
The maven plugin has the problem, that the first request does not use any credentials when calling /batch/index and I had to omit that route from basic auth. I think it's worth checking if that's the case here too.
Even using user:password#server was ignored completely by the plugin for the first call and I had no luck with sonar.useror any proxy user setup.
More details concerning my setup in my answer for the maven runner:
https://stackoverflow.com/a/60132667/1838233
I have created a web test project using the SoapUi GUI (free version). I need a proxy to connect to the Internet. Therefore, I have set the proxy host and port in File->Preferences->Proxy Settings and made sure that it is enabled. I know the proxy settings are correct, because I see the "soapUi Starter Page" properly. But to my surprise, these global proxy settings do not seem to be taken when running the web test case (I just configured a HTTP GET for http://www.google.com), and my request always times out.
I have failed to make it work both with version 4.0.1 and with 4.05 beta 1.
Can anyone help me with this?
Thanks
can you try with http://stackoverflow.com?
It seems soapui doesn't handle redirect right.
I just installed Ant for the first time today and have been playing with it. I am behind a proxy and I feel this is the source of my problems. I have managed to successfully create an ant build file which gets a web page over HTTP through a proxy without any problems. However, when I try to use SVNAnt to export a repository over HTTP through the proxy, I get "svn: HTTP proxy authorization failed" when the proxy task is exactly the same as in my Get build file. Any ideas what the problem might be?
See svn-proxy FAQ.