# Proxy authentication doesn't work

**URL:** <https://community.sonarsource.com/t/proxy-authentication-doesnt-work/3048>\
**Category:** SonarQube Server / Community Build\
**Tags:** marketplace\
**Created:** [October 2, 2018, 3:33pm UTC](https://community.sonarsource.com/t/proxy-authentication-doesnt-work/3048 "2018-10-02T15:33:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gusme](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@gusme](https://community.sonarsource.com/u/gusme)\
**Post date:** [October 2, 2018, 3:33pm UTC](https://community.sonarsource.com/t/proxy-authentication-doesnt-work/3048/1 "2018-10-02T15:33:38Z")

</div>

Hello,  
I’m using sonarqube-7.2.1 and I tried to update the plugin fron the marketplace, but without success.  
The server is behind a proxy and I set the parameters in the sonar.properties:

# HTTP proxy (default none)

http.proxyHost=xxx.internal  
http.proxyPort=xxx

# HTTPS proxy (defaults are values of http.proxyHost and http.proxyPort)

https.proxyHost=xxx.internal  
https.proxyPort=xxx

# 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=xxx  
http.proxyPassword=xxx  
https.proxyUser=xxx  
https.proxyPassword=xxx

but when i click on the marketplace tab I receive the following error:  
2018.10.02 17:05:54 DEBUG web[AWY1UEhIgFpPZemFAAAd][s.n.w.p.h.HttpURLConnection] sun.net.www.MessageHeader@387fc3ea8 pairs: {null: HTTP/1.1 407 Proxy Authentication Required}{Proxy-Authenticate: BASIC realm=“PROXY\_INTERNET”}{Cache-Control: no-cache}{Pragma: no-cache}{Content-Type: text/html; charset=utf-8}{Proxy-Connection: close}{Connection: close}{Content-Length: 849}  
2018.10.02 17:05:54 ERROR web[AWY1UEhIgFpPZemFAAAd][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](https://update.sonarsource.org/update-center.properties) (HTTP proxy: xxx:xxx)  
…  
Caused by: java.io.IOException: Unable to tunnel through proxy. Proxy returns “HTTP/1.1 407 Proxy Authentication Required”

Do you have any hints about?

Kind regards  
Silvio

---

<div class="post-metadata">

**Author:** ![mlaaksonen-csc](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@mlaaksonen-csc](https://community.sonarsource.com/u/mlaaksonen-csc)\
**Post date:** [April 26, 2019, 10:01am UTC](https://community.sonarsource.com/t/proxy-authentication-doesnt-work/3048/2 "2019-04-26T10:01:47Z")

</div>

Hi,

just pitching in with my comments.

We ran into this same problem when trying to configure proxy authentication for SonarQube 7.6.

In addition to what’s already been mentioned above, here are my observations:

- http.proxyUser and http.proxyPassword (or https.proxyUser and https.proxyPassword) settings from sonar.properties are not passed to java as properties (at least I cannot see them in process arguments), unlike http(s).proxyHost and http(s).proxyPort settings
- setting http(s).proxyUser and http(s).proxyPassword in sonar.properties’ sonar.web.javaAdditionalOpts passes the properties to java, but proxy connection still fails with same error as mentioned in the OP.

Has anyone looked into this yet?

Regards,  
Martti

---

<div class="post-metadata">

**Author:** ![robincher](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/robincher/32/4763_2.png) [@robincher](https://community.sonarsource.com/u/robincher)\
**Post date:** [June 26, 2019, 9:56am UTC](https://community.sonarsource.com/t/proxy-authentication-doesnt-work/3048/3 "2019-06-26T09:56:58Z")

</div>

Hi ,

Updated, managed to solve it.

Add this in sonar.properties

```auto
# Same as previous property, but allows to not repeat all other settings like -Xmx
# https://www.oracle.com/technetwork/java/javase/8u111-relnotes-3124969.html 
sonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djdk.http.auth.tunneling.disabledSchemes=""

```

Robin

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [June 26, 2019, 2:15pm UTC](https://community.sonarsource.com/t/proxy-authentication-doesnt-work/3048/4 "2019-06-26T14:15:23Z")

</div>

Hi Robin,

Thanks for the update!

For the record, I believe this ticket which was fixed in 7.8 may be relevant: [SONAR-11251](https://jira.sonarsource.com/browse/SONAR-11251).

&nbsp;  
Ann
