Sonarqube 6.1 http.proxy Update Center not working - sonarqube

since update to 6.1 (not absolutly sure its since then), I am not able to connect to Update Center through our proxy, because the authentication will not be done by SonarQube! If I open the backend and go to Administration->System->Update Center I can see in the log file the following exception (very short version):
2016.12.15 11:54:11 ERROR web[][o.s.s.p.UpdateCenterClient] Fail to connect to update center
org.sonar.api.utils.SonarException: Fail to download: https://update.sonarsource.org/update-center.properties (HTTP proxy: MY-PROXY-IP:8080)
(...)
Caused by: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 authenticationrequired"
It works some days ago! I tested the proxy configuration. On the same machine, Jenkins is using the same proxy settings without any problems!
In the file /opt/sonar/conf/sonar.properties I configured the following:
#--------------------------------------------------------------------------------------------------
# UPDATE CENTER
# Update Center requires an internet connection to request http://update.sonarsource.org
# It is enabled by default.
#sonar.updatecenter.activate=true
# HTTP proxy (default none)
http.proxyHost=MY-PROXY-IP
http.proxyPort=8080
# HTTPS proxy (defaults are values of http.proxyHost and http.proxyPort)
#https.proxyHost=
#https.proxyPort=
# NT domain name if NTLM proxy is used
#http.auth.ntlm.domain=
# SOCKS proxy (default none)
#socksProxyHost=
#socksProxyPort=
# Proxy authentication (used for HTTP, HTTPS and SOCKS proxies)
http.proxyUser=MY-PROXY-USER
http.proxyPassword=MY-PROXY-PASSWORD
For me it looks like the authentication will not be done. I am not able to look into the proxy serverĀ“s log file.

I had similar problem. In my case it caused by JDK scheduled change. Disable Basic authentication for HTTPS tunneling of 8u111 Update Release.
I can workaround to append a property in /opt/sonar/conf/sonar.properties as follows.
sonar.web.javaAdditionalOpts=-Djdk.http.auth.tunneling.disabledSchemes=""

Related

How to configure azure-cli behind a corporate proxy on Windows

I'm using Windows 10 behind a corporate proxy and az --version outputs the following:
azure-cli 2.5.1
command-modules-nspkg 2.0.3
core 2.5.1
nspkg 3.0.4
telemetry 1.0.4
...
Unable to check if your CLI is up-to-date. Check your internet connection.
Furthermore, az extension list-available throws:
Unable to get extension index.
Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='aka.ms', port=443): Max retries exceeded with url: /azure-cli-extension-index-v1 (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))
How to configure azure-cli for the corporate proxy?
Download local proxy configuration from http://wpad/wpad.dat
At the beginning of the wpad.dat file there is a line similar to CWSProxy="PROXY proxy.corporation.com:8082";
Enter the proxy server to environment variable HTTPS_PROXY, e.g. in bash: export HTTPS_PROXY="proxy.corporation.com:8082"
Now az extension list-available connects. However, for some reason, az --version is still giving Unable to check if your CLI is up-to-date. Check your internet connection. You can now anyway install extensions such as az extension add --name azure-devops.
From https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest&tabs=azure-cli#proxy-blocks-connection
For Windows 10, you could check the proxy settings in the Settings > Network & Internet > Proxy pane. Contact your system administrator for the required settings, or for situations where your machine may be configuration-managed or require advanced setup.

gcloud login network connection failed issue

I tried to connect gcloud with gcloud init. I got Network connection error.
I tried to fix with Network connection problems in Google Cloud SDK while I have access to google or website like google app engine in my browser
gcloud config set proxy/type socks5
gcloud config set proxy/address 127.0.0.1
gcloud config set proxy/port 1086
But it still does not work for me.
My log is:
Welcome! This command will take you through the configuration of gcloud.
Settings from your current configuration [default] are:
core:
disable_usage_reporting: 'False'
proxy:
address: 127.0.0.1
port: '1080'
type: socks5
Pick configuration to use:
[1] Re-initialize this configuration [default] with new settings
[2] Create a new configuration
[3] Switch to and re-initialize existing configuration: [cindy]
Please enter your numeric choice: 1
Your current configuration has been set to: [default]
You can skip diagnostics next time by using the following flag:
gcloud init --skip-diagnostics
Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.
ERROR: Reachability Check failed.
Cannot reach https://www.google.com (error)
Cannot reach https://accounts.google.com (error)
Cannot reach https://cloudresourcemanager.googleapis.com/v1beta1/projects (error)
Cannot reach https://www.googleapis.com/auth/cloud-platform (error)
Cannot reach https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json (error)
Network connection problems may be due to proxy or firewall settings.
Current effective Cloud SDK network proxy settings:
type = socks5
host = 127.0.0.1
port = 1080
username = None
password = None
What would you like to do?
[1] Change Cloud SDK network proxy properties
[2] Clear all gcloud proxy properties
[3] Exit
It is due to redirection from goolge account to localhost for acquiring token Try to login using firefox
Considering the error and mainly the following part of the error, it seems that you are facing issues with your proxy and firewall settings and configuration.
Network connection problems may be due to proxy or firewall settings.
Due to this error, you need to configure your SDK to be used with proxy and firewall. I would recommend you to take a look at the documentation Configuring Cloud SDK for use behind a proxy/firewall, to get more information and steps on how to achieve it and avoid the error that you are facing.
Besides that, I could find the below two posts from the Community, of users that are facing similar cases that you are facing.
ERROR: Reachability Check failed. #51
gcloud utility not working #25
Let me know if the information helped you!
For the people who still have this problem.
Try to use IPV4 first as IPV6 is still buggy for many systems.
For Linux, you can just uncomment or add the following line in /etc/gai.conf file:
precedence ::ffff:0:0/96 100
For other systems, you can google the set-up

Gradle : Unable to tunnel through proxy

I am trying to run a blank Flutter project behind a corporate proxy requiring basic authentication and self-signing HTTPS connections.
I added the necessary config in ~/.gradle/gradle.properties and in ~/.profile. I also imported my root certificate in $JAVA_HOME/jre/lib/security/cacerts and told Gradle to use it. I even tried this solution and set java.net.useSystemProxies=true in $JAVA_HOME/jre/lib/net.properties.
But, still, it doesn't build, and it asks for authentication.
flutter run
Launching lib/main.dart on Nexus 5 in debug mode...
Initializing gradle... 0.8s
Resolving dependencies...
* Error running Gradle:
Exit code 1 from: ~/GitLab/n.gendron/techno_store/android/gradlew app:properties:
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
IOException: https://dl.google.com/android/repository/addons_list-3.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
IOException: https://dl.google.com/android/repository/addons_list-2.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
IOException: https://dl.google.com/android/repository/addons_list-1.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
Failed to download any source lists!
This guide helped me a lot trough this process, and this one helped me import the CA, but now I'm stuck.
Any idea?
You need in gradle/gradle.properties write:
# Project-wide Gradle settings.
...
systemProp.http.proxyHost=proxy.company.com
systemProp.http.proxyPort=443
systemProp.http.proxyUser=username
systemProp.http.proxyPassword=password
systemProp.http.auth.ntlm.domain=domain
systemProp.https.proxyHost=proxy.company.com
systemProp.https.proxyPort=443
systemProp.https.proxyUser=username
systemProp.https.proxyPassword=password
systemProp.https.auth.ntlm.domain=domain
...

Mulesoft - SFTP Component to go through SOCKS Proxy

I was hoping someone could help.
I am trying to sftp to a remote server that is behind a firewall. I have a proxy setup and can sftp via the unix terminal succesfully. However when using mulesofts SFTP connector I get a timeout. From research it looks like this is because it is run on the JVM.
Mule comes with wrapper.conf to update any jvm settings so I have set the following settings:
wrapper.java.additional.15=-DsocksProxyHost:hostname
wrapper.java.additional.16=-DsocksProxyPort=1080
When I do this the Mule service no longer runs and get the following error:
WrapperManager Error: Unexpected exception opening backend socket: java.net.SocketException: Can't connect to SOCKS proxy:Invalid argument or cannot assign requested address
Hopefully someone can assist.
Thank you.
Perhaps typo in the
-DsocksProxyHost:hostname
Should be = rather than :.
The port is unnecessary, 1080 is the default. Documentation is here, see section 2.4 for SOCKS
http://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html

Git: fatal: unable to access 'https://MY_REPO': Received HTTP code 504 from proxy after CONNECT

I have a repository on our internal servers. If i try to pull/clone an existing repository i'm getting this error message.
But if i type this repo-link to Chrome, i can see my repository without any problem. We use corporate proxies and i've configurem them in ENV-Variable on windows and git global settings.
Git global settings:
http.sslverify=false
user.name=My name
user.email=myname#domain.com
http.proxy=http://PROXY:8080/
https.proxy=http://PROXY:8080/
I should remove the proxy settings everywhere to connect my VPN. Because proxy server blocks my request because of non-existing server address.
Removing proxy for a local repository is also easy:
git config remote.origin.proxy ""

Resources