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.
Related
i need to enable https into sonarqube. I already have a keystore (JKS File), but i don't know how do this operation.
thanks!
You need to install a reverse proxy with proper TLS configuration.
Here are some information :
https://docs.sonarqube.org/display/SONAR/Securing+the+Server+Behind+a+Proxy
It might be possible for you to configure it according "Running SonarQube 5.2 Over HTTPS". Please take note for the know limitations:
Because Tomcat is embedded in SonarQube in a "black box" mode, only
few Tomcat parameters can be customised
Otherwise it will be necessary to "Secure the Server Behind a Proxy". In that case:
The reverse proxy must be configured to set the value
"X_FORWARDED_PROTO: https" in each HTTP request header. Without this
property, redirection initiated by the SonarQube server will fall back
on HTTP.
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 installed Android studio and i want to build first app. Unfortunately "Gradle project sync failed" Error: Connection refused: connect.
I know it's because i use proxy server (my company does). I already made changes in Setings->HTTP Proxy-> Auto-detect proxy settings, but I guess, Gradle doesn't look on it. I read I should make write in gradle.properties my proxy server, user and password, but I don't know this parameters, and i don't know how to get them (even if it is available or not).
Can you help me? there are two ways: 1. If you know tell me how to avoid this problem without that parameters. For example like Auto-detect 2. How to get those parameters?
Apparently this code works
systemProp.http.proxyHost=<hostname>
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=
systemProp.http.proxyPassword=
systemProp.http.nonProxyHosts=localhost
or for https
systemProp.https.proxyHost=<hostname>
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=
systemProp.https.proxyPassword=
systemProp.https.nonProxyHosts=localhost
when password isn't set up.
It should be in gradle.properties file.
Enable No Proxy from Appearance and Behavior -> System Settings-> HTTP Proxy -> NO Proxy
This is worked for me
I'm using cargo to deploy my project to a test server. The cargo config is fine, works well on my local machine. However, on the hudson machine it always fails with a stacktrace showing:
Caused by: java.io.IOException: Server returned HTTP response code: 407 for URL: http://ppdtest.kbcsecurities.net:8080/manager/text/list
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:507)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:644)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:657)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:173)
... 34 more
The thing is however, I have NO proxy defined anywhere. Not in my setting.xml, not in the pom.xml files (parent or childs).
Anyone has some pointers or help to offer?
Are you sure that this is a proxy problem? The URL looks like it's Tomcat's Manager application. Can you verify that you're using the right credentials for your Tomcat instance?
If you want to make sure that no proxy is involved, please check the environment variables of the machine to see whether there's any global proxy setting that Java could be picking up, either in the global Maven options or in the options for Hudson.
One other thing to try is whether you can access the URL in question using a browser from the Hudson machine. If it's a headless machine, you can use a terminal browser like links and see if you can authenticate with that.
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.