Compound Launch Config Debug Port Clash
還沒有人認領這個 Issue。
評估
研究方向
使用提供的 VS Code compound launch configuration 重現故障,並觀察多個服務同時啟動時 Java debug-agent 連接埠的分配情況。將 compound launches 與個別運作正常的組態進行比較;完成標準是所有列出的服務都能同時啟動,而不會競爭同一個偵錯連接埠。
由索引模型根據 Issue 內容生成。
描述
I'm running into an issue / potential bug where my compound launch configuration tries to run multiple services with the same java debug port. This seems to be a non-deterministic issue and the launch configurations that succeed vary.
Here's a version of my launch config:
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "AxonServer",
"request": "launch",
"mainClass": "org.springframework.boot.loader.PropertiesLauncher",
"classPaths": [
"${workspaceFolder}/build/AxonServer/axonserver.jar"
],
"console": "internalConsole",
"cwd": "${workspaceFolder}/build/AxonServer",
},
{
"type": "java",
"name": "EurekaServer",
"request": "launch",
"mainClass": "com.company.project.framework.eureka.server.EurekaServerApplication",
"projectName": "com.company.project.framework-eureka-server",
"console": "internalConsole",
},
{
"type": "java",
"name": "Config Service",
"request": "launch",
"mainClass": "com.company.project.config.service.ConfigApplication",
"projectName": "com.company.project-config-service",
"console": "internalConsole",
},
{
"type": "java",
"name": "Framework Service",
"request": "launch",
"mainClass": "com.company.project.framework.FrameworkApplication",
"projectName": "com.company.project-framework",
"console": "internalConsole",
},
{
"type": "java",
"name": "Command Service",
"request": "launch",
"mainClass": "com.company.project.framework.commandservice.CommandApplication",
"projectName": "com.company.project.framework-command-service",
"console": "internalConsole",
},
{
"type": "java",
"name": "Query Service",
"request": "launch",
"mainClass": "com.company.project.framework.queryservice.QueryApplication",
"projectName": "com.company.project.framework-query-service",
"console": "internalConsole",
},
{
"type": "java",
"name": "Generation Service",
"request": "launch",
"projectName": "com.company.project.generation-generation",
"mainClass": "org.springframework.boot.loader.launch.JarLauncher",
"classPaths": [
"${workspaceFolder}/build/generation.jar"
],
"console": "internalConsole",
"cwd": "${workspaceFolder}\\build",
},
],
"compounds": [
{
"name": "Start Microservices",
"configurations": [
"AxonServer",
"EurekaServer",
"Config Service",
"Framework Service",
"Command Service",
"Query Service",
"Generation Service",
],
"stopAll": true,
},
]
I get this error for several services on most launch attempts:
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 45559; nested exception is:
java.net.BindException: Address already in use: bind
jdk.internal.agent.AgentConfigurationError: java.rmi.server.ExportException: Port already in use: 45559; nested exception is:
java.net.BindException: Address already in use: bind
at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:491)
ConnectorBootstrap.java:491
at jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:447)
Agent.java:447
at jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:603)
Agent.java:603
... (trimmed)
Caused by: java.net.BindException: Address already in use: bind
When I check that port, one of my other configurations is indeed using that port. This is not a port used by the applications themselves, but presumably the java debug server port. When I stop my applications, those ports are no longer in use. I can also run the non-compound launch configs individually without issue, this is specifically a compound launch config issue.
- 主要語言
- TypeScript
- 星號
- 591
- 分支
- 429
- 平均合併
- 1 天 9 小時
- 30 天內合併 PR
- 19
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/vscode-java-debug 的其他 Issue
-
ai-triaged enhancement
難度 3/5 1-2 天 新手友好度 55/100
microsoft/vscode-java-debug#1689 · 2 則留言 ·
-
ai-triaged bug
microsoft/vscode-java-debug#1666 · 1 則留言 · 已指派 1 人 ·
-
ai-triaged bug
難度 3/5 1-2 天 新手友好度 48/100
microsoft/vscode-java-debug#1658 · 1 則留言 ·
-
ai-triaged enhancement
難度 4/5 3-5 天 新手友好度 45/100
microsoft/vscode-java-debug#1628 · 3 則留言 ·
-
Feature support. 未關閉ai-triaged enhancement
難度 5/5 一週以上 新手友好度 25/100
microsoft/vscode-java-debug#1616 · 1 則留言 ·
查看 microsoft/vscode-java-debug 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
0xMiden/bridge-portal#132 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 82/100
-
area:tools bug good first issue help wanted priority:P2
難度 2/5 1-3 小時 新手友好度 90/100
TaewoooPark/Motifcode#14 ·
-
bug
難度 2/5 1-3 小時 新手友好度 84/100
newrelic-experimental/preflight#793 · 1 則留言 ·