Error binding workspace

My current sonarqube version v9.0.1
visual code version: 1.55.2 (user setup)
Sonarlint version: 3.6.0

Caused by: org.apache.hc.client5.http.HttpHostConnectException: Connect to https://XXXXXX.cloud:443 [XXXXXXX.cloud/10.244.64.29, sonarqube-roks-test-demo-project.devsecops-bluefringe-clus-3d5d31b2e6cee5459060da8addf55c34-i000.jp-tok.containers.appdomain.cloud/10.244.64.16] failed: Connection timed out: no further information
at java.base/sun.nio.ch.Net.pollConnect(Native Method)

Below are the action taken:

Configured settings.json

"sonarlint.connectedMode.connections.sonarqube": [
    {
        "serverUrl": "https:xxxxxx.cloud",
        "connectionId": "Test-code"
    }
],
"http.proxy": "http://9.x.x.x.x",
"sonarlint.ls.javaHome": "C:\\Program Files\\Java\\jdk-18.0.2"

}

Configured workspace

inside .vscode → settings.json
{
“sonarlint.connectedMode.project”: {
“connectionId”: “Test-code”,
“projectKey”: “xxxx” ,

},

}

Ther error output below:

[Error - 15:55:03.616] Error updating the local storage of the connection with id ‘Test-code’

[Error - 15:55:03.616] java.lang.IllegalStateException: Cannot check server version and status
at org.sonarsource.sonarlint.core.serverapi.system.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:48)
at org.sonarsource.sonarlint.core.container.connected.update.perform.GlobalStorageUpdateExecutor.update(GlobalStorageUpdateExecutor.java:63)

Hi,

Your version of SonarQube is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

9.0.1 → 9.9.2 → 10.2 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

You should also make sure you use the latest version of SoanrLint for VSCode: v3.21.0.\

If your error persists after upgrading both components, please come back to us.

Hi Colin,

Is there a chance to use v9.0 to use sonarqube lint? How about for the late version of sonarqube like 8.9.6? It wouldn’t be compatible with using sonarqube lint in visual studio?

The oldest officially supported version of SonarQube is the last LTS (9.9.2 as of writing).

Technically SonarLint still supports the previous LTS (8.9.6) for a few months after an LTS version is published to allow a smooth migration, but we strongly encourage everyone to use the latest LTS.

I’ve tried to connect to our sonarqube 8.9.6 and configured the sonarqube connection mode including proxy since our sonarqube uses proxy, but still produce error and failed to connect with sonarqube from vscode. Is there suggested solution if we want to keep our sonarqube version 8.9.6?

Is this the same with community version of Sonarqube? Also, if there are documentation that includes the compatiblity of Sonarlint in use of vscode? It would be really appreciated and helpful for us to verify the compatible version. Because we are also consdering java version compatibility

Hey there.

What do you mean by this?

Some projects are under java based in which does have specific version for example jdk7, in which only Sonarqube 8.9.6 only supports. It will change the compatibility if we upgrade to another version of Sonarqube.

Is there a chance to use the previous version of Sonarqube 8.9.6 since it supports the compatible java version that we are using in our project?

I am still receiving this error

Failed: Connect to https://xxxxxxx.cloud:443 [xxxxxxxxcloud/10.244.64.16, xxxxxx.cloud/10.244.64.29] failed: Connection timed out: no further information

Hello

I’ve updated the sonarqube community to 9.9.2 but still the same error.

Based from logs

xxxxxx.cloud/10.244.64.16] failed: Connection timed out: no further information
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Unknown Source)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.apache.hc.core5.reactor.InternalConnectChannel.onIOEvent(InternalConnectChannel.java:64)
at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178)
at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127)
at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:86)
at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
at java.base/java.lang.Thread.run(Unknown Source)

I’ve tried to connect with sonarqube that uses non proxy and it is successful. Is there specific configuration that are needed to implement to sonarqube that uses proxy? From the settings.json I have already set the proxy

“http.proxy”: “http://xxxxxx:3128”,

I see 2 separate questions in this thread.

First about the Java version compatibility: the current version of SonarLint requires a Java 11 runtime (and I see you are using Java 18 in your settings), and recent versions of SonarQube require a Java 17 runtime; however, the analyzed projects themselves can still use an older version of Java - recent versions of SonarQube and SonarLint will still happily analyze projects that use Java 7.

Second about the proxy: SonarLint currently does not honor the IDE settings (we have a ticket to address it). However, you can use the workaround described in this other thread and pass the proxy settings directly to the JVM’s network infrastructure.

Please take a look of my settings.json

{
    "telemetry.enableCrashReporter": false,
    "telemetry.enableTelemetry": false,
    "liveshare.shareExternalFiles": false,
    "liveshare.anonymousGuestApproval": "reject",
    "liveshare.autoShareServers": false,
    "liveshare.autoShareTerminals": false,
    "liveshare.connectionMode": "relay",
    "liveshare.increasedGuestLimit": false,
    "liveshare.joinDebugSessionOption": "Prompt",
    "liveshare.openSharedServers": false,
    "liveshare.showReadOnlyUsersInEditor": "always",
    "liveshare.authenticationProvider": "Microsoft",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "files.exclude": {
        "**/.classpath": true,
        "**/.project": true,
        "**/.settings": true,
        "**/.factorypath": true
    },
    "redhat.telemetry.enabled": false,
    "sonarlint.connectedMode.connections.sonarqube": [
        
        {
            "serverUrl": "https://xxxx.cloud",
            "connectionId": "Test-code",
            "token": "xxxxxxxxxxxxx"
        }
    ],
   
    "sonarlint.connectedMode.project": {
        "projectKey": "tomtest"
    },
    "sonarlint.ls.vmargs": "-Dhttps.proxyHost=http://9.xxx.xxx.xx -Dhttps.proxyPort=3128 -Dhttps.nonProxyHosts=localhost|127.0.0.1|http://9.xxx.xxx.xx",
    "sonarlint.ls.javaHome": "C:\\Program Files\\Java\\jdk-11"
}

I have my current jdk version to jdk 11 as mentioned. But still i am encountering an error

at java.base/java.net.InetAddress$CachedAddresses.get(InetAddress.java:797)
	at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1527)
	at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1380)
	at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1302)
	at org.apache.hc.client5.http.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:43)
	at org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester.connect(MultihomeIOSessionRequester.java:113)
	at org.apache.hc.client5.http.impl.nio.DefaultAsyncClientConnectionOperator.connect(DefaultAsyncClientConnectionOperator.java:100)
	at org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager.connect(PoolingAsyncClientConnectionManager.java:450)
	at org.apache.hc.client5.http.impl.async.InternalHttpAsyncExecRuntime.connectEndpoint(InternalHttpAsyncExecRuntime.java:216)
	at org.apache.hc.client5.http.impl.async.AsyncConnectExec.proceedToNextHop(AsyncConnectExec.java:226)
	at org.apache.hc.client5.http.impl.async.AsyncConnectExec.access$000(AsyncConnectExec.java:82)
	at org.apache.hc.client5.http.impl.async.AsyncConnectExec$1.completed(AsyncConnectExec.java:153)
	at org.apache.hc.client5.http.impl.async.AsyncConnectExec$1.completed(AsyncConnectExec.java:142)
	at org.apache.hc.client5.http.impl.async.InternalHttpAsyncExecRuntime$1.completed(InternalHttpAsyncExecRuntime.java:119)
	at org.apache.hc.client5.http.impl.async.InternalHttpAsyncExecRuntime$1.completed(InternalHttpAsyncExecRuntime.java:110)
	at org.apache.hc.core5.concurrent.BasicFuture.completed(BasicFuture.java:123)
	at org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager$3$1.leaseCompleted(PoolingAsyncClientConnectionManager.java:329)
	at org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager$3$1.completed(PoolingAsyncClientConnectionManager.java:314)
	at org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager$3$1.completed(PoolingAsyncClientConnectionManager.java:274)
	at org.apache.hc.core5.concurrent.BasicFuture.completed(BasicFuture.java:123)
	at org.apache.hc.core5.pool.StrictConnPool.fireCallbacks(StrictConnPool.java:397)
	at org.apache.hc.core5.pool.StrictConnPool.lease(StrictConnPool.java:215)
	at org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager$3.<init>(PoolingAsyncClientConnectionManager.java:271)
	at org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager.lease(PoolingAsyncClientConnectionManager.java:266)
	at org.apache.hc.client5.http.impl.async.InternalHttpAsyncExecRuntime.acquireEndpoint(InternalHttpAsyncExecRuntime.java:105)
	at org.apache.hc.client5.http.impl.async.AsyncConnectExec.execute(AsyncConnectExec.java:141)
	at org.apache.hc.client5.http.impl.async.AsyncExecChainElement.execute(AsyncExecChainElement.java:54)
	at org.apache.hc.client5.http.impl.async.AsyncProtocolExec.internalExecute(AsyncProtocolExec.java:207)
	at org.apache.hc.client5.http.impl.async.AsyncProtocolExec.execute(AsyncProtocolExec.java:172)
	at org.apache.hc.client5.http.impl.async.AsyncExecChainElement.execute(AsyncExecChainElement.java:54)
	at org.apache.hc.client5.http.impl.async.AsyncHttpRequestRetryExec.internalExecute(AsyncHttpRequestRetryExec.java:97)
	at org.apache.hc.client5.http.impl.async.AsyncHttpRequestRetryExec.execute(AsyncHttpRequestRetryExec.java:184)
	at org.apache.hc.client5.http.impl.async.AsyncExecChainElement.execute(AsyncExecChainElement.java:54)
	at org.apache.hc.client5.http.impl.async.AsyncRedirectExec.internalExecute(AsyncRedirectExec.java:112)
	at org.apache.hc.client5.http.impl.async.AsyncRedirectExec.execute(AsyncRedirectExec.java:278)
	at org.apache.hc.client5.http.impl.async.AsyncExecChainElement.execute(AsyncExecChainElement.java:54)
	at org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient.executeImmediate(InternalAbstractHttpAsyncClient.java:347)
	at org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient.lambda$doExecute$0(InternalAbstractHttpAsyncClient.java:205)
	at org.apache.hc.core5.http.nio.support.BasicRequestProducer.sendRequest(BasicRequestProducer.java:93)
	at org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient.doExecute(InternalAbstractHttpAsyncClient.java:178)
	at org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:97)
	at org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:107)
	at org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:116)
	at org.sonarsource.sonarlint.core.http.ApacheHttpClientAdapter.getEventStream(ApacheHttpClientAdapter.java:117)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.getEventStream(ServerApiHelper.java:234)
	at org.sonarsource.sonarlint.core.serverapi.stream.EventStream.connect(EventStream.java:74)
	at org.sonarsource.sonarlint.core.serverapi.stream.EventStream.lambda$handleError$2(EventStream.java:115)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

Could you please share a full extract of the SonarLint output, from the IDE start to when the exception occurs? It’s hard to understand what is going on with only a partial stack trace.

Hi

Below is the full trace of output logs from vscode

[Error - 09:31:17.608] SonarLint local storage is missing or outdated. Falling back to standalone mode.
[Warn  - 09:32:13.085] Failed to request SonarLint notifications
[Warn  - 09:32:13.086] java.lang.IllegalStateException: org.apache.hc.client5.http.HttpHostConnectException: Connect to https://xxxxx.cloud:443 [sonarqube--xxxx.cloud/10.244.xx.xx, xxxxx.cloud/10.244.xx.xx] failed: Connection timed out: no further information
	at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.executeSync(ApacheHttpClient.java:199)
	at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.get(ApacheHttpClient.java:63)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.rawGet(ServerApiHelper.java:93)
	at org.sonarsource.sonarlint.core.serverapi.developers.DevelopersApi.getEvents(DevelopersApi.java:57)
	at org.sonarsource.sonarlint.core.notifications.NotificationChecker.request(NotificationChecker.java:44)
	at org.sonarsource.sonarlint.core.notifications.NotificationTimerTask.requestForServer(NotificationTimerTask.java:78)
	at org.sonarsource.sonarlint.core.notifications.NotificationTimerTask.run(NotificationTimerTask.java:62)
	at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
	at java.base/java.util.TimerThread.run(Timer.java:506)
Caused by: org.apache.hc.client5.http.HttpHostConnectException: Connect to https://sonarqube-xxxxx.cloud:443 [sonarqube-xxxx.cloud/10.244.64.16, sonarqube-xxxxx.cloud/10.244.xx.xx] failed: Connection timed out: no further information
	at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779)
	at org.apache.hc.core5.reactor.InternalConnectChannel.onIOEvent(InternalConnectChannel.java:64)
	at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
	at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178)
	at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127)
	at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:85)
	at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
	at java.base/java.lang.Thread.run(Thread.java:834)

Hi

any update on this?

Hello,

First, please be advised that per our rules, this is a community support forum with no SLA. The people who answer here are mostly product developers answering on a best-effort principle, and mostly in the Central European time zone. So double posting 6h apart to ask for progress is frowned upon.

Second, please follow the VSCode troubleshooting guide and enable verbose logging - unfortunately, there is not much more information in the log extract you shared above. And please surround log extracts in triple back quotes ``` to make them easier to read.

I hope that there will be more information in the verbose logs, because the exception message - Connection timed out: no further information - well… Does not give much information about what is going on :sweat_smile:

Hi ,

apologies for urging, I’ve shared the complete logs from sonarlint. Debug logs have been enabled