Proxy configuration for SonarLint (vscode) - visual-studio-code

Using the vscode extension SonarLint, I'm unable to get it connect to our on-premise SonarQube server. I know that it is a proxy problem, since I can only connect to the SonarQube server using curl via proxy. The output of the SonarLint extension is like:
[Warn - 10:13:44.279] java.lang.IllegalStateException: org.apache.hc.client5.http.ConnectTimeoutException: Connect to https://my_server_url:443 [my_server_url/XXX.XXX.XXX.XXX] failed: 30 SECONDS
at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.executeSync(ApacheHttpClient.java:86)
at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.get(ApacheHttpClient.java:57)
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:566)
at java.base/java.util.TimerThread.run(Timer.java:516)
Caused by: org.apache.hc.client5.http.ConnectTimeoutException: Connect to https://my_server_url:443 [my_server_url/XXX.XXX.XXX.XXX] failed: 30 SECONDS
at org.apache.hc.core5.io.SocketTimeoutExceptionFactory.create(SocketTimeoutExceptionFactory.java:50)
at org.apache.hc.core5.reactor.InternalConnectChannel.onTimeout(InternalConnectChannel.java:93)
at org.apache.hc.core5.reactor.InternalChannel.checkTimeout(InternalChannel.java:67)
at org.apache.hc.core5.reactor.SingleCoreIOReactor.checkTimeout(SingleCoreIOReactor.java:241)
at org.apache.hc.core5.reactor.SingleCoreIOReactor.validateActiveChannels(SingleCoreIOReactor.java:168)
at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:130)
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:833)
The IP address anonymized by me is as expected for said host.
I'm unable to find any information on proxy settings in:
vscode extension settings and corresponding help texts
reading https://www.sonarlint.org/visualstudio/
searching for "proxy" in https://github.com/SonarSource/sonarlint-visualstudio issues and wiki
Is there other documentation available? If not: how to configure the proxy?

Related

localstack v0.11.5 and kcl v1.13.3

I am using kcl v1.13.3 with the latest localstack v0.11.5
The kcl client now uses edge service port 4566.
Are the kcl and localstack versions compatible?
I keep getting the following error:
com.amazonaws.SdkClientException: Unable to execute HTTP request: The target server failed to respond
Caused by: org.apache.http.NoHttpResponseException: The target server failed to respond
com.amazonaws.SdkClientException: Unable to execute HTTP request: The target server failed to respond
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleRetryableException (AmazonHttpClient.java:1163)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper (AmazonHttpClient.java:1109)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute (AmazonHttpClient.java:758)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer (AmazonHttpClient.java:732)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute (AmazonHttpClient.java:714)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500 (AmazonHttpClient.java:674)
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute (AmazonHttpClient.java:656)
at com.amazonaws.http.AmazonHttpClient.execute (AmazonHttpClient.java:520)
at com.amazonaws.services.kinesis.AmazonKinesisClient.doInvoke (AmazonKinesisClient.java:2782)
Caused by: org.apache.http.NoHttpResponseException: The target server failed to respond
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead (DefaultHttpResponseParser.java:141)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead (DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse (AbstractMessageParser.java:259)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader (DefaultBHttpClientConnection.java:163)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader (CPoolProxy.java:165)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse (HttpRequestExecutor.java:273)
at com.amazonaws.http.protocol.SdkHttpRequestExecutor.doReceiveResponse (SdkHttpRequestExecutor.java:82)
at org.apache.http.protocol.HttpRequestExecutor.execute (HttpRequestExecutor.java:125)
at org.apache.http.impl.execchain.MainClientExec.execute (MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute (ProtocolExec.java:185)
at org.apache.http.impl.client.InternalHttpClient.doExecute (InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:56)
at com.amazonaws.http.apache.client.impl.SdkHttpClient.execute (SdkHttpClient.java:72)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest (AmazonHttpClient.java:1285)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper (AmazonHttpClient.java:1101)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute (AmazonHttpClient.java:758)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer (AmazonHttpClient.java:732)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute (AmazonHttpClient.java:714)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500 (AmazonHttpClient.java:674)
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute (AmazonHttpClient.java:656)
at com.amazonaws.http.AmazonHttpClient.execute (AmazonHttpClient.java:520)
Did you already confirm that localstack endpoint is functional on that port? For example:
aws kinesis list-streams --endpoint http://localhost:4566
(If you do not have and want aws cli installed, there's always the option of using docker)
Moreover, it might be helpful for you to share how you are boostrapping the AWS client. It should be something along the lines of:
AwsClientBuilder.EndpointConfiguration endpointConfig = new AwsClientBuilder.EndpointConfiguration("http://localhost:4566",
Regions.EU_WEST_1.getName());
return AmazonDynamoDBClientBuilder.standard()
.withEndpointConfiguration(endpointConfig)
.build();
Note that if you are running your kcl app inside another docker container, then you might want to change from "http://localhost:4566" to "http://localstack:4566".

Install fail: DSX Desktop (IBM_DSX_Desktop - Vs.: 1.2.3 - 3/27/18) on Windows 10

I'm trying to install DSX Desktop (IBM_DSX_Desktop - Vs.: 1.2.3 - 3/27/18)
on Windows 10 and it fails with the following error:
[2018-04-23 16:29:59:0524] [error] Error while pulling
hybridcloudibm/dsx-desktop:rstudio:Error: (HTTP code 500) server error
- {"message":"Get https://registry-1.docker.io/v2/:net/http: request canceled while waiting for connection (Client.Timeout exceeded while
awaiting headers)"}
Based on your error, it seems that Docker is unable to access the registry. You can test it by trying docker pull hello-world, which should also fail with the same error message.
This can happen if you're behind a proxy. If that's the case, this article by Microsoft on how to configure a proxy for docker, may be of use.

failed to find free socket port for process dispatcher when trying remote debug

Highlights:
windows 10 host machine
ubuntu vagrant box (virtualbox) as guest vm
using vagrant port forwarding as like this: config.vm.network "forwarded_port", guest: 1234, host: 12340
IDE: IntelliJ IDEA with Ruby plugin
The Issue:
I've tried to set up remote ruby debug following this guide and getting an error in IDE: "failed to find free socket port for process dispatcher". It looks this issue is not IntelliJ-specific, I was able to reproduce it with latest RubyMine as well.
From IDEA's log
2017-07-07 21:53:03,515 [8879188] INFO - tion.impl.ExecutionManagerImpl - Failed to find free socket port for process dispatcher
com.intellij.execution.ExecutionException: Failed to find free socket port for process dispatcher
at org.jetbrains.plugins.ruby.ruby.debugger.RubyProcessDispatcher.<init>(RubyProcessDispatcher.java:46)
at org.jetbrains.plugins.ruby.ruby.debugger.RubyRemoteDebugRunner.doExecute(RubyRemoteDebugRunner.java:62)
...
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.TwoStacksPlainSocketImpl.socketBind(Native Method)
at java.net.TwoStacksPlainSocketImpl.socketBind(TwoStacksPlainSocketImpl.java:137)
...
I can understand it says Address already in use: JVM_Bind, but how remote debug supposed to work at all then? (I mean Is there any way to access guest vm port not forwarding it before? Clearly no) Any help to solve this issue is much appreciated.
For me the issue was due to another debug session that was open in the background. To prevent that from happening again (and also close all other currently open sessions, once you run the configuration again) select "Single instance only" in the Debug Configuration:

unable to connect to open fire from android

Android application returns error while creating connection with Open Fire while it works fine at my local server.
10-07 14:58:32.347 26785-27124/com.testing.online_soping_app E/XMPPChatDemoActivity: Could not connect to http://demo.vaidiksolutions.in:5222.: remote-server-timeout(504) Could not connect to https://demo.vaidiksolutions.in:5222.
-- caused by: java.net.UnknownHostException: Host is unresolved: http://demo.vaidiksolutions.in
10-07 14:58:32.347 26785-27124/com.testing.online_soping_app E/XMPPChatDemoActivity: Failed to log in as mohit
10-07 14:58:32.347 26785-27124/com.testing.online_soping_app E/XMPPChatDemoActivity: java.lang.IllegalStateException: Not connected to server.
It looks like DNS failed to resolve this domain. Have you tried to ping the server domain?
If the ping is OK, you may try to connect using IP directly.

"Unable to associated Elastic IP with cluster" in Eclipse Plugin Tutorial

I am currently trying to evaluate AWS for my company and was trying to follow the tutorials on the web.
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=2241
However I get the below error during startup of the server instance:
Unable to associated Elastic IP with cluster: Unable to detect that the Elastic IP was orrectly associated.
java.lang.Exception: Unable to detect that the Elastic IP was correctly associated
at com.amazonaws.ec2.cluster.Cluster.associateElasticIp(Cluster.java:802)
at com.amazonaws.ec2.cluster.Cluster.start(Cluster.java:311)
at com.amazonaws.eclipse.wtp.ElasticClusterBehavior.launch(ElasticClusterBehavior.java:611)
at com.amazonaws.eclipse.wtp.Ec2LaunchConfigurationDelegate.launch(Ec2LaunchConfigurationDelegate.java:47)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:696)
at org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3051)
at org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3001)
at org.eclipse.wst.server.core.internal.Server$StartJob.run(Server.java:300)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Then after a while, another error occur:
Unable to publish server configuration files: Unable to copy remote file after trying 4 timeslocal file: 'XXXXXXXX/XXX.zip'
Results from first attempt:
Unexpected exception: java.net.ConnectException: Connection timed out: connect
root cause: java.net.ConnectException: Connection timed out: connect
at com.amazonaws.eclipse.ec2.RemoteCommandUtils.copyRemoteFile(RemoteCommandUtils.java:128)
at com.amazonaws.eclipse.wtp.tomcat.Ec2TomcatServer.publishServerConfiguration(Ec2TomcatServer.java:172)
at com.amazonaws.ec2.cluster.Cluster.publishServerConfiguration(Cluster.java:369)
at com.amazonaws.eclipse.wtp.ElasticClusterBehavior.publishServer(ElasticClusterBehavior.java:538)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:866)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:708)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2731)
at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:278)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Can anyone point me to what I'm doing wrong?
I followed the tutorials and the video tutorials on youtube exactly.
Best Regards
~Jeffrey
Problem has been resolved, it is due to the Elastic IP being assigned to the Server on creation.
Eclipse is unable to connect to the server if it is used.