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?
Related
I have a docker file that uses this base image tomcat:9.0.70-jdk17-temurin , in it I am coping an axelor war that uses axelor-config.properties for its configuration
This file is stored in the following directory
/usr/local/tomcat/webapps/nameofapp/WEB-INF/classes/axelor-config.properties
When I use that file directly I don't have a problem and the app does run without a problem, but when I try to overwrite it using a volume in the docker-compose like this
./configuration/axelor-config.properties:/usr/local/tomcat/webapps/nameofapp/WEB-INF/classes/axelor-config.properties
It will not work, I want to overwrite that file so that I don't have to recompile the whole application and create the docker image each time I want to make a change in the configuration file.
I know the overwrite I'm doing is working as when I start the app and search for the file inside the container it does a comment line I have added but it doesn't end up starting. This are the docker logs I get when starting from a fresh image and fresh docker compose up:
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
26-Dec-2022 22:51:21.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.70
26-Dec-2022 22:51:21.666 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Dec 1 2022 14:05:47 UTC
26-Dec-2022 22:51:21.667 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.70.0
26-Dec-2022 22:51:21.667 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
26-Dec-2022 22:51:21.667 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 5.15.0-56-generic
26-Dec-2022 22:51:21.667 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
26-Dec-2022 22:51:21.668 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/java/openjdk
26-Dec-2022 22:51:21.668 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 17.0.5+8
26-Dec-2022 22:51:21.668 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Eclipse Adoptium
26-Dec-2022 22:51:21.668 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
26-Dec-2022 22:51:21.668 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
26-Dec-2022 22:51:21.681 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
26-Dec-2022 22:51:21.681 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
26-Dec-2022 22:51:21.681 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
26-Dec-2022 22:51:21.682 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
26-Dec-2022 22:51:21.682 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
26-Dec-2022 22:51:21.682 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
26-Dec-2022 22:51:21.682 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
26-Dec-2022 22:51:21.682 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
26-Dec-2022 22:51:21.682 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
26-Dec-2022 22:51:21.683 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
26-Dec-2022 22:51:21.683 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
26-Dec-2022 22:51:21.683 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
26-Dec-2022 22:51:21.683 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
26-Dec-2022 22:51:21.683 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
26-Dec-2022 22:51:21.688 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.35] using APR version [1.7.0].
26-Dec-2022 22:51:21.689 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
26-Dec-2022 22:51:21.689 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
26-Dec-2022 22:51:21.699 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.2 15 Mar 2022]
26-Dec-2022 22:51:22.409 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
26-Dec-2022 22:51:22.484 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [992] milliseconds
26-Dec-2022 22:51:22.578 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
26-Dec-2022 22:51:22.578 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.70]
26-Dec-2022 22:51:22.599 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/nameofapp.war]
26-Dec-2022 22:51:23.097 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/nameofapp.war] has finished in [498] ms
26-Dec-2022 22:51:23.099 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
26-Dec-2022 22:51:23.106 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [622] milliseconds
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.
I create simple app in Spring MVC and i have problem. HTTP Status 404 – Not Found This is my first app in spring mvc and i don't now what could happend ;/
This is my code and pom.xml
RootConfig :
#Configuration
public class RootConfig {
}
WebConfig:
#Configuration
#EnableWebMvc
#ComponentScan("com.mathew")
public class WebConfig extends WebMvcConfigurerAdapter {
#Bean
public InternalResourceViewResolver resolver(){
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/");
resolver.setSuffix(".jsp");
return resolver;
}
}
WebInit:
#Configuration
public class WebInit extends AbstractAnnotationConfigDispatcherServletInitializer {
protected Class<?>[] getRootConfigClasses() {
return new Class<?>[]{RootConfig.class};
}
protected Class<?>[] getServletConfigClasses() {
return new Class<?>[]{WebConfig.class};
}
protected String[] getServletMappings() {
return new String[]{"/"};
}
}
HomeController :
#Controller
public class HomeController {
#RequestMapping(value = "/")
public String home(){
return "home";
}
}
And my file pom.xml:
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
Can anyone help me?
EDIT :
My logs:
"C:\Program Files\apache-tomcat-9.0.0.M22\bin\catalina.bat" run
[2017-07-18 03:12:45,274] Artifact AppSpring: Server is not connected. Deploy is not available.
Using CATALINA_BASE: "C:\Users\dell\.IntelliJIdea2017.1\system\tomcat\Unnamed_AppSpring"
Using CATALINA_HOME: "C:\Program Files\apache-tomcat-9.0.0.M22"
Using CATALINA_TMPDIR: "C:\Program Files\apache-tomcat-9.0.0.M22\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_131"
Using CLASSPATH: "C:\Program Files\apache-tomcat-9.0.0.M22\bin\bootstrap.jar;C:\Program Files\apache-tomcat-9.0.0.M22\bin\tomcat-juli.jar"
18-Jul-2017 15:12:46.094 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/9.0.0.M22
18-Jul-2017 15:12:46.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jun 21 2017 09:44:18 UTC
18-Jul-2017 15:12:46.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 9.0.0.0
18-Jul-2017 15:12:46.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
18-Jul-2017 15:12:46.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
18-Jul-2017 15:12:46.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
18-Jul-2017 15:12:46.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jdk1.8.0_131\jre
18-Jul-2017 15:12:46.096 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_131-b11
18-Jul-2017 15:12:46.096 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
18-Jul-2017 15:12:46.096 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\dell\.IntelliJIdea2017.1\system\tomcat\Unnamed_AppSpring
18-Jul-2017 15:12:46.096 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files\apache-tomcat-9.0.0.M22
18-Jul-2017 15:12:46.096 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\dell\.IntelliJIdea2017.1\system\tomcat\Unnamed_AppSpring\conf\logging.properties
18-Jul-2017 15:12:46.096 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
18-Jul-2017 15:12:46.096 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
18-Jul-2017 15:12:46.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
18-Jul-2017 15:12:46.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
18-Jul-2017 15:12:46.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
18-Jul-2017 15:12:46.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
18-Jul-2017 15:12:46.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
18-Jul-2017 15:12:46.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
18-Jul-2017 15:12:46.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\dell\.IntelliJIdea2017.1\system\tomcat\Unnamed_AppSpring
18-Jul-2017 15:12:46.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\apache-tomcat-9.0.0.M22
18-Jul-2017 15:12:46.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\apache-tomcat-9.0.0.M22\temp
18-Jul-2017 15:12:46.097 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.12] using APR version [1.5.2].
18-Jul-2017 15:12:46.098 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
18-Jul-2017 15:12:46.098 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
18-Jul-2017 15:12:46.816 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k 26 Jan 2017]
18-Jul-2017 15:12:46.933 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
18-Jul-2017 15:12:46.951 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
18-Jul-2017 15:12:46.954 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
18-Jul-2017 15:12:46.956 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
18-Jul-2017 15:12:46.956 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1185 ms
18-Jul-2017 15:12:46.983 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
18-Jul-2017 15:12:46.983 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.0.M22
18-Jul-2017 15:12:46.993 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
18-Jul-2017 15:12:47.005 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
18-Jul-2017 15:12:47.008 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 50 ms
Connected to server
[2017-07-18 03:12:47,354] Artifact AppSpring: Artifact is being deployed, please wait...
[2017-07-18 03:12:47,848] Artifact AppSpring: Artifact is deployed successfully
[2017-07-18 03:12:47,849] Artifact AppSpring: Deploy took 495 milliseconds
18-Jul-2017 15:12:56.996 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\apache-tomcat-9.0.0.M22\webapps\manager]
18-Jul-2017 15:12:57.034 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\apache-tomcat-9.0.0.M22\webapps\manager] has finished in [37] ms
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
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