Server is not connected when trying to deploy with intellij

前端 未结 5 455
不知归路
不知归路 2020-12-15 05:24

I am trying to build, deploy and debug my webapp inside intellij.

I have setup my tomcat using this answer and I was able to get the server running. The issue is th

5条回答
  •  悲&欢浪女
    2020-12-15 06:11

    In short:

    After setting my IntelliJ configuration to run the latest version of Tomcat that I was running in the background my problem was resolved.

    A brief description:

    I had the exact same error in my IntelliJ 14 while I had a setup and was working on another machine. While the source of the issue can differ, in my case here was the root cause:

    I basically had two different versions of Tomcat Installed on my machine. Tomcat 8 was running in the background on port 8090 and despite of setting my debugger instance port to be 8091 it was giving me the following error:

    Server is not connected. Deploy is not available.

    and The following warnings:

    1:21:18 PM It is possible to bind and connect to localhost:8091 at the same time - application server will probably compete with some other software on the port

    1:32:39 PM Application Server was not connected before run configuration stop, reason: Unable to ping server at localhost:1099

    After setting my IntelliJ configuration to run the latest version of Tomcat that I was running in the background my problem was resolved.

    Hint: Running applications in debug mode can slow them down a fair bit. I usually have two instances running. One in debug mode and one in normal mode in two different ports. This way I can have a normal instance of my web application as well as a debugger instance for more in depth investigations.

    Hope this helps.

提交回复
热议问题