Tomcat 8 and Grails deploying war loop - java

I have Tomcat 8.0.23 running and I am able to run their sample war files so that means I can run war files. Now the issue happens when I try to deploy my grails app. What I do is this:
I want to make sure that a grails app (2.5.0) just runs fine as a war file on Tomcat 8.
So I create a grails app, I do NOT change anything, and I then create the war file as grails war. I take the file from the target folder and I put it under webapps in my Tomcat. It is not loading. This is what I get:
26-Jun-2015 20:34:43.373 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
26-Jun-2015 20:34:43.378 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.23
26-Jun-2015 20:34:43.454 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/tomcat/webapps/sample.war
26-Jun-2015 20:34:44.414 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /opt/tomcat/webapps/sample.war has finished in 953 ms
26-Jun-2015 20:34:44.416 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/tomcat/webapps/example.war
26-Jun-2015 20:34:50.485 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.23
26-Jun-2015 20:34:50.487 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: May 19 2015 14:58:38 UTC
26-Jun-2015 20:34:50.488 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.23.0
26-Jun-2015 20:34:50.489 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
26-Jun-2015 20:34:50.489 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 3.13.0-52-generic
26-Jun-2015 20:34:50.490 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
26-Jun-2015 20:34:50.490 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-7-openjdk-amd64/jre
26-Jun-2015 20:34:50.490 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.7.0_79-b14
26-Jun-2015 20:34:50.491 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
26-Jun-2015 20:34:50.491 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/tomcat
26-Jun-2015 20:34:50.492 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat
26-Jun-2015 20:34:50.492 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
26-Jun-2015 20:34:50.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
26-Jun-2015 20:34:50.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
26-Jun-2015 20:34:50.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:/dev/./urandom
26-Jun-2015 20:34:50.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512M
26-Jun-2015 20:34:50.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024M
26-Jun-2015 20:34:50.495 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseParallelGC
26-Jun-2015 20:34:50.495 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/opt/tomcat/endorsed
26-Jun-2015 20:34:50.496 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
26-Jun-2015 20:34:50.496 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
26-Jun-2015 20:34:50.496 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
26-Jun-2015 20:34:50.497 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
26-Jun-2015 20:34:50.695 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
26-Jun-2015 20:34:50.767 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
26-Jun-2015 20:34:50.778 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
26-Jun-2015 20:34:50.781 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
26-Jun-2015 20:34:50.786 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1410 ms
26-Jun-2015 20:34:50.853 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
26-Jun-2015 20:34:50.858 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.23
26-Jun-2015 20:34:50.934 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/tomcat/webapps/sample.war
26-Jun-2015 20:34:51.935 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /opt/tomcat/webapps/sample.war has finished in 997 ms
26-Jun-2015 20:34:51.943 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/tomcat/webapps/example.war
This keeps lopping over and over again. I can deploy sample but it gets stuck at the grails one "example".
Why ? I have set the autodeploy to false if that helps. (I am hosting on Digital Ocean on the 512mb ram machine)
Thanks

Related

Not able to deploy .war file to Tomcat on AWS Instance

Today I tried deploying my simple Spring MVC web app to AWS instance. I installed the tomcat server and started successfully on the instance. I am able to access the tomcat home page from my browser.
When I tried uploading the .war file and clicked deploy, it got uploaded successfully but I am not able to start the application.
I am receiving the following error message when clicking on Start.
Am I doing anything wrong? Please assist.
Catalina logs
20-Jun-2021 05:28:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.amzn2.0.1.x86_64/jre
20-Jun-2021 05:28:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_282-b08
20-Jun-2021 05:28:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Red Hat, Inc.
20-Jun-2021 05:28:53.281 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/java/apache-tomcat-8.5.68
20-Jun-2021 05:28:53.285 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/java/apache-tomcat-8.5.68
20-Jun-2021 05:28:53.285 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/java/apache-tomcat-8.5.68/conf/logging.properties
20-Jun-2021 05:28:53.286 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
20-Jun-2021 05:28:53.286 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
20-Jun-2021 05:28:53.286 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
20-Jun-2021 05:28:53.286 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
20-Jun-2021 05:28:53.288 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
20-Jun-2021 05:28:53.289 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/java/apache-tomcat-8.5.68
20-Jun-2021 05:28:53.289 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/java/apache-tomcat-8.5.68
20-Jun-2021 05:28:53.289 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/java/apache-tomcat-8.5.68/temp
20-Jun-2021 05:28:53.289 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
20-Jun-2021 05:28:53.435 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
20-Jun-2021 05:28:53.472 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
20-Jun-2021 05:28:53.509 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1258 ms
20-Jun-2021 05:28:53.560 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
20-Jun-2021 05:28:53.562 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.68]
20-Jun-2021 05:28:53.585 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/java/apache-tomcat-8.5.68/webapps/ROOT]
20-Jun-2021 05:28:54.052 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/java/apache-tomcat-8.5.68/webapps/ROOT] has finished in [467] ms
20-Jun-2021 05:28:54.053 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/java/apache-tomcat-8.5.68/webapps/docs]
20-Jun-2021 05:28:54.091 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/java/apache-tomcat-8.5.68/webapps/docs] has finished in [38] ms
20-Jun-2021 05:28:54.096 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/java/apache-tomcat-8.5.68/webapps/examples]

Apache Tomcat/9.0.31 server does not start in Netbeans 8.2 on MAC

I can start/shutdown the Tomcat server using my terminal but on NetBeans, it stays on starting for a few minutes then I get the server failed to start error.
Things I have tried:
adjust the server.xml <Connector />
uncheck the "Use IDE Proxy settings" box from platform tab in Server settings
take off or add quotes to the "JAVA_OPTS" in catalina.bat file
add different roles to the tomcat-users.xml
try everything here Starting of Tomcat failed from Netbeans
Any help would be gladly appreciated.
15-Feb-2020 21:12:39.866 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 5 2020 19:32:12 UTC
15-Feb-2020 21:12:39.866 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.31.0
15-Feb-2020 21:12:39.866 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Mac OS X
15-Feb-2020 21:12:39.866 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.15.3
15-Feb-2020 21:12:39.866 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86_64
15-Feb-2020 21:12:39.866 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre
15-Feb-2020 21:12:39.867 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_191-b12
15-Feb-2020 21:12:39.867 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
15-Feb-2020 21:12:39.867 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /Users/Aereli/Apache
15-Feb-2020 21:12:39.867 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /Library/Tomcat
15-Feb-2020 21:12:39.871 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/Users/Aereli/Apache/conf/logging.properties
15-Feb-2020 21:12:39.871 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
15-Feb-2020 21:12:39.871 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
15-Feb-2020 21:12:39.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
15-Feb-2020 21:12:39.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
15-Feb-2020 21:12:39.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
15-Feb-2020 21:12:39.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/Users/Aereli/Apache
15-Feb-2020 21:12:39.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/Library/Tomcat
15-Feb-2020 21:12:39.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/Users/Aereli/Apache/temp
15-Feb-2020 21:12:39.872 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/Aereli/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
15-Feb-2020 21:12:40.310 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8090"]
15-Feb-2020 21:12:40.396 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [789] milliseconds
15-Feb-2020 21:12:40.483 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
15-Feb-2020 21:12:40.483 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.31]
15-Feb-2020 21:12:40.509 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/Users/Aereli/Apache/conf/Catalina/localhost/manager.xml]
15-Feb-2020 21:12:40.866 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/Users/Aereli/Apache/conf/Catalina/localhost/manager.xml] has finished in [356] ms
15-Feb-2020 21:12:40.866 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/Users/Aereli/Apache/conf/Catalina/localhost/ROOT.xml]
15-Feb-2020 21:12:40.867 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with value [] in deployment descriptor [/Users/Aereli/Apache/conf/Catalina/localhost/ROOT.xml] has been ignored
15-Feb-2020 21:12:40.903 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/Users/Aereli/Apache/conf/Catalina/localhost/ROOT.xml] has finished in [37] ms
15-Feb-2020 21:12:40.921 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8090"]
15-Feb-2020 21:12:40.958 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [561] milliseconds
I had the same exact problem with Netbeans 12. I searched a lot in the internet and all the solutions didn't work for me. Finally I updated my JDK to the latest version and tomcat started working like a charm. Try updating your JDK to the latest version. That might help you. I believe Netbeans versions tend to depend on the JDK you use.

failed to deploy WAR artifact on tomcat

Everything was working fine few minutes earlier.
I just deleted my changes and downloaded it again, so the only thing I had to do was configure tomcat again, but I am pretty sure I did it the same way.
Now, when I try to deploy my application, I got this error:
03-Mar-2018 23:35:59.254 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.28
03-Mar-2018 23:35:59.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 6 2018 23:10:25 UTC
03-Mar-2018 23:35:59.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.28.0
03-Mar-2018 23:35:59.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 8.1
03-Mar-2018 23:35:59.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.3
03-Mar-2018 23:35:59.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
03-Mar-2018 23:35:59.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jdk1.8.0_144\jre
03-Mar-2018 23:35:59.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_144-b01
03-Mar-2018 23:35:59.260 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
03-Mar-2018 23:35:59.260 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\matt\.IntelliJIdea2017.2\system\tomcat\Unnamed_cost-control_4
03-Mar-2018 23:35:59.260 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Users\matt\Desktop\JAVA\apache-tomcat-8.5.28-windows-x64\apache-tomcat-8.5.28
03-Mar-2018 23:35:59.261 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\matt\.IntelliJIdea2017.2\system\tomcat\Unnamed_cost-control_4\conf\logging.properties
03-Mar-2018 23:35:59.261 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
03-Mar-2018 23:35:59.261 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
03-Mar-2018 23:35:59.262 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
03-Mar-2018 23:35:59.262 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
03-Mar-2018 23:35:59.262 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
03-Mar-2018 23:35:59.262 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
03-Mar-2018 23:35:59.262 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
03-Mar-2018 23:35:59.264 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
03-Mar-2018 23:35:59.265 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
03-Mar-2018 23:35:59.265 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\matt\.IntelliJIdea2017.2\system\tomcat\Unnamed_cost-control_4
03-Mar-2018 23:35:59.269 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Users\matt\Desktop\JAVA\apache-tomcat-8.5.28-windows-x64\apache-tomcat-8.5.28
03-Mar-2018 23:35:59.269 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Users\matt\Desktop\JAVA\apache-tomcat-8.5.28-windows-x64\apache-tomcat-8.5.28\temp
03-Mar-2018 23:35:59.269 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.16] using APR version [1.6.3].
03-Mar-2018 23:35:59.269 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
03-Mar-2018 23:35:59.269 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
03-Mar-2018 23:36:00.313 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2m 2 Nov 2017]
03-Mar-2018 23:36:00.894 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-9090"]
03-Mar-2018 23:36:00.936 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
03-Mar-2018 23:36:00.956 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
03-Mar-2018 23:36:00.959 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
03-Mar-2018 23:36:00.977 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2592 ms
03-Mar-2018 23:36:01.082 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
03-Mar-2018 23:36:01.082 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.28
03-Mar-2018 23:36:01.100 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-9090"]
03-Mar-2018 23:36:01.121 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
03-Mar-2018 23:36:01.126 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 148 ms
Connected to server
[2018-03-03 11:36:01,356] Artifact cost-control:war exploded: Artifact is being deployed, please wait...
03-Mar-2018 23:36:02.153 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
03-Mar-2018 23:36:02.157 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
[2018-03-03 11:36:02,183] Artifact cost-control:war exploded: Error during artifact deployment. See server log for details.
03-Mar-2018 23:36:11.101 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Users\matt\Desktop\JAVA\apache-tomcat-8.5.28-windows-x64\apache-tomcat-8.5.28\webapps\manager]
03-Mar-2018 23:36:11.192 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\matt\Desktop\JAVA\apache-tomcat-8.5.28-windows-x64\apache-tomcat-8.5.28\webapps\manager] has finished in [90] ms
Any ideas?

Tomcat shutting down unexpectedly without trace

First of all I must say that I have reviewed all related posts but was unable to find a working solution.
I have Tomcat 8.5.6 running on Centos 7.
I have an API which runs on Tomcat (8080, 8009, 8443) which ran for a long time without hiccups. Last week I had to create a new API and problems started: Tomcat shutting down unexpectedly leaving no trace. I tried using port 8007 (forwarded to port 8443) for the new api. Both apis worked but Tomcat kept shutting down. I tried using 8081 but was unable to create a connection on it.
Finally I decided to install a new Tomcat instance on port 8081 but was unable to make the new api work on the new Tomcat (port 8081, 8007 and 8444).
I have disabled the shutdown port (-1) for the Tomcat where the first api is running and stopped the 2nd Tomcat (so I only have 1 Tomcat running now) and have rolled back every change I had made but Tomcat keeps shutting down.
From the Catalina.out log I can't tell much (it doesn't say anything about shutting down). It just has the end the of the startup and the following restart (that I have to order everytime that I realize that it is down):
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Configuring Spring Security REST 2.0.0.M2...
... finished configuring Spring Security REST
Configuring Spring Security UI ...
... finished configuring Spring Security UI
09-May-2017 22:44:01.315 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /opt/tomcat/tomcat-8.5.6/webapps/myapi-api.war has finished in 40,056 ms
09-May-2017 22:44:01.316 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/tomcat-8.5.6/webapps/manager
09-May-2017 22:44:01.363 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/tomcat-8.5.6/webapps/manager has finished in 47 ms
09-May-2017 22:44:01.363 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/tomcat-8.5.6/webapps/ROOT_
09-May-2017 22:44:01.385 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/tomcat-8.5.6/webapps/ROOT_ has finished in 22 ms
09-May-2017 22:44:01.385 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/tomcat-8.5.6/webapps/ROOT
09-May-2017 22:44:01.395 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/tomcat-8.5.6/webapps/ROOT has finished in 10 ms
09-May-2017 22:44:01.403 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-8080]
09-May-2017 22:44:01.409 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8009]
09-May-2017 22:44:01.410 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 40230 ms
10-May-2017 08:22:08.631 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: My App Server
10-May-2017 08:22:08.662 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Nov 1 2016 00:00:00 UTC
10-May-2017 08:22:08.662 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 1.0.0.0
10-May-2017 08:22:08.663 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
10-May-2017 08:22:08.663 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 3.10.0-514.10.2.el7.x86_64
10-May-2017 08:22:08.663 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
10-May-2017 08:22:08.663 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/java/jdk1.8.0_112/jre
10-May-2017 08:22:08.664 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_112-b15
10-May-2017 08:22:08.664 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
10-May-2017 08:22:08.664 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/tomcat/tomcat-8.5.6
10-May-2017 08:22:08.664 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat/tomcat-8.5.6
10-May-2017 08:22:08.665 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/tomcat-8.5.6/conf/logging.properties
10-May-2017 08:22:08.665 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
10-May-2017 08:22:08.665 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
10-May-2017 08:22:08.665 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
10-May-2017 08:22:08.665 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat/tomcat-8.5.6
10-May-2017 08:22:08.666 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat/tomcat-8.5.6
10-May-2017 08:22:08.666 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/tomcat-8.5.6/temp
10-May-2017 08:22:08.666 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
10-May-2017 08:22:08.991 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
10-May-2017 08:22:09.022 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
10-May-2017 08:22:09.024 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
10-May-2017 08:22:09.026 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
10-May-2017 08:22:09.026 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1112 ms
10-May-2017 08:22:09.061 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
10-May-2017 08:22:09.062 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: My App Server
10-May-2017 08:22:09.096 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/tomcat/tomcat-8.5.6/webapps/myapi-api.war
I am new to Tomcat and Centos but I have been working on a solution for this for many days without luck and I am clueless on why I started having problems when I deployed a new api.
I am not sure if this info is enough for an analysis but I would appreciate any help.
Thanks.
Thank guys for your comments. I don't know why but there were several Tomcat processes open. I restarted the server, started Tomcat and everything seems to be working fine now with only 1 Tomcat process.
Thanks once again!

AWS Elastic Beanstalk: Tomcat ignoring my WAR-File

i'm trying to get my Spring Boot Application into AWS-EB and I already succeeded yesterday using Java as my Platform. However having Tomcat as Platform in EB allows me to configure platform-specific properties (database etc) directly in my AWS-Console so I created a new environment with Tomcat as the underlying platform.
Now I deployed my WAR-File (that worked yesterday with plain java) and the tomcat is completely ignoring me :(
See the log attached below. I don't see an error-message anywhere it just boots up but does not deploy the WAR-File anywhere. Does anyone have an idea what I'm missing? I haven't found anyone having the same problem.
Thanks in advance! :)
Catalina.out
23-Sep-2016 13:20:34.889 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.36
23-Sep-2016 13:20:34.892 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Aug 12 2016 18:14:42 UTC
23-Sep-2016 13:20:34.892 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.36.0
23-Sep-2016 13:20:34.892 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
23-Sep-2016 13:20:34.892 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.4.16-27.56.amzn1.x86_64
23-Sep-2016 13:20:34.892 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
23-Sep-2016 13:20:34.893 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.24.amzn1.x86_64/jre
23-Sep-2016 13:20:34.897 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_101-b13
23-Sep-2016 13:20:34.901 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
23-Sep-2016 13:20:34.901 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/share/tomcat8
23-Sep-2016 13:20:34.901 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/share/tomcat8
23-Sep-2016 13:20:34.902 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dspring.datasource.username=USERNAME
23-Sep-2016 13:20:34.903 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DPORT=8080
23-Sep-2016 13:20:34.903 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dspring.datasource.url=DATABASE_URL
23-Sep-2016 13:20:34.903 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DJDBC_CONNECTION_STRING=
23-Sep-2016 13:20:34.903 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dspring.datasource.password=PASS
23-Sep-2016 13:20:34.904 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms256m
23-Sep-2016 13:20:34.904 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m
23-Sep-2016 13:20:34.904 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=64m
23-Sep-2016 13:20:34.904 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/share/tomcat8
23-Sep-2016 13:20:34.904 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/share/tomcat8
23-Sep-2016 13:20:34.905 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
23-Sep-2016 13:20:34.906 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=
23-Sep-2016 13:20:34.906 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/var/cache/tomcat8/temp
23-Sep-2016 13:20:34.906 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/share/tomcat8/conf/logging.properties
23-Sep-2016 13:20:34.906 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
23-Sep-2016 13:20:34.906 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
23-Sep-2016 13:20:35.119 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
23-Sep-2016 13:20:35.162 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
23-Sep-2016 13:20:35.174 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
23-Sep-2016 13:20:35.176 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
23-Sep-2016 13:20:35.181 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1218 ms
23-Sep-2016 13:20:35.237 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
23-Sep-2016 13:20:35.237 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.36
23-Sep-2016 13:20:35.261 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /var/lib/tomcat8/webapps/ROOT
23-Sep-2016 13:20:38.313 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
23-Sep-2016 13:20:38.362 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /var/lib/tomcat8/webapps/ROOT has finished in 3,101 ms
23-Sep-2016 13:20:38.368 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
23-Sep-2016 13:20:38.377 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
23-Sep-2016 13:20:38.377 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 3196 ms
Screenshot from my config:
Read http://tomcat.apache.org/native-doc/ , then download from http://tomcat.apache.org/download-native.cgi
then put to where Tomcat expected:
the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
I solved it by using the normal Java Platform in EB and parsing an environment-variable to a JVM arg, before I start my spring-server.
Here's the code for the Spring Boot-App
public class EnvironmentVariableParser {
private static final Log log = LogFactory.getLog(EnvironmentVariableParser.class);
public static void appendArguments() {
final String customJvmArgs = System.getenv().get("CUSTOM_JVM_ARGS");
if (customJvmArgs == null) {
return;
}
for (String entry : customJvmArgs.split(" ")) {
log.info(String.format("found custom jvm arg for: %s", entry));
final int separator = entry.indexOf('=');
System.setProperty(entry.substring(0, separator), entry.substring(separator + 1, entry.length()));
}
}
}
After that you can just call it, before you start your Application
public static void main(String[] args) {
EnvironmentVariableParser.appendArguments();
SpringApplication.run(MyServerApplication.class, args);
}
Then you can just specify "CUSTOM_JVM_ARGS" as an environment-variable and paste in your properties (seperated by spaces). Not the prettiest thing ever, but it works.. :P

Categories