Unable to open debugger port in IntelliJ IDEA

后端 未结 29 1382
误落风尘
误落风尘 2021-01-30 08:21

I have a problem that I can not set up my application in debug mode with IntelliJ IDE, but run mode is OK.

My OS is Windows 7, IDE is IntelliJ IDEA, web container is Tom

相关标签:
29条回答
  • 2021-01-30 08:30

    I had same issue in windows 7 and IntellijIdea 14. I killed the java processes by going CTRL+ALT+ESc, find java and kill it. Now Re-Run, the application again it should be fine.. You can also do it with command line or shell(linux), but I found this easier for myself

    0 讨论(0)
  • 2021-01-30 08:31

    There are various reasons for this.
    - There might be the problem with debugger port---Please change it to resolve( answered by T.M )
    - There might be some issue with intellij cache --Invalidate cache and restart will solve it ( answered by feng smith )
    - There might be problem with any other Port, like JMX, AJP --- Please change these port numbers as well.
    I wanted to add this as comment but not enough rep

    0 讨论(0)
  • 2021-01-30 08:32

    All the other solutions unfortunately did not work. This is what worked for me . I simply changed the debugger port to some other port number.

    Intelij-> preferences->Build, execution, deployment ->Debugger-> Built in server->port(change value )

    0 讨论(0)
  • 2021-01-30 08:32

    It happens occasionally that when I restart my computer, everything is OK. Perhaps there is a port conflict.

    Restart the computer works because instances of Java or Tomcat are killed during the restart. You can also consider killing the specific processes from Task Manager

    This also happens if there is an issue in the context.xml file. In my case, I had accidentally changed the context value.

    0 讨论(0)
  • 2021-01-30 08:33

    This works for me consistently (it happens to me from time to time, when I do things such a restart tomcat when I am running the integration tests, for example)

    1) Find the process that has the port 1099 open

    sudo netstat -anp | grep tcp | grep 1099
    cp6       0      0 :::1099                 :::*                    LISTEN      9857/java
    

    2) kill it

    kill 9857
    

    3) Start Tomcat.

    0 讨论(0)
  • 2021-01-30 08:33

    In my case I had another project open in IntelliJ, and had Tomcat running in debug mode in that project. Stopping that instance of Tomcat resolved the issue.

    0 讨论(0)
提交回复
热议问题