Mac OSX 10.9.5 / Tomcat 7.0.62/ java version "1.8.0_45"/ IDEA 14.1.3
I'm experiencing some odd behavior getting IDEA to launch an exploded war to Tomcat as a local Tomcat server configuration.
By itself, Tomcat starts immediately if I run its scripts (i.e., startup.sh
or catalina.sh start | run
) and the webapp is accessible from a browser. Command line apps run immediately in IDEA. The problem is just when I run a web application from inside IDEA, trying to deploy the exploded app to Tomcat local. Changing the browser in the configuration has no effect.
When I hit "run" there's nothing in the output window for about 5 minutes. Then the web app actually runs, and the following output shows in the IDEA output window:
/usr/local/tomcat7/bin/catalina.sh run
[2015-06-05 09:35:24,040] Artifact thought_test:war exploded: Server is not connected. Deploy is not available.
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.62
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: May 7 2015 17:14:55 UTC
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 7.0.62.0
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Mac OS X
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.9.5
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: x86_64
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_45-b14
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: /Users/magneto/Library/Caches/IntelliJIdea14/tomcat/Unnamed_thought_test
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: /usr/local/tomcat7
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.config.file=/Users/magneto/Library/Caches/IntelliJIdea14/tomcat/Unnamed_thought_test/conf/logging.properties
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.sun.management.jmxremote=
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.sun.management.jmxremote.port=1099
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.sun.management.jmxremote.ssl=false
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.rmi.server.hostname=127.0.0.1
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=/usr/local/tomcat7/endorsed
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=/Users/magneto/Library/Caches/IntelliJIdea14/tomcat/Unnamed_thought_test
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=/usr/local/tomcat7
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=/usr/local/tomcat7/temp
Jun 05, 2015 9:35:25 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/magneto/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
Jun 05, 2015 9:35:25 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jun 05, 2015 9:35:25 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 836 ms
Jun 05, 2015 9:35:25 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 05, 2015 9:35:25 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.62
Jun 05, 2015 9:35:25 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jun 05, 2015 9:35:25 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jun 05, 2015 9:35:25 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 118 ms
Connected to server
[2015-06-05 09:35:25,673] Artifact thought_test:war exploded: Artifact is being deployed, please wait...
[2015-06-05 09:35:26,203] Artifact thought_test:war exploded: Artifact is deployed successfully
[2015-06-05 09:35:26,204] Artifact thought_test:war exploded: Deploy took 531 milliseconds
Jun 05, 2015 9:35:35 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/tomcat7/webapps/manager
Jun 05, 2015 9:35:35 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/local/tomcat7/webapps/manager has finished in 104 ms
There's been a few posts about the line:
Artifact thought_test:war exploded: Server is not connected. Deploy is not available.
But none of the given solutions work. I can't see anything that's going on that looks like it's using a lot of resources, that would cause the delay. It's really odd because after the delay, the connection to the server works, even though initially it didn't.
Update:
I tracked it down to the firewall. In 'Security & Privacy' -> 'Firewall' -> 'Firewall Options...' I unchecked 'Enable stealth mode'. After I did that the app started right up in IDEA and the browser (Chrome). Note that I first added both IDEA and Chrome to the firewall's list of applications that 'Allow incoming connections' but that didn't matter.
I'd mark it as a solution, but I rather know why there's something in the Mac OS firewall that's treating the connection from IDEA to Tomcat as Ping or ICMP and blocking it for a few minutes.