Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.22.1] couldn't create connection to server (Code: -32603) #3305

Closed
enihcam opened this issue Sep 17, 2023 · 9 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#2861
Closed

Comments

@enihcam
Copy link

enihcam commented Sep 17, 2023

[Error - 11:43:29 PM] Language Support for Java (Syntax Server) client: couldn't create connection to server.
  Message: Internal error.
  Code: -32603 
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:67)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$1(ParentProcessWatcher.java:144)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:65)
	... 12 more
Caused by: java.lang.IllegalArgumentException: URI has a query component
	at java.base/sun.nio.fs.UnixUriUtils.fromUri(Unknown Source)
	at java.base/sun.nio.fs.UnixFileSystemProvider.getPath(Unknown Source)
	at java.base/java.nio.file.Path.of(Unknown Source)
	at java.base/java.nio.file.Paths.get(Unknown Source)
	at org.eclipse.jdt.ls.core.internal.ResourceUtils.canonicalFilePathFromURI(ResourceUtils.java:224)
	at org.eclipse.jdt.ls.core.internal.handlers.BaseInitHandler.handleInitializationOptions(BaseInitHandler.java:86)
	at org.eclipse.jdt.ls.core.internal.handlers.BaseInitHandler.initialize(BaseInitHandler.java:64)
	at org.eclipse.jdt.ls.core.internal.syntaxserver.SyntaxLanguageServer.initialize(SyntaxLanguageServer.java:145)
	... 17 more
Environment
  • Operating System:
    Linux 5.4.119

  • JDK version:
    17.0.3

  • Visual Studio Code version:
    1.82.2

  • Java extension version:
    1.22.1

Steps To Reproduce
  1. [step 1]
  2. [step 2]

[Please attach a sample project reproducing the error]
Please attach logs

Current Result
Expected Result
Additional Informations
@snjeza
Copy link
Contributor

snjeza commented Sep 17, 2023

@enihcam Could you try to clean your workspace?

  • Open the command palette (F1)
  • select Java: Clean the Java Language Server Workspace
  • select Restart and delete from the confirmation prompt

and show your log - Enable logging

@enihcam
Copy link
Author

enihcam commented Sep 17, 2023

@enihcam Could you try to clean your workspace?

  • Open the command palette (F1)
  • select Java: Clean the Java Language Server Workspace
  • select Restart and delete from the confirmation prompt

and show your log - Enable logging

the following error message keeps repeating and flooding non-stop:

mainThreadExtensionService.ts:82 Error: Internal error.
	at /root/.vscode-server/extensions/redhat.java-1.23.2023091604-linux-x64/dist/extension.js:2:1086579
	at ie (/root/.vscode-server/extensions/redhat.java-1.23.2023091604-linux-x64/dist/extension.js:2:1086873)
	at /root/.vscode-server/extensions/redhat.java-1.23.2023091604-linux-x64/dist/extension.js:2:1081657
	at Immediate.<anonymous> (/root/.vscode-server/extensions/redhat.java-1.23.2023091604-linux-x64/dist/extension.js:2:1081677)
	at process.processImmediate (node:internal/timers:476:21)
$onExtensionRuntimeError @ mainThreadExtensionService.ts:82
N @ rpcProtocol.ts:455
M @ rpcProtocol.ts:440
H @ rpcProtocol.ts:370
G @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
w @ event.ts:1107
fire @ event.ts:1138
fire @ ipc.net.ts:650
z @ ipc.net.ts:1015
(anonymous) @ ipc.net.ts:875
w @ event.ts:1107
fire @ event.ts:1138
acceptChunk @ ipc.net.ts:394
(anonymous) @ ipc.net.ts:350
(anonymous) @ browserSocketFactory.ts:230
w @ event.ts:1107
fire @ event.ts:1138
i.onload @ browserSocketFactory.ts:91
console.ts:137 [Extension Host] rejected promise not handled within 1 second: Error: Internal error.
m @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
N @ rpcProtocol.ts:455
M @ rpcProtocol.ts:440
H @ rpcProtocol.ts:370
G @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
w @ event.ts:1107
fire @ event.ts:1138
fire @ ipc.net.ts:650
z @ ipc.net.ts:1015
(anonymous) @ ipc.net.ts:875
w @ event.ts:1107
fire @ event.ts:1138
acceptChunk @ ipc.net.ts:394
(anonymous) @ ipc.net.ts:350
(anonymous) @ browserSocketFactory.ts:230
w @ event.ts:1107
fire @ event.ts:1138
i.onload @ browserSocketFactory.ts:91
console.ts:137 [Extension Host] stack trace: Error: Internal error.
	at /root/.vscode-server/extensions/redhat.java-1.23.2023091604-linux-x64/dist/extension.js:2:1086579
	at ie (/root/.vscode-server/extensions/redhat.java-1.23.2023091604-linux-x64/dist/extension.js:2:1086873)
	at /root/.vscode-server/extensions/redhat.java-1.23.2023091604-linux-x64/dist/extension.js:2:1081657
	at Immediate.<anonymous> (/root/.vscode-server/extensions/redhat.java-1.23.2023091604-linux-x64/dist/extension.js:2:1081677)
	at process.processImmediate (node:internal/timers:476:21)

@enihcam
Copy link
Author

enihcam commented Sep 17, 2023

same as java language server log file:

!SESSION 2023-09-18 07:23:22.155 -----------------------------------------------
eclipse.buildId=unknown
java.version=17.0.8.1
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -data /root/.vscode-server/data/User/workspaceStorage/d61691ba20bdbfe3703d540237fc436a-1/redhat.java/jdt_ws

This is a continuation of log file /root/.vscode-server/data/User/workspaceStorage/d61691ba20bdbfe3703d540237fc436a-1/redhat.java/jdt_ws/.metadata/.bak_0.log
Created Time: 2023-09-18 07:23:39.917

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-09-18 07:23:39.917
!MESSAGE >> initialize

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-09-18 07:23:39.917
!MESSAGE Initializing Java Language Server 1.28.0.202309160807

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-09-18 07:23:39.917
!MESSAGE Started org.eclipse.m2e.core 0ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-09-18 07:23:39.917
!MESSAGE ProjectRegistryRefreshJob finished 0ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-09-18 07:23:39.917
!MESSAGE Started org.eclipse.buildship.core 0ms

the vscode windows is non-responsible...

@snjeza
Copy link
Contributor

snjeza commented Sep 18, 2023

@enihcam Could you let us know how you start VS Code?

@enihcam
Copy link
Author

enihcam commented Sep 18, 2023

@enihcam Could you let us know how you start VS Code?

i probably found the root cause:
The project is opened by VSCode in this URI format:
vscode://vscode-remote/ssh-remote+root@HOST/data/workspace/?windowId=_blank

I'm guessing vscode-java cannot handle query params.

microsoft/vscode#141548

@snjeza
Copy link
Contributor

snjeza commented Sep 18, 2023

@enihcam Could you try vscode://vscode-remote/ssh-remote+root@HOST/data/workspace/ ?

@enihcam
Copy link
Author

enihcam commented Sep 18, 2023

@enihcam Could you try vscode://vscode-remote/ssh-remote+root@HOST/data/workspace/ ?

sorry i can't. it's hard-coded.

yes, i can manually type the uri without query param and without problems, but it doesn't resolve the issue.

@snjeza
Copy link
Contributor

snjeza commented Sep 18, 2023

@enihcam Could you try VS Code 1.24.4?

@enihcam
Copy link
Author

enihcam commented Sep 18, 2023

@enihcam Could you try VS Code 1.24.4?

the patch works perfectly. :)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants