I’m trying to bind SonarLint with SonarQube in IntelliJ (version 2023.2.2) I’ve installed the latest SonarLint plugin (184.108.40.206308) and it worked the first time that I added a new connection with my local host (http://localhost:9000/). However now it doesn’t finish after the step where i add the authentication token from SonarQube. Please advise?
Welcome to the community!
What version of SonarQube are you trying to connect to? If you’re not sure, you can check your page footer.
- Version 8.9.9 (build 56886)
You’re trying to connect the shiniest new version of SonarLint to a EOL version of SonarQube. I’m willing to bet you’re hitting an API incompatibility.
Can you upgrade SonarQube and try again?
Thanks for trying the upgrade. Are you getting exactly the same behavior or has it changed any?
No change. Also I’m using my company issued laptop with Zscaler. If I try the same steps on my home PC, it works fine.
Could you please try with 127.0.0.1 instead of localhost? This is sometimes a proxy limitation that resolve both differently.
Also, a timeout of 1 minute should happen if the connection is hanging. Please enable the logs and share the full stack trace if that happens.
Thanks Nicolas. I tried 127.0.0.1 but no luck. Which log should I look for? (I don’t see anything in the SonarLInt Log.
You can enable the Analysis logs and Verbose output in the tool window settings. You should have something logged inside the log tab when the timeout ends.
With your VPN active, is a simple
ping 127.0.0.1 working?
Where is your SonarQube service running? Is it from a docker container, for example?
I’m running SonarQube server from a docker container. Also I enabled the Analysis logs and Verbose output and now I see this error (I can also ping it):
Request failed org.apache.hc.client5.http.HttpHostConnectException: Connect to http://127.0.0.1:80 [/127.0.0.1] failed: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946) 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(Thread.java:833)
Thank you for the information you provided. Unfortunately, it’s difficult for us to act on this matter. The issue is coming from Zscaler, and unless you can share information proving that SonarLint is not working correctly, I recommend discussing this with your IT team.