Comments on: Install Tomcat 9 on CentOS 7 https://www.rosehosting.com/blog/install-tomcat-9-on-centos-7/ Premium Linux Tutorials Since 2001 Fri, 16 Dec 2022 11:37:13 +0000 hourly 1 https://wordpress.org/?v=6.5.3 By: Waje https://www.rosehosting.com/blog/install-tomcat-9-on-centos-7/#comment-47971 Sun, 20 Oct 2019 06:09:36 +0000 https://www.rosehosting.com/blog/?p=26328#comment-47971 I tried running the command – “systemctl start tomcat”. I got an error that – “Job for tomcat.service failed because the control process exited with error code. See “systemctl status tomcat.service” and “journalctl -xe” for details.”

Then I ran the command- “journalctl -xe” and got the following error –

“Unit tomcat.service entered failed state.
tomcat.service failed.
tomcat.service holdoff time over, scheduling restart.
Cannot add dependency job for unit systemd-vconsole-setup.service, ignoring: Unit is masked.
Stopped Apache Tomcat 9.”

]]>
By: Anon https://www.rosehosting.com/blog/install-tomcat-9-on-centos-7/#comment-47618 Thu, 21 Feb 2019 18:40:23 +0000 https://www.rosehosting.com/blog/?p=26328#comment-47618 In reply to Aurimas.

The commands should actually be as follows, this is close but did not take on my machine.

firewall-cmd –permanent –zone=public –add-port=8080/tcp
firewall-cmd –reload

]]>
By: Ivan https://www.rosehosting.com/blog/install-tomcat-9-on-centos-7/#comment-47554 Thu, 24 Jan 2019 21:42:12 +0000 https://www.rosehosting.com/blog/?p=26328#comment-47554 Please add the sections below to fix the missing PID file when starting tomcat manually for example with

sudo -u tomcat /opt/tomcat/bin/startup.sh

nano /opt/tomcat/bin/setenv.sh

add the line below
———————-

CATALINA_PID=”$CATALINA_BASE/tomcat.pid”

———————

ll /opt/tomcat/bin/setenv.sh
chown tomcat:tomcat /opt/tomcat/bin/setenv.sh
chmod 750 /opt/tomcat/bin/setenv.sh

]]>
By: Aurimas https://www.rosehosting.com/blog/install-tomcat-9-on-centos-7/#comment-47553 Thu, 24 Jan 2019 21:06:12 +0000 https://www.rosehosting.com/blog/?p=26328#comment-47553 This was missing
sudo firewall-cmd –zone=public –permanent –add-port=8080/tcp
sudo firewall-cmd –reload
before I was able to access apaches port from other machine.
Now however I only get a blank page, no idea what I might be missing.

]]>
By: Dag S Hansen https://www.rosehosting.com/blog/install-tomcat-9-on-centos-7/#comment-47431 Fri, 23 Nov 2018 11:36:51 +0000 https://www.rosehosting.com/blog/?p=26328#comment-47431 There is a typo in the user entry in the /opt/tomcat/conf/tomcat-users.xml:

<user username="admin" password="PASSWORD" roles="manager-gui,admin-gui"

Lacks "closing" and should read:

]]>
By: Dag SHansen https://www.rosehosting.com/blog/install-tomcat-9-on-centos-7/#comment-47430 Fri, 23 Nov 2018 11:20:16 +0000 https://www.rosehosting.com/blog/?p=26328#comment-47430 Assuming this comes way too late to benefit @Binay Sharma, but two shell scripts are missing the executable bit. Fix this by issuing the following commands:

chmod a+x /opt/tomcat/bin/startup.sh
chmod a+x /opt/tomcat/bin/catalina.sh

After this Tomcat starts fine.

]]>
By: Binay Sharma https://www.rosehosting.com/blog/install-tomcat-9-on-centos-7/#comment-47302 Sat, 29 Sep 2018 18:14:02 +0000 https://www.rosehosting.com/blog/?p=26328#comment-47302 At step 4, when I am starting tomcat by using “systemctl start tomcat”, it is simply starting the service however, when I checking the status it is saying

Process: 32732 ExecStop=/opt/tomcat/bin/shutdown.sh (code=exited, status=1/FAILURE)

On execution: journalctl -xe

It is saying that:

PID file found but either no matching process was found or the current user does not have permission to stop
Unit tomcat.service entered failed state.
tomcat.service failed.

Any suggestions on this?

]]>
By: Mahmoud https://www.rosehosting.com/blog/install-tomcat-9-on-centos-7/#comment-47173 Thu, 02 Aug 2018 18:05:38 +0000 https://www.rosehosting.com/blog/?p=26328#comment-47173 Great article, thanks for the effort

]]>