Debug Remote Tomcat Server: Unable to open debugger port (*:5005)
Here is the config of remote tomcat server:

In the old version(2024.3 and older), this 5005 port was valid, and there would be a corresponding prompt after it was started:

However, the new version(2025.1) always prompts "Unable to open debugger port (*:5005)" on startup.The issue is that the hostname or IP corresponding to the port is "*", making it impossible to connect to the remote IP:PORT.Following is the idea.log:
2025-05-12 14:08:26,632 [12503672] INFO - #c.i.e.r.ExecutionUtil - Error running 'LubuntuSRSDevice1Tomcat':<br>Unable to open debugger port (*:5005): java.net.ConnectException "Connection refused: connect"
com.intellij.execution.ExecutionException: Unable to open debugger port (*:5005): java.net.ConnectException "Connection refused: connect"
at com.intellij.debugger.engine.DebugProcessImpl.createVirtualMachineInt(DebugProcessImpl.java:646)
at com.intellij.debugger.engine.DebugProcessImpl$12.action(DebugProcessImpl.java:2559)
at com.intellij.debugger.engine.events.DebuggerCommandImpl.actionSuspend$suspendImpl(DebuggerCommandImpl.kt:48)
at com.intellij.debugger.engine.events.DebuggerCommandImpl.actionSuspend(DebuggerCommandImpl.kt)
at com.intellij.debugger.engine.events.DebuggerCommandImpl.runSuspend(DebuggerCommandImpl.kt:74)
at com.intellij.debugger.engine.events.DebuggerCommandImpl.access$runSuspend(DebuggerCommandImpl.kt:14)
at com.intellij.debugger.engine.events.DebuggerCommandImpl$invokeCommand$job$1$1.invokeSuspend(DebuggerCommandImpl.kt:112)
at com.intellij.debugger.engine.events.DebuggerCommandImpl$invokeCommand$job$1$1.invoke(DebuggerCommandImpl.kt)
at com.intellij.debugger.engine.events.DebuggerCommandImpl$invokeCommand$job$1$1.invoke(DebuggerCommandImpl.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
at com.intellij.debugger.engine.events.DebuggerCommandImpl$invokeCommand$job$1.invokeSuspend(DebuggerCommandImpl.kt:110)
at com.intellij.debugger.engine.events.DebuggerCommandImpl$invokeCommand$job$1.invoke(DebuggerCommandImpl.kt)
at com.intellij.debugger.engine.events.DebuggerCommandImpl$invokeCommand$job$1.invoke(DebuggerCommandImpl.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:27)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:90)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:123)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.async(Builders.common.kt:87)
at kotlinx.coroutines.BuildersKt.async(Unknown Source)
at com.intellij.debugger.engine.events.DebuggerCommandImpl.invokeCommand$intellij_java_debugger_impl(DebuggerCommandImpl.kt:107)
at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.kt:198)
at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.kt:39)
at com.intellij.debugger.impl.InvokeThread.doProcessEvent(InvokeThread.java:160)
at com.intellij.debugger.impl.InvokeThread.lambda$run$0(InvokeThread.java:176)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:229)
at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:43)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:228)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:680)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:755)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:711)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:77)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:209)
at com.intellij.debugger.impl.InvokeThread.lambda$run$1(InvokeThread.java:165)
at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:234)
at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:113)
at com.intellij.util.indexing.FileBasedIndexEx.ignoreDumbMode(FileBasedIndexEx.java:704)
at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:233)
at com.intellij.util.indexing.DumbModeAccessType.ignoreDumbMode(DumbModeAccessType.java:41)
at com.intellij.debugger.impl.InvokeThread.run(InvokeThread.java:165)
at com.intellij.debugger.impl.InvokeThread$WorkerThreadRequest.lambda$run$0(InvokeThread.java:52)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:249)
at com.intellij.debugger.impl.InvokeThread$WorkerThreadRequest.run(InvokeThread.java:51)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:265)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at com.intellij.util.concurrency.ContextCallable.lambda$call$1(ContextCallable.java:86)
at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:95)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:102)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:102)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:108)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:102)
at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.net.ConnectException: Connection refused: connect
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Net.java:589)
at java.base/sun.nio.ch.Net.connect(Net.java:578)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:583)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:751)
at com.jetbrains.jdi.SocketTransportService.attach(SocketTransportService.java:276)
at com.jetbrains.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:127)
at com.jetbrains.jdi.SocketAttachingConnector.attach(SocketAttachingConnector.java:93)
at com.intellij.debugger.engine.DebugProcessImpl.attachConnector(DebugProcessImpl.java:712)
at com.intellij.debugger.engine.DebugProcessImpl.createVirtualMachineInt(DebugProcessImpl.java:642)
... 59 more
Please sign in to leave a comment.
Abhishek Sah Sure, the steps were:
1. Add a Run/Debug Configurations:
2. Config the Startup/Connection PORT:
3. The Remote Tomcat Server Configuration of “setenv.sh” and startup the remote tomcat:
4. Check the remote server port:
5005 port is opened
5. Click the Debug button in JetBrains 2025.1
Are you able to attach to the remote tomcat instance from your local machine terminal using the following command?
nc -zv localhost 5005jdb -attach YourHostName:8000Feel free to create a support request via https://intellij-support.jetbrains.com/hc/en-us/requests/new so we can check the issue in detail.
Abhishek Sah Hi there, I create a post but never be replied,has this been fixed?
Debug Remote Tomcat Server: Unable to open debugger port (*:5005) – IDEs Support (IntelliJ Platform) | JetBrains
After upgrading to 2025.1.2, I found that this problem has been resolved