The server is not connected. Deployment is not available. IntelliJ 13 and Tomcat 7

Trying to run my application with IntelliJ 13 and Apache tomcat 7.0.42. JDK1.6

Always receive an error message Artifact app: war exploded: server is not connected. Deployment is not available.

But when I deploy via terminal with catalina.sh start , it works fine.

I referenced this install link: http://confluence.jetbrains.com/display/IntelliJIDEA/Application+Servers

Any idea what I am missing?

Here is the Tomcat Catalina magazine:

Dec 29, 2014 11:43:29 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java Dec 29, 2014 11:43:29 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-8080"] Dec 29, 2014 11:43:29 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-bio-8009"] Dec 29, 2014 11:43:29 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 614 ms Dec 29, 2014 11:43:29 AM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Dec 29, 2014 11:43:29 AM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.42 Dec 29, 2014 11:43:29 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8080"] Dec 29, 2014 11:43:29 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-bio-8009"] Dec 29, 2014 11:43:29 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 44 ms Dec 29, 2014 11:43:39 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory /Users/yesuagg/apache-tomcat-7.0.42/webapps/manager 

Event Log Exception

 4:58:40 PM Compilation completed successfully with 104 warnings in 6 sec 4:58:42 PM Application Server was not connected before run configuration stop, reason: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused] 
+6
source share
5 answers

Please check this answer posted by Christian and also read this topic. Problem deploying Tomcat through IntelliJ

Just try to delete setenv.sh in $ CATALINA_HOME / bin

0
source

I had this problem today and it was not due to setenv.sh as discussed in another thread. In the end, this is a problem with $ CATALINA_BASE / conf / server.xml.

For some reason, in our server.xml server, we used, for example, the name of the user engine

 <Engine name="custom-value" defaultHost="localhost"> 

I tried again with a clean server.xml from tomcat 7.0.57 and the artifact developed perfectly. After trial and error, he reached this line.

Changing the engine name to "Catalina", as shown below, fixed our problem and allowed us to deploy our exploded artifact using our customized server.xml

 <Engine name="Catalina" defaultHost="localhost"> 

If you see this problem, try cleaning server.xml and sit back.

0
source

tomcat-7.0-doc RUNNING

(3.2) Set JRE_HOME or JAVA_HOME (required)

These variables are used to indicate the location of the Java Runtime Environment or Java Development Kit, which is used to run Tomcat.

The JRE_HOME variable is used to indicate the location of the JRE. The JAVA_HOME variable is used to indicate the location of the JDK.

Using JAVA_HOME provides access to some additional startup options that are not allowed when using JRE_HOME.

If JRE_HOME and JAVA_HOME are specified, JRE_HOME is used.

0
source

In my case, Intellij IDEA does not support starting tomcat8 installed from linux repositories. /usr/share/tomcat/bin/catalina.sh start (not supported) /usr/share/tomcat/bin/catalina.sh(supported)

Only tomcat8 is installed from the official site. I tried with the distribution downloaded from http://tomcat.apache.org/download-80.cgi . Therefore, I got successful results.

The reason is in the catalina.sh file from the Linux distribution, where there is no "run" command. But in loaded tomcat there is a run command. catalina.sh_InstalledFromLinuxRepository

0
source

Do you set JAVA_OPTS anywhere in Tomcat bat / sh files? If you do, be sure to keep the previous values ​​- IDEA seems to use them to specify some parameters for connecting to Tomcat. For instance. in .sh files

 JAVA_OPTS="<your new stuff> $JAVA_OPTS" 

instead

 JAVA_OPTS=<your new stuff> 

PS The same answer as it actually is: fooobar.com/questions/122221 / ...

0
source

Source: https://habr.com/ru/post/987593/


All Articles