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

ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) when debugging vscode-extension project #3336

Closed
AlbertMZhou opened this issue Oct 8, 2023 · 8 comments

Comments

@AlbertMZhou
Copy link

AlbertMZhou commented Oct 8, 2023

Environment
  • Operating System: Windows 10
  • JDK version: 17
  • Visual Studio Code version: 1.83
  • Java extension version: 1.24
Steps To Reproduce
  1. downloud and debug a vscode-extension-sample.
  2. In the debugging window, open an explorer of Java project in the workspace, select one of .java file.
  3. then the redhat-java will compile and show the error message.
Current Result

The error message will output in extension-sample's output channel. And there will be error InformationMessage from Language Support for JAVA(TM). This makes that the extension-sample cannot call the commands provided by Language Support for JAVA
image
image

the core error logs are:
[Info  - 16:40:55] Connection to server got closed. Server will restart.
false
[Error - 16:40:56] Language Support for Java client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 

{
  message: 'ERROR: transport error 202: bind failed: Permission denied\n' +
    'ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)\n' +
    'JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [s\\open\\src\\jdk.jdwp.agent\\share\\native\\libjdwp\\debugInit.c:734]\n',
  level: 'info',
  timestamp: '2023-10-08 16:40:56.165'
}
@AlbertMZhou
Copy link
Author

AlbertMZhou commented Oct 9, 2023

if I package my extension to .visx file, then install it and run java program in the real vscode window, the error won't get out and my extension works out. I got the reason in #1468 , but the author may just kill the extension process. How can I fix the conflict between extension debug process and the auto debug process by Language Support for Java? I need to debugging and test my extension function. Packaging to .visx is too slow.

@snjeza
Copy link
Contributor

snjeza commented Oct 10, 2023

How can I fix the conflict between extension debug process and the auto debug process by Language Support for Java?

Java LS is listening on the 1044 or 1045 port. What port are you using?

@AlbertMZhou
Copy link
Author

AlbertMZhou commented Oct 12, 2023

How can I fix the conflict between extension debug process and the auto debug process by Language Support for Java?

Java LS is listening on the 1044 or 1045 port. What port are you using?

I use command "netstat -aon|findstr "1044"" and "netstat -aon|findstr "1045"" to find nothing. Neither of these port are occupied. Besides, there is no the error message "Address already in use" in OUTPUT window like #1468

@snjeza
Copy link
Contributor

snjeza commented Oct 12, 2023

@AlbertMZhou Can you try

netsh interface ipv4 show excludedportrange protocol=tcp

@AlbertMZhou
Copy link
Author

@AlbertMZhou Can you try

netsh interface ipv4 show excludedportrange protocol=tcp

the result
image

@snjeza
Copy link
Contributor

snjeza commented Oct 12, 2023

Ports 1044 and 1045 are reserved. You can try to release them using:

net stop winnat
net start winnat

or change them at

const port = isSyntaxServer ? 1045 : 1044;

@AlbertMZhou
Copy link
Author

AlbertMZhou commented Oct 12, 2023

Ports 1044 and 1045 are reserved. You can try to release them using:

net stop winnat
net start winnat

That really works! Thanks a lot! ❤

@Vinayynn
Copy link

what is the command for mac?

Ports 1044 and 1045 are reserved. You can try to release them using:

net stop winnat
net start winnat

That really works! Thanks a lot! ❤

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

No branches or pull requests

3 participants