Update binding failed

802 views
Skip to first unread message

Julien Herr

unread,
Aug 11, 2016, 8:38:21 AM8/11/16
to SonarLint
Hi,

I had an issue with binding update:

IntelliJ complained: SonarLint - Project's binding data is invalid: Please check the SonarLint project configuration
And when I tried a manual update: Error 404 on https://sonarqube.com/api/qualityprofiles/search.protobuf?projectKey=org.testng%253Atestng: Component key 'org.testng%3Atestng' not found

I've just checked my configuration and I had the previous configuration to https://nemo.sonarqube.org.
With https://sonarqube.com, everything works well.

Don't know if the error is expected and/or some improvements on user experience are possible here (better message? advice to check the config url? ...).

Regards,
Julien


Configuration:

SonarLint 2.3

IntelliJ IDEA 2016.2.2 EAP
Build #IU-162.1628.17, built on August 8, 2016
Licensed to Julien Herr
Subscription is active until March 29, 2017
JRE: 1.8.0_77-b03 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation

eric.h...@sonarsource.com

unread,
Aug 11, 2016, 8:45:44 AM8/11/16
to SonarLint
Hi Julien,

Thanks for the valuable information.
Indeed nemo.sonarqube.org was renamed to sonarqube.com, there is an automatic redirection from nemo.sonarqube.org/* to sonarqube.com/* but for this use case it seems that something is not working correctly.

This is a corner case so it should not happen often.

Cheers,

duarte.meneses

unread,
Aug 11, 2016, 11:01:57 AM8/11/16
to SonarLint
Hi,

It seems that the component key is url-encoded twice, first by SonarLint and then again during the redirect (org.testng:testng -> org.testng%3Atestng -> org.testng%253Atestng), causing the error.
Not much we can do in SonarLint to handle this.

Julien Herr

unread,
Aug 11, 2016, 11:14:43 AM8/11/16
to SonarLint
Nice! I didn't catch the double encoding! Certainly, a redirection option is available somewhere.

BTW, it is not a product problem :) 

Eric Hartmann

unread,
Aug 11, 2016, 11:22:59 AM8/11/16
to Julien Herr, SonarLint
Hi Duarte,

My feeling is that the library used by SonarLint does not follow correctly the redirects.
Indeed, if you try :
*   Trying 52.203.228.135...
* Connected to nemo.sonarqube.org (52.203.228.135) port 443 (#0)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* found 697 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* server certificate verification OK
* server certificate status verification SKIPPED
* common name: nemo.sonarqube.org (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: OU=Domain Control Validated,OU=Gandi Standard SSL,CN=nemo.sonarqube.org
* start date: Mon, 17 Aug 2015 00:00:00 GMT
* expire date: Sat, 03 Sep 2016 23:59:59 GMT
* issuer: C=FR,ST=Paris,L=Paris,O=Gandi,CN=Gandi Standard SSL CA 2
* compression: NULL
* ALPN, server did not agree to a protocol
> GET /api/qualityprofiles/search.protobuf?projectKey=org.testng:testng HTTP/1.1
> User-Agent: curl/7.47.0
> Accept: */*
< HTTP/1.1 302 Found
< Date: Thu, 11 Aug 2016 15:19:20 GMT
< Server: Apache
< Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
< Content-Length: 270
< Content-Type: text/html; charset=iso-8859-1
* Ignoring the response-body
* Connection #0 to host nemo.sonarqube.org left intact
*   Trying 52.203.228.135...
* Connected to sonarqube.com (52.203.228.135) port 443 (#1)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* found 697 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* server certificate verification OK
* server certificate status verification SKIPPED
* common name: *.sonarqube.com (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: OU=Domain Control Validated,OU=Gandi Standard Wildcard SSL,CN=*.sonarqube.com
* start date: Fri, 03 Jun 2016 00:00:00 GMT
* expire date: Mon, 03 Jun 2019 23:59:59 GMT
* issuer: C=FR,ST=Paris,L=Paris,O=Gandi,CN=Gandi Standard SSL CA 2
* compression: NULL
* ALPN, server did not agree to a protocol
> GET /api/qualityprofiles/search.protobuf?projectKey=org.testng:testng HTTP/1.1
> User-Agent: curl/7.47.0
> Accept: */*
< HTTP/1.1 200 OK
< Date: Thu, 11 Aug 2016 15:19:34 GMT
< Server: SonarQube
< Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
< Cache-Control: no-cache, no-store, must-revalidate
< Content-Type: application/x-protobuf
< Content-Length: 2688
(binary content)

So the double encoding is not coming from the reverse proxy.

Cheers,

--
You received this message because you are subscribed to a topic in the Google Groups "SonarLint" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarlint/AT7sgVouvDo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarlint+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/0b952da8-5fce-4307-915e-96a9d9871c08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Eric HARTMANN | SonarSource

duarte.meneses

unread,
Aug 12, 2016, 3:47:55 AM8/12/16
to SonarLint
The initial request is done with encoded parameters, so what happens is this:

curl -L --head https://nemo.sonarqube.org/api/qualityprofiles/search.protobuf?projectKey=org.testng%3Atestng
HTTP/1.1 302 Found
Date: Fri, 12 Aug 2016 07:42:03 GMT

Server: Apache
Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
Location: https://sonarqube.com/api/qualityprofiles/search.protobuf?projectKey=org.testng%253Atestng
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 404 Not Found
Date: Fri, 12 Aug 2016 07:42:03 GMT

Server: SonarQube
Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
Content-Type: application/json
Content-Length: 68

The Location header in the 302 is encoding the already encoded URL.
IMO a URL should always be url-encoded, so I don't understand the behaviour of re-encoding the URL for the redirect response.

Anyway, I don't think we should loose more time with this!


On Thursday, 11 August 2016 14:38:21 UTC+2, Julien Herr wrote:

mser...@gmail.com

unread,
Dec 9, 2016, 4:57:25 AM12/9/16
to SonarLint
Having this problem too. 

Any solutions?

-Mike


On Thursday, August 11, 2016 at 2:38:21 PM UTC+2, Julien Herr wrote:

Eric Hartmann

unread,
Dec 9, 2016, 5:05:06 AM12/9/16
to mser...@gmail.com, SonarLint
Hi Mike,

Please use https://sonarqube.com/ instead of https://nemo.sonarqube.org this should fixed your trouble.

Cheers,

--
You received this message because you are subscribed to a topic in the Google Groups "SonarLint" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarlint/AT7sgVouvDo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarlint+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

mser...@gmail.com

unread,
Dec 9, 2016, 5:13:24 AM12/9/16
to SonarLint, mser...@gmail.com, eric.h...@sonarsource.com
Thanks :)

Already solved my issue. Not using sonarcube.com, but another one. Was using http instead of https, causing the redirect.

-Mike

Julien Herr

unread,
Dec 20, 2016, 2:07:33 PM12/20/16
to SonarLint, mser...@gmail.com, eric.h...@sonarsource.com
Hi,

In fact, the issue still exists with sonarqube.com: "http://sonarqube.com" as server is failing when "https://sonarqube.com" is working.

Julien

duarte.meneses

unread,
Dec 21, 2016, 4:22:48 AM12/21/16
to SonarLint, mser...@gmail.com, eric.h...@sonarsource.com
Hi Julien,
As already mentioned, it's caused by the redirect (in that case from http to https) and it's not really an issue as you should use the correct URL instead of relying on the redirection.


Duarte

Julien Herr

unread,
Dec 21, 2016, 4:36:02 AM12/21/16
to SonarLint, mser...@gmail.com, eric.h...@sonarsource.com
Yes, I know but it surprised me because everything worked (the connection test, the download of information, the list of project, ...) except the url bellow :/

At least, something may be added on https://sonarqube.com/about or the configuration of this specific instance could be embedded by default ;)
Reply all
Reply to author
Forward
0 new messages