title: Server is not connected. Deploy is not available. IntelliJ 13 and Tomcat 7
body: <p>Trying to run my app with IntelliJ 13 and Apache tomcat 7.0.42. JDK1.6</p>
  
  <p>Always getting the error <strong>Artifact app:war exploded: Server is not connected. Deploy is not available.</strong></p>
  
  <p>But when I deploy through terminal with <strong>catalina.sh start</strong> it works perfectly fine.</p>
  
  <p>I referred this link for setup: <a href="http://confluence.jetbrains.com/display/IntelliJIDEA/Application+Servers" rel="noreferrer">http://confluence.jetbrains.com/display/IntelliJIDEA/Application+Servers</a></p>
  
  <p>Any idea what am I missing?</p>
  
  <p>Here is the Tomcat Catalina log:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Exception in Event log</p>
  
  <pre><code>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]
  </code></pre>