Unable to connect SonarLint to SonarQube on VS Code - sonarqube

I’m trying to connect my SonarLint Plugin with my SonarQube Server, but when i try to update bindings, this error appear in the SonarLint Output:
Failed to read file: /home/valentina/.sonarlint/storage/38364531464134442d41594f79334277794d7331626178675137786850/projects/486f7473706f74/project_branches.pb
...
Caused by: org.sonarsource.sonarlint.core.serverconnection.storage.StorageException: Failed to read file: /home/valentina/.sonarlint/storage/38364531464134442d41594f79334277794d7331626178675137786850/projects/486f7473706f74/project_branches.pb
...
Caused by: java.nio.file.NoSuchFileException: /home/valentina/.sonarlint/storage/38364531464134442d41594f79334277794d7331626178675137786850/projects/486f7473706f74/project_branches.pb
...
Settings file of SonarLint is the following:
{
"sonarlint.connectedMode.connections.sonarqube": [
{
"serverUrl": "http://localhost:9000",
"connectionId": "86E1FA4D-AYOy3BwyMs1baxgQ7xhP",
"token": "squ_5e74e1ff17a56c1ae026df4663503bd1369f9966"
}
],
"sonarlint.connectedMode.project": {
"connectionId": "86E1FA4D-AYOy3BwyMs1baxgQ7xhP",
"projectKey": "Hotspot"
}
}

Related

Debezium CDC connector says no ocijdbc11 in java.library.path

I am trying to deploy debezium CDC connector to capture data from Oracle DB. We have prepared the Oracle DB and Xstream connector.
I am getting following exception:
{
"name": "test-debezium-2",
"connector": {
"state": "RUNNING",
"worker_id": "10.230.24.80:8084"
},
"tasks": [
{
"id": 0,
"state": "FAILED",
"worker_id": "10.230.24.80:8084",
"trace": "org.apache.kafka.connect.errors.ConnectException: An exception ocurred in the change event producer. This connector will be stopped.\n\tat
io.debezium.connector.base.ChangeEventQueue.throwProducerFailureIfPresent(ChangeEventQueue.java:170)\n\tat
io.debezium.connector.base.ChangeEventQueue.poll(ChangeEventQueue.java:151)\n\tat
io.debezium.connector.oracle.OracleConnectorTask.poll(OracleConnectorTask.java:110)\n\tat
org.apache.kafka.connect.runtime.WorkerSourceTask.poll(WorkerSourceTask.java:259)\n\tat
org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:226)\n\tat
org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:177)\n\tat
org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:227)\n\tat
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat
java.base/java.lang.Thread.run(Thread.java:834)\n
Caused by: java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]\n\tat
java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)\n\tat
java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)\n\tat
java.base/java.lang.System.loadLibrary(System.java:1867)\n\tat
oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3541)\n\tat
java.base/java.security.AccessController.doPrivileged(Native Method)\n\tat
oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3537)\n\tat
oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:269)\n\tat
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)\n\tat
oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:165)\n\tat
oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)\n\tat
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)\n\tat
java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)\n\tat
java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)\n\tat
io.debezium.connector.oracle.OracleConnectionFactory.connect(OracleConnectionFactory.java:25)\n\tat
io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:756)\n\tat
io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:751)\n\tat
io.debezium.connector.oracle.OracleConnection.setSessionToPdb(OracleConnection.java:46)\n\tat
io.debezium.connector.oracle.OracleSnapshotChangeEventSource.prepare(OracleSnapshotChangeEventSource.java:70)\n\tat
io.debezium.relational.RelationalSnapshotChangeEventSource.execute(RelationalSnapshotChangeEventSource.java:104)\n\tat
io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:83)\n\t... 5 more\n"
}
],
"type": "source"
}
I have verified the /usr/lib folder has the ocijdbc11.dll file. I have tried copying the file to /lib as well but I am getting the same error.
I encountered this problem.
First go to oracle download 'instantclient'
instantclient download
unzip------Believe you have copied the ojdbc.jar and xtream.jar to kafka lib.
Then Adding environment variables
vim /etc/profile
add:
exprot LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/you download file addr/libocijdbc11.so
save----wq!
ohhhhhh, remember --- resoure /etc/profile
run again

Error in shadowing bucket in sync gateway

I am trying to connect sync gateway to couchbase server with following config.json file
{
"interface":":4984",
"adminInterface":":4985",
"log":["REST"],
"databases":{
"sync_gateway":{
"server":"http://localhost:8091",
"bucket":"sync_gateway",
"sync":`function(doc) {channel(doc.channels);}`,
"users": {
"GUEST": {
"disabled": false, "admin_channels": ["*"]
}
},
"shadow": {
"server": "http://localhost:8091",
"bucket": "copy"
}
}`enter code here`
}
}
but I am not able to do shadowing...showing following error
2016-06-30T17:54:57.013+05:30 WARNING: Database "sync_gateway": unable to connec
t to external bucket for shadowing: 502 Unable to connect to shadow bucket: No b
ucket named copy -- rest.(*ServerContext)._getOrAddDatabaseFromConfig() at serve
r_context.go:793
enter image description here

Apache Drill failed to connect to HDFS

This is my hdfs version:
NameNode '10.207.78.21:38234'
Started: Mon Feb 02 19:16:43 CST 2015
Version: 1.0.4, r1393290
This is the config of drill file system plugin:
{
"type": "file",
"enabled": true,
"connection": "hdfs://10.207.78.21:38234",
"config": null,
"workspaces": {
"root": {
"location": "/",
"writable": false,
"defaultInputFormat": null
},
"tmp": {
"location": "/tmp",
"writable": true,
"defaultInputFormat": null
}
},
"formats": ...
This is my test data:
bash-4.3$ ./hadoop fs -cat /test
{"key": "value"}
And drill failed executing a query in embedded mode:
0: jdbc:drill:zk=local> SELECT * FROM rpmp.`/test` LIMIT 20;
Error: SYSTEM ERROR: EOFException
[Error Id: fd784c1a-8353-430a-9ae3-08a5154755fe on xxx.com:31010]
(org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception during fragment initialization: Failed to create schema tree: End of File Exception between local host is: "xxx.com/10.95.112.80"; destination host is: "yyy.com":38234; : java.io.EOFException; For more details see: http://wiki.apache.org/hadoop/EOFException
org.apache.drill.exec.work.foreman.Foreman.run():262
java.util.concurrent.ThreadPoolExecutor.runWorker():1145
java.util.concurrent.ThreadPoolExecutor$Worker.run():615
java.lang.Thread.run():745
Caused By (org.apache.drill.common.exceptions.DrillRuntimeException) Failed to create schema tree: End of File Exception between local host is: "xxx.com/10.95.112.80"; destination host is: "yyy.com":38234; : java.io.EOFException; For more details see: http://wiki.apache.org/hadoop/EOFException
org.apache.drill.exec.ops.QueryContext.getRootSchema():169
org.apache.drill.exec.ops.QueryContext.getRootSchema():151
...

failed Jboss6.3 launch

This is the difficulty that i run into when i tried to launch Jboss6.3 with maven project deployment , whereas the launch was OK without deployment of project. Besides,the project deployed and launched OK on Tomcat7.x.
the message returned is like:
Failed to enable apledi.war.
Unexpected HTTP response: 500
Request
{
"address" => [("deployment" => "apledi.war")],
"operation" => "deploy"
}
Response
Internal Server Error
{
"outcome" => "failed",
"failure-description" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"apledi.war\".DEPENDENCIES" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"apledi.war\".DEPENDENCIES: JBAS018733: Failed to process phase DEPENDENCIES of deployment \"apledi.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException
Caused by: java.lang.NullPointerException"}},
"rolled-back" => true
}
This happens when you have different deployment units, but you didn't specify a deployment unitName on your #PersistenceContext. So check, if all your entity managers are annotated properly, example:
#PersistenceContext(unitName = "yourUnitName")
private EntityManager entityManager;

How do I troubleshoot "Error injecting constructor" when adding an amazon S3 repository to ElasticSearch?

I've been following the instructions here
and I've completed step 1, the installation of the plugin. I'm now trying to add a snapshot by executing the following command in sense:
PUT /_snapshot/ElasticSearch
{
"type": "s3",
"settings": {
"bucket": "SomeBucket",
"base_path" : "ElasticSearch",
"secret_key": "xxx",
"acess_key" : "xxx"
}
}
From this I get the following error:
{
"error": "RepositoryException[[ElasticSearch] failed to create repository]; nested: CreationException[Guice creation errors:\n\n1) Error injecting constructor, java.lang.NoClassDefFoundError: org/elasticsearch/common/blobstore/ImmutableBlobContainer\n at org.elasticsearch.repositories.s3.S3Repository.<init>(Unknown Source)\n while locating org.elasticsearch.repositories.s3.S3Repository\n while locating org.elasticsearch.repositories.Repository\n\n1 error]; nested: NoClassDefFoundError[org/elasticsearch/common/blobstore/ImmutableBlobContainer]; nested: ClassNotFoundException[org.elasticsearch.common.blobstore.ImmutableBlobContainer]; ",
"status": 500
}
Any ideas on how to start troubleshooting this? All the information I get in the logs is:
[2015-07-13 16:20:40,519][WARN ][repositories ] [app1050-ela-dacq] failed to create repository [s3][ElasticSearch -d]
org.elasticsearch.common.inject.CreationException: Guice creation errors:
1) Error injecting constructor, java.lang.NoClassDefFoundError: org/elasticsearch/common/blobstore/ImmutableBlobContainer
at org.elasticsearch.repositories.s3.S3Repository.<init>(Unknown Source)
while locating org.elasticsearch.repositories.s3.S3Repository
while locating org.elasticsearch.repositories.Repository
1 error
at org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:344)
at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:131)
at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:69)
at org.elasticsearch.repositories.RepositoriesService.createRepositoryHolder(RepositoriesService.java:409)
at org.elasticsearch.repositories.RepositoriesService.registerRepository(RepositoriesService.java:373)
at org.elasticsearch.repositories.RepositoriesService.access$100(RepositoriesService.java:57)
at org.elasticsearch.repositories.RepositoriesService$1.execute(RepositoriesService.java:112)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:374)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:188)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:158)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/common/blobstore/ImmutableBlobContainer
at org.elasticsearch.repositories.s3.S3Repository.<init>(S3Repository.java:124)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:837)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:57)
at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:830)
at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
Note that the version of elasticsearch I'm using is 1.6.0 so the plugin version is 2.6.0. The output of the command 'java -version' is the following:
openjdk version "1.8.0_45"
OpenJDK Runtime Environment (build 1.8.0_45-b13)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)
It turns out that the version of the plugin that had been installed was actually 2.2.0 instead of 2.6.0.
The answer tlrx gives in here is the clue.
It's also good to remember to restart elasticsearch after you've updated the plugin

Resources