Unable to open debugger port in IntelliJ IDEA

后端 未结 29 1379
误落风尘
误落风尘 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:27

    I have encountered the same error while using IntelliJ. Since I have started multiple instances of IntelliJ. While starting two instance it started properly. However, when starting another one, it was giving below error.

    unable to open debugger port (127.0.0.1:debug-port-number) java.net.socketexception interrupted function call accept failed
    

    There are basically two places you can check your ports related to debugging in IntelliJ

    1. JMX port - you can find this is
    2. In Startup/Configuration, there is debug option just click this.

    What to Check: If IntelliJ is throwing above error, means issue is any of the above listed ports. To verify this open event log (its available in right corner down) and check the exact message. Event log will have message like below

    11:19 PM    Error running 'Tomcat-tp': Address localhost:1098 is already in use
    
    11:19 PM    Error running 'Tomcat-tp': Unable to open debugger port (127.0.0.1:51787): java.net.SocketException "Interrupted function call: accept failed"
    

    Solution-1 Check the JMX port of current intelliJ which is not starting with the working one and verify if JMX ports are not duplicated within IntelliJ instance or any of the software which is running in your machine is not using this port.

    Solution-2 If JMX is not duplicated then verify your debug port, check in all IntelliJ instance and do the changes.

    Surely either JMX or Debug port is having issue just use unique JMX and Debug port and it will work.

    Hope this will help someone.

提交回复
热议问题