How to keep changes after service restart in Tomcat docker container?

I have the latest tomcat container (image: 89481b5d9082). I want to change the default port of Tomcat. After editing the configurations I am required to restart the Tomcat service. Upon doing so the container stops (I assume it is “kept alive” by the running Tomcat) and when I start this container again the changes are lost.

How can I make these changes and keep them after service restart?

How to link Tomcat server config in Intellij Ultimate Edition?

In Java class, my sir told me to link Tomcat server config which is inside Xampp folder. But his OS was Windows and things were different on my side since I use Ubuntu 19.04. I installed “xampp-linux-x64-7.3.7-1-installer.run” from their Official website.

But unfortunately, there is no such “Tomcat” folder like in my sir Windows OS.

So I installed Tomcat using “sudo apt install tomcat9” assuming its the latest stable built.

And I went to Intellij to add Tomcat’s local server configuration, and showed the path “/etc/tomcat9” but the IDE says “Application server libraries not found” as u can see in the screenshot below:

screenshot of an error

What to do? What am I missing? Help needed.

Problema con Apache Tomcat y Eclipse

Estoy intentando levantar en el eclipse con el apache tomcat una aplicacion web pero estoy teniendo problemas… levanto el apache desde el eclipse y me entra al localhost:8080 y al /manager, pero cuando entro a localhost:8080/aplicacion me da error 404.

La aplicacion ya estaba hecha y nos la han pasado, nosotros estamos intentando configurarla para levantarla en local y no hay manera..

Os pongo todo lo que tengo.

JDK 1.8 Apache Tomcat 9

Creo el server tomcat 9 y le añado la aplicacion web, supongamos que el proyecto se llama “aplicacion”.

introducir la descripción de la imagen aquí

Ahora, modifico las propiedades del servidor: * Elijo la opcion de “use tomcat installation” para que me coja la ruta de donde está el tomcat (ahora mismo está en mi escritorio) * Desde la configuracion del tomcat, me voy a la pestaña “Modules” y cambiamos el web-modules de “aplicacion” a “aplicacion-web” (por seguir un ejemplo), esto es debido a que en el archivo aplicacion.xml, el nombre de la aplicacion es “”, por eso en web-modules hay que poner el mismo nombre.

introducir la descripción de la imagen aquí

introducir la descripción de la imagen aquí

Bien, ahora, compilo todo mediante el ANT.build, me compila correctamente y me genera el .WAR en la ruta donde está el workspace, tal que así /workspace/{name_project}/target, aquí está generado el .WAR

Vale, ahora inicio la aplicacion desde el botón verde (play) de tomcat/eclipse para arrancar la app… y aqui es donde tengo problemas.

Me tarda solo 5 segundos y no me cuadra, es como si no pillara el .war… una vez iniciado el tomcat, puedo entrar a localhost:8080 y a localhost:8080/manager. Si entro al manager, veo mi app “desplegada”, y si entro a la direccion localhost:8080/aplicacion-web/ es cuando me da el error 404

jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version name:   Apache Tomcat/9.0.21 jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server built:          Jun 4 2019 20:19:36 UTC jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version number: 9.0.21.0 jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Name:               Windows 7 jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Version:            6.1 jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Architecture:          amd64 jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Java Home:             C:\opt\Java\jdk1.8.0_40\jre jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Version:           1.8.0_40-b26 jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Vendor:            Oracle Corporation jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_BASE:         C:\Users\usuario\Desktop\apache-tomcat-9.0.21 jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_HOME:         C:\Users\usuario\Desktop\apache-tomcat-9.0.21 jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dcatalina.base=C:\Users\usuario\Desktop\apache-tomcat-9.0.21 jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dcatalina.home=C:\Users\usuario\Desktop\apache-tomcat-9.0.21 jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dwtp.deploy=C:\Users\usuario\Desktop\apache-tomcat-9.0.21\wtpwebapps jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Djava.endorsed.dirs=C:\Users\usuario\Desktop\apache-tomcat-9.0.21\endorsed jul 10, 2019 9:48:36 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dfile.encoding=Cp1252 jul 10, 2019 9:48:36 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5]. jul 10, 2019 9:48:36 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. jul 10, 2019 9:48:36 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] jul 10, 2019 9:48:36 AM org.apache.catalina.core.AprLifecycleListener initializeSSL INFO: OpenSSL successfully initialized [OpenSSL 1.1.1a  20 Nov 2018] jul 10, 2019 9:48:37 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-nio-8080"] jul 10, 2019 9:48:37 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-nio-8009"] jul 10, 2019 9:48:37 AM org.apache.catalina.startup.Catalina load INFO: Server initialization in [1,283] milliseconds jul 10, 2019 9:48:37 AM org.apache.catalina.core.StandardService startInternal INFO: Starting service [Catalina] jul 10, 2019 9:48:37 AM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet engine: [Apache Tomcat/9.0.21] jul 10, 2019 9:48:38 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "20" for "maxActive" property, which is being ignored. jul 10, 2019 9:48:38 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored. jul 10, 2019 9:48:38 AM org.apache.jasper.servlet.TldScanner scanJars INFO: 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. jul 10, 2019 9:48:39 AM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom WARNING: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [128] milliseconds. jul 10, 2019 9:48:39 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory [C:\Users\usuario\Desktop\apache-tomcat-9.0.21\webapps\docs] jul 10, 2019 9:48:39 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "20" for "maxActive" property, which is being ignored. jul 10, 2019 9:48:39 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored. jul 10, 2019 9:48:39 AM org.apache.jasper.servlet.TldScanner scanJars INFO: 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. jul 10, 2019 9:48:39 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deployment of web application directory [C:\Users\usuario\Desktop\apache-tomcat-9.0.21\webapps\docs] has finished in [611] ms jul 10, 2019 9:48:39 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory [C:\Users\usuario\Desktop\apache-tomcat-9.0.21\webapps\examples] jul 10, 2019 9:48:40 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "20" for "maxActive" property, which is being ignored. jul 10, 2019 9:48:40 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored. jul 10, 2019 9:48:40 AM org.apache.jasper.servlet.TldScanner scanJars INFO: 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. jul 10, 2019 9:48:40 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() jul 10, 2019 9:48:40 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() jul 10, 2019 9:48:40 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeAdded('StockTicker', 'async.Stockticker@492521c4') jul 10, 2019 9:48:40 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deployment of web application directory [C:\Users\usuario\Desktop\apache-tomcat-9.0.21\webapps\examples] has finished in [1,111] ms jul 10, 2019 9:48:40 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory [C:\Users\usuario\Desktop\apache-tomcat-9.0.21\webapps\host-manager] jul 10, 2019 9:48:41 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "20" for "maxActive" property, which is being ignored. jul 10, 2019 9:48:41 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored. jul 10, 2019 9:48:41 AM org.apache.jasper.servlet.TldScanner scanJars INFO: 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. jul 10, 2019 9:48:41 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deployment of web application directory [C:\Users\usuario\Desktop\apache-tomcat-9.0.21\webapps\host-manager] has finished in [609] ms jul 10, 2019 9:48:41 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory [C:\Users\usuario\Desktop\apache-tomcat-9.0.21\webapps\manager] jul 10, 2019 9:48:41 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "20" for "maxActive" property, which is being ignored. jul 10, 2019 9:48:41 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored. jul 10, 2019 9:48:41 AM org.apache.jasper.servlet.TldScanner scanJars INFO: 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. jul 10, 2019 9:48:41 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deployment of web application directory [C:\Users\usuario\Desktop\apache-tomcat-9.0.21\webapps\manager] has finished in [583] ms jul 10, 2019 9:48:41 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory [C:\Users\usuario\Desktop\apache-tomcat-9.0.21\webapps\ROOT] jul 10, 2019 9:48:42 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "20" for "maxActive" property, which is being ignored. jul 10, 2019 9:48:42 AM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance WARNING: Name = aplicacion3DS Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored. jul 10, 2019 9:48:42 AM org.apache.jasper.servlet.TldScanner scanJars INFO: 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. jul 10, 2019 9:48:42 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deployment of web application directory [C:\Users\usuario\Desktop\apache-tomcat-9.0.21\webapps\ROOT] has finished in [556] ms jul 10, 2019 9:48:42 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-nio-8080"] jul 10, 2019 9:48:42 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-nio-8009"] jul 10, 2019 9:48:42 AM org.apache.catalina.startup.Catalina start INFO: Server startup in [5,222] milliseconds 

introducir la descripción de la imagen aquí

introducir la descripción de la imagen aquí

Es como si el tomcat no me cogiera el .WAR… esta es la configuracion del servidor:

introducir la descripción de la imagen aquí

Lo que he visto es que en la propiedad ” -Dwtp.deploy” está puesta la carpeta “wtpwebapps” del tomcat y digo quizas está deployando lo que está en esa ruta.. pues he puesto ahí el .war (tanto el .war como el .war descomprimido) y me sigue sin ir.

Otra curiosidad es que si en la carpeta del apache tomcat, en la ruta ../apache-tomcat-9.0.21\webapps, descomprimo el .war pero con otro nombre (imaginemos aplicacion-web_2), cuando inicio el servidor desde el eclipse, si que coge ese war, ya que tarda 100 segundos en levantar y sale un comentario que pone “INFO: Deploying web application directory [C:\Users\usuario\Desktop\apache-tomcat-9.0.21\webapps\aplicacion-web-2]” y aqui si entro al manager del tomcat, si que me aparecen aplicacion-web y aplicacion-web-2, pero ninguna de las 2 entra (error 404 en las 2).

introducir la descripción de la imagen aquí

Es como si el tomcat del eclipse no me cogiera bien el war (ruta mal definida) pero si lo pongo en webapps si me coge ese war..

Indicar que cuando pongo el .war descomprimido en webapps de la carpeta del tomcat y tarda 100 segundos en levantar el server en eclipse, da un error de BBDD ya que la BBDD que tenemos en el .context no funciona, por tanto aunque la BBDD no funcione ¿no debería de entrar a la aplicacion pero no conectar con nada?, no debería dar el error 404 ¿no?

¿alguna idea?, no tiene sentido estar generando el .war y descomprimiendolo a mano en la carpeta del tomcat, ¿no? deberia cogerlo solo el servidor

Gracias!!

Ubuntu 16.04 tomcat 8 manager webapp no access

I was having a problem with user and password entering the manager webapp and tried to fix it editing the manager.xml and host-manager.xml files. And now I don’t even get the login prompt and check the logs and it is failing to start. I blew it.

Hopefully someone can tell me somewhere to start from the log file I am posting.

Thanks

Morgan

 7 09, 2019 4:41:07 午後 org.apache.catalina.startup.HostConfig deployDescriptor 情報: 設定記述子 /etc/tomcat8/Catalina/localhost/host-manager.xml を配備します 7 09, 2019 4:41:08 午後 org.apache.catalina.core.ContainerBase addChildInternal 重大: ContainerBase.addChild: start:  org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/host-manager]]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)     at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)     at org.apache.catalina.startup.HostConfig$  DeployDescriptor.run(HostConfig.java:1794)     at java.util.concurrent.Executors$  RunnableAdapter.call(Executors.java:511)     at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     at java.util.concurrent.ThreadPoolExecutor$  Worker.run(ThreadPoolExecutor.java:624)     at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@14d8f71]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)     at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4937)     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5067)     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)     ... 10 more Caused by: java.lang.IllegalArgumentException: The main resource set specified [/var/lib/tomcat8/webapps/host-manager] is not valid     at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:724)     at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:684)     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)     ... 13 more  7 09, 2019 4:41:08 午後 org.apache.catalina.startup.HostConfig deployDescriptor 重大: 設定記述子 /etc/tomcat8/Catalina/localhost/host-manager.xml を配備中のエラーです java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/host-manager]]     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)     at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)     at org.apache.catalina.startup.HostConfig$  DeployDescriptor.run(HostConfig.java:1794)     at java.util.concurrent.Executors$  RunnableAdapter.call(Executors.java:511)     at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     at java.util.concurrent.ThreadPoolExecutor$  Worker.run(ThreadPoolExecutor.java:624)     at java.lang.Thread.run(Thread.java:748)  7 09, 2019 4:41:08 午後 org.apache.catalina.startup.HostConfig deployDescriptor 情報: Deployment of configuration descriptor /etc/tomcat8/Catalina/localhost/host-manager.xml has finished in 237 ms 7 09, 2019 4:41:08 午後 org.apache.catalina.startup.HostConfig deployDescriptor 情報: 設定記述子 /etc/tomcat8/Catalina/localhost/manager.xml を配備します 7 09, 2019 4:41:08 午後 org.apache.catalina.core.ContainerBase addChildInternal 重大: ContainerBase.addChild: start:  org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/manager]]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)     at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)     at org.apache.catalina.startup.HostConfig$  DeployDescriptor.run(HostConfig.java:1794)     at java.util.concurrent.Executors$  RunnableAdapter.call(Executors.java:511)     at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     at java.util.concurrent.ThreadPoolExecutor$  Worker.run(ThreadPoolExecutor.java:624)     at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@1483629]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)     at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4937)     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5067)     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)     ... 10 more Caused by: java.lang.IllegalArgumentException: The main resource set specified [/usr/share/tomcat8/webapps/manager] is not valid     at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:724)     at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:684)     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)     ... 13 more  7 09, 2019 4:41:08 午後 org.apache.catalina.startup.HostConfig deployDescriptor 重大: 設定記述子 /etc/tomcat8/Catalina/localhost/manager.xml を配備中のエラーです java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/manager]]     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)     at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)     at org.apache.catalina.startup.HostConfig$  DeployDescriptor.run(HostConfig.java:1794)     at java.util.concurrent.Executors$  RunnableAdapter.call(Executors.java:511)     at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     at java.util.concurrent.ThreadPoolExecutor$  Worker.run(ThreadPoolExecutor.java:624)  

Ubuntu 16.04 tomcat 8 manager webapp no access

I was having a problem with user and password entering the manager webapp and tried to fix it editing the manager.xml and host-manager.xml files. And now I don’t even get the login prompt and check the logs and it is failing to start. I blew it.

Hopefully someone can tell me somewhere to start from the log file I am posting.

Thanks

Morgan

 7 09, 2019 4:41:07 午後 org.apache.catalina.startup.HostConfig deployDescriptor 情報: 設定記述子 /etc/tomcat8/Catalina/localhost/host-manager.xml を配備します 7 09, 2019 4:41:08 午後 org.apache.catalina.core.ContainerBase addChildInternal 重大: ContainerBase.addChild: start:  org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/host-manager]]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)     at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)     at org.apache.catalina.startup.HostConfig$  DeployDescriptor.run(HostConfig.java:1794)     at java.util.concurrent.Executors$  RunnableAdapter.call(Executors.java:511)     at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     at java.util.concurrent.ThreadPoolExecutor$  Worker.run(ThreadPoolExecutor.java:624)     at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@14d8f71]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)     at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4937)     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5067)     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)     ... 10 more Caused by: java.lang.IllegalArgumentException: The main resource set specified [/var/lib/tomcat8/webapps/host-manager] is not valid     at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:724)     at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:684)     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)     ... 13 more  7 09, 2019 4:41:08 午後 org.apache.catalina.startup.HostConfig deployDescriptor 重大: 設定記述子 /etc/tomcat8/Catalina/localhost/host-manager.xml を配備中のエラーです java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/host-manager]]     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)     at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)     at org.apache.catalina.startup.HostConfig$  DeployDescriptor.run(HostConfig.java:1794)     at java.util.concurrent.Executors$  RunnableAdapter.call(Executors.java:511)     at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     at java.util.concurrent.ThreadPoolExecutor$  Worker.run(ThreadPoolExecutor.java:624)     at java.lang.Thread.run(Thread.java:748)  7 09, 2019 4:41:08 午後 org.apache.catalina.startup.HostConfig deployDescriptor 情報: Deployment of configuration descriptor /etc/tomcat8/Catalina/localhost/host-manager.xml has finished in 237 ms 7 09, 2019 4:41:08 午後 org.apache.catalina.startup.HostConfig deployDescriptor 情報: 設定記述子 /etc/tomcat8/Catalina/localhost/manager.xml を配備します 7 09, 2019 4:41:08 午後 org.apache.catalina.core.ContainerBase addChildInternal 重大: ContainerBase.addChild: start:  org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/manager]]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)     at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)     at org.apache.catalina.startup.HostConfig$  DeployDescriptor.run(HostConfig.java:1794)     at java.util.concurrent.Executors$  RunnableAdapter.call(Executors.java:511)     at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     at java.util.concurrent.ThreadPoolExecutor$  Worker.run(ThreadPoolExecutor.java:624)     at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@1483629]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)     at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4937)     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5067)     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)     ... 10 more Caused by: java.lang.IllegalArgumentException: The main resource set specified [/usr/share/tomcat8/webapps/manager] is not valid     at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:724)     at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:684)     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)     ... 13 more  7 09, 2019 4:41:08 午後 org.apache.catalina.startup.HostConfig deployDescriptor 重大: 設定記述子 /etc/tomcat8/Catalina/localhost/manager.xml を配備中のエラーです java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/manager]]     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)     at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)     at org.apache.catalina.startup.HostConfig$  DeployDescriptor.run(HostConfig.java:1794)     at java.util.concurrent.Executors$  RunnableAdapter.call(Executors.java:511)     at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     at java.util.concurrent.ThreadPoolExecutor$  Worker.run(ThreadPoolExecutor.java:624)  

Утечка памяти Tomcat MYSQL

При выключении приложения на Tomcat выбивает данную ошибку.

WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [Gym_war_exploded] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:  java.lang.Object.wait(Native Method)  java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)  com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:70)  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  java.util.concurrent.ThreadPoolExecutor$  Worker.run(ThreadPoolExecutor.java:624)  java.lang.Thread.run(Thread.java:748) 

Illegal reflective acces al iniciar mi proyecto en Eclipse JEE con Tomcat

recien comienzo en la programacion y tengo un problema con el tomcat 8.5 o 9.0 al iniciar mis proyectos, uso jdk 12.0.1

y me sale el siguiente error :

 WARNING: An illegal reflective access operation has occurred     WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/C:/Users/Valdivia/Downloads/apache-tomcat-8.5.42/lib/catalina.jar) to field java.io.ObjectStreamClass$  Caches.localDescs     WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase     WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations     WARNING: All illegal access operations will be denied in a future release 

he tratado de probar de borrar y volver a poner el tomcat pero sigue saliendo, lo único que creo que pudo haber sido es que copie las librerías de struts2 de otro proyecto en mi carpeta lib.

Configurar porta para o Manager do Tomcat

Gostaria de configurar outra porta para acessar o manager do TOMCAT. Verifiquei que é possível criar outro service no arquivo server.xml definindo outra porta e outro appBase. Minha duvida é: Se eu definir um appBase com a porta 9000 e mudar o diretorio do manager para esse serviço. Quando alguem fizer um deploy de outro .war usando o manager, essa nova aplicação vai ficar disponivel na mesma porta do manager?

Nginx + Tomcat working in the same server

I’m developing a WebApp using Tomcat. I’ve set a frontal NGINX server to serve static content and redirect the rest of work to a Tomcat server.

I’ve set that configuration in NGINX:

proxy_cache_path  /var/www/mysite/assets levels=1:2 keys_zone=my_cache:10m inactive=60m; proxy_cache_key   "$  scheme$  request_method$  host$  request_uri";  server {         server_name             mysite.com www.mysite.com;         listen                  443 ssl http2;          ssl_certificate         /etc/ssl/mysite.crt;         ssl_certificate_key     /etc/ssl/mysite.key;         ssl_session_cache       shared:SSL:10m;         ssl_session_timeout     10m;          root                    /opt/tomcat/latest/webapps/mysite/;         index                   index.jsp;          location ~* \.(jpg|jpeg|png|gif|ico|css|js|xml|gz)$   {                 expires 12h;         }          location / {                 proxy_pass              http://127.0.0.1:8080/mysite/;                 proxy_redirect          off;                 proxy_set_header        Host $  host;                 proxy_set_header        X-Forwarded-For $  proxy_add_x_forwarded_for;                 proxy_set_header        X-Real-IP $  remote_addr;                 proxy_set_header        X-Forwarded-Proto $  scheme;                 proxy_set_header        X-Server-Proto $  server_protocol;                  proxy_cache             my_cache;                 add_header              X-Proxy-Cache $  upstream_cache_status;         } } 

As you can see, I set the proxy redirect and the proxy cache. Using the last directive (add_header X-Proxy-Cache $ upstream_cache_status;) I could see if a hva e HIT or a MISS loading resources.

The problems I found are:

  1. If I use this configuration, I think can’t see the HIT/MISS headers, so I don’t know if it’s working well the proxy cache.
  2. If I comment the entire location ~* \.(jpg|jpeg|png|gif|ico|css|js|xml|gz)$ section, I can see the HIT/MISS headers, so I think the proxy cache works, but I don’t know if I’m letting Tomcat manage static content, and that is what I wanted to avoid using this section

How could I set the config file to use a proxy cache and let NGINX manage the static content (jpg,css,js,…)? Maybe everything is alright and I’ve got it well… Which is the best solution?

Thanks.