Connect to SonarQube: Unable to test connection. null

I’m trying to connect to my SonarQube server in Eclipse via SonarLint Bindings >> Connect to a SonarQube server…

I able to supply my server URL, but after adding my Username + Password or Token. I get the following message…

image

SonarQube 8.1.0.31237
Photon Release (4.8.0)
SonarLint 5.0
eclipse.buildId=4.8.0.I20180611-0500
java.version=1.8.0_231

Does anyone have any idea how to track down the cause or resolve this issue of null?

Thank you.

Hi @bilalbailey,

Could you please have a look at the SonarLint console, to see if there is a stack trace? You may have to enable verbose logs to see something interesting. See the FAQ to know how to enable verbose output.

Hi @Julien_HENRY,

  1. There wasn’t anything provided by SonarLint console other than the following…

image

  1. I’ve attached message output from Eclipse Error Log.

!SESSION 2020-04-13 07:55:56.432 -----------------------------------------------
eclipse.buildId=4.8.0.I20180611-0500
java.version=1.8.0_231
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

!ENTRY org.eclipse.egit.core 2 0 2020-04-13 07:56:02.454
!MESSAGE Builtin LFS support not present/detected
!STACK 0
java.lang.ClassNotFoundException: org.eclipse.jgit.lfs.BuiltinLFS cannot be found by org.eclipse.egit.core_5.0.0.201806131550-r
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:508)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.eclipse.egit.core.Activator.registerBuiltinLFS(Activator.java:279)
at org.eclipse.egit.core.Activator.start(Activator.java:212)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:779)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:772)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:729)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1002)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:354)
at org.eclipse.osgi.container.Module.doStart(Module.java:581)
at org.eclipse.osgi.container.Module.start(Module.java:449)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:114)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:505)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:392)
at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:454)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.egit.ui.Activator$RepositoryChangeScanner.(Activator.java:921)
at org.eclipse.egit.ui.Activator.setupRepoChangeScanner(Activator.java:1034)
at org.eclipse.egit.ui.Activator.start(Activator.java:336)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:779)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:772)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:729)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1002)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:354)
at org.eclipse.osgi.container.Module.doStart(Module.java:581)
at org.eclipse.osgi.container.Module.start(Module.java:449)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:114)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:505)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:392)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:470)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:609)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:177)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:931)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:60)
at org.eclipse.ui.internal.services.WorkbenchServiceRegistry.getSourceProviders(WorkbenchServiceRegistry.java:174)
at org.eclipse.ui.internal.services.SourceProviderService.readRegistry(SourceProviderService.java:104)
at org.eclipse.ui.internal.Workbench$34.runWithException(Workbench.java:2378)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4567)
at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:95)
at org.eclipse.ui.internal.Workbench.initializeDefaultServices(Workbench.java:2373)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1654)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2859)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:654)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:597)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
at org.eclipse.equinox.launcher.Main.run(Main.java:1498)

!ENTRY org.eclipse.egit.ui 2 0 2020-04-13 07:56:08.272
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: ‘C:\Users\bilb’. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY org.eclipse.epp.logging.aeri.ide 2 17 2020-04-13 07:56:09.011
!MESSAGE Server ‘org.eclipse.epp.logging.aeri.ide.server’ failed with exception: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path . ; version: 2.0.7.v20170906-1327 !STACK 0 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
at com.google.gson.Gson.fromJson(Gson.java:888)
at com.google.gson.Gson.fromJson(Gson.java:853)
at com.google.gson.Gson.fromJson(Gson.java:802)
at org.eclipse.epp.internal.logging.aeri.ide.server.json.Json.deserialize(Json.java:91)
at org.eclipse.epp.internal.logging.aeri.ide.server.mars.IO.refreshConfiguration(IO.java:66)
at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerConnection.startUp(ServerConnection.java:124)
at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62)
at com.google.common.util.concurrent.Callables$4.run(Callables.java:122)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213)
… 9 more

!ENTRY org.eclipse.core.jobs 4 2 2020-04-13 07:57:13.198
!MESSAGE An internal error occurred during: “SonarLint Telemetry”.
!STACK 0
java.lang.ExceptionInInitializerError
at org.sonarsource.sonarlint.shaded.okhttp3.internal.tls.CertificateChainCleaner.get(CertificateChainCleaner.java:41)
at org.sonarsource.sonarlint.shaded.okhttp3.OkHttpClient$Builder.sslSocketFactory(OkHttpClient.java:782)
at org.sonarsource.sonarlint.core.util.ws.OkHttpClientBuilder.build(OkHttpClientBuilder.java:191)
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.(HttpConnector.java:86)
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.(HttpConnector.java:54)
at org.sonarsource.sonarlint.core.util.ws.HttpConnector$Builder.build(HttpConnector.java:345)
at org.sonarsource.sonarlint.core.telemetry.TelemetryHttpFactory.buildClient(TelemetryHttpFactory.java:39)
at org.sonarsource.sonarlint.core.telemetry.TelemetryClient.upload(TelemetryClient.java:59)
at org.sonarsource.sonarlint.core.telemetry.TelemetryManager.uploadLazily(TelemetryManager.java:96)
at org.sonarlint.eclipse.core.internal.telemetry.SonarLintTelemetry.upload(SonarLintTelemetry.java:148)
at org.sonarlint.eclipse.core.internal.telemetry.SonarLintTelemetry$TelemetryJob.run(SonarLintTelemetry.java:127)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
Caused by: java.security.ProviderException: Initialization failed
at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:376)
at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:103)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.security.jca.ProviderConfig$2.run(Unknown Source)
at sun.security.jca.ProviderConfig$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.jca.ProviderConfig.doLoadProvider(Unknown Source)
at sun.security.jca.ProviderConfig.getProvider(Unknown Source)
at sun.security.jca.ProviderList.loadAll(Unknown Source)
at sun.security.jca.ProviderList.removeInvalid(Unknown Source)
at sun.security.jca.Providers.getFullProviderList(Unknown Source)
at java.security.Security.getProviders(Unknown Source)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.platform.Platform.isConscryptPreferred(Platform.java:196)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.platform.Platform.findPlatform(Platform.java:208)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.platform.Platform.(Platform.java:79)
… 12 more
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_DEVICE_ERROR
at sun.security.pkcs11.wrapper.PKCS11.C_GetSlotInfo(Native Method)
at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:365)
… 29 more

@Julien_HENRY,

I looked at the SonarQube access.log on the server side. I can see my Http get and response code 200.

There seem to be a SSL issue on the client side. Do you have anything special in your configuration? Like a client certificate, or a special device to generate tokens?

Hi @Julien_HENRY,

In the following location C:\Program Files\Java\jre\lib\security\java.security I added a new security.provider to sign a jar file. I commented out the security.provider and now things are working normally.

Thank you so much for your help.

Great, thanks for sharing. FYI I also created a ticket to make the error more visible in this case:
https://jira.sonarsource.com/browse/SLE-347