Tomcat`s jvm issue

After an update tomcat does not start up.

systemctl status tomcat8 -l

● tomcat8.service – Apache Tomcat Web 8.x Application Container
Loaded: loaded (/etc/systemd/system/tomcat8.service; enabled; vendor preset: disabled)
Active: inactive (dead) (Result: exit-code) since Wed 2018-05-16 12:26:36 CEST; 7min ago
Process: 1805 ExecStop=/opt/tomcat/bin/shutdown.sh (code=exited, status=1/FAILURE)
Process: 1794 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS)
Main PID: 1804 (code=exited, status=127)

May 16 12:26:31 ususario.iesteis.es systemd[1]: tomcat8.service: control process exited, code=exited status=1
May 16 12:26:31 ususario.iesteis.es systemd[1]: Unit tomcat8.service entered failed state.
May 16 12:26:31 ususario.iesteis.es systemd[1]: tomcat8.service failed.
May 16 12:26:36 ususario.iesteis.es systemd[1]: Stopped Apache Tomcat Web 8.x Application Container.

 

tail -f  /opt/tomcat/logs/catalina.out

/opt/tomcat/bin/catalina.sh: line 464: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre//bin/java: No such file or directory

update-alternatives –config java

There is 2 program that provides ‘java’.

Selection Command
———————————————–
1 java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.181-2.6.14.5.el7.x86_64/jre/bin/java)
*+ 2 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-7.b10.el7.x86_64/jre/bin/java)

nano /etc/systemd/system/tomcat8.service

[Unit]
Description=Apache Tomcat Web 8.x Application Container
Wants=network.target
After=network.target

[Service]
Type=forking

# line changed

Environment=JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-7.b10.el7.x86_64/jre/
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment=’CATALINA_OPTS=-Xms512M -Xmx1024M -Djava.net.preferIPv4Stack=true’
Environment=’JAVA_OPTS=-Djava.awt.headless=true’

ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
SuccessExitStatus=143

User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always

[Install]
WantedBy=multi-user.target

systemctl daemon-reload

systemctl start tomcat8
systemctl status tomcat8 -l

● tomcat8.service – Apache Tomcat Web 8.x Application Container
Loaded: loaded (/etc/systemd/system/tomcat8.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2018-05-16 12:35:13 CEST; 5s ago
Process: 2089 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS)
Main PID: 2099 (java)
CGroup: /system.slice/tomcat8.service
└─2099 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-7.b10.el7.x86_64/jre//bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Xms512M -Xmx1024M -Djava.net.preferIPv4Stack=true -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start

May 16 12:35:13 ususario.iesteis.es systemd[1]: tomcat8.service holdoff time over, scheduling restart.
May 16 12:35:13 ususario.iesteis.es systemd[1]: Starting Apache Tomcat Web 8.x Application Container…
May 16 12:35:13 ususario.iesteis.es startup.sh[2089]: Existing PID file found during start.
May 16 12:35:13 ususario.iesteis.es startup.sh[2089]: Removing/clearing stale PID file.
May 16 12:35:13 ususario.iesteis.es systemd[1]: Started Apache Tomcat Web 8.x Application Container.

Anuncios

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

Conectando a %s