LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-30-2017, 07:16 AM   #1
amperenaushad
LQ Newbie
 
Registered: Apr 2016
Posts: 12

Rep: Reputation: Disabled
Tomcat 8 is not getting started after reboot in RHEL 7.4


Hi

I am using RHEL 7.4 on which I have configured tomcat 8. Everything went perfect until I reboot the system. After rebooting tomcat is not running up. However when I am giving below commands then it is working fine.

Below are the commands that I need to run every time to get tomcat up after every reboot.

#export JAVA_HOME=/home/tomcat/jdk1.8.0_144
#export CATALINA_HOME=/home/tomcat/apache-tomcat-8.5.20
#export CATALINA_BASE=$CATALINA_HOME
#$CATALINA_HOME/bin/startup.sh

I have already placed the above 3 lines in .bash_profile of tomcat user (nothing happened)

Then I created a service in /etc/systemd/system as tomcat.service. Contents of the service unit are as following


# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target

[Service]
Type=forking

Environment=JAVA_HOME=/home/tomcat/jdk1.8.0_144
Environment=CATALINA_PID=/home/tomcat/apache-tomcat-8.5.20/temp/tomcat.pid
Environment=CATALINA_HOME=/home/tomcat/apache-tomcat-8.5.20
Environment=CATALINA_BASE=/home/tomcat/apache-tomcat-8.5.20

ExecStart=/home/tomcat/apache-tomcat-8.5.20/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID

User=tomcat
Group=tomcat

[Install]
WantedBy=multi-user.target




Then I am starting the service as #systemctl start tomcat.service and getting below error:

Job for tomcat.service failed because the control process exited with error code. See "systemctl status tomcat.service" and "journalctl -xe" for details.

I have attached the error file of journalctl -xe


Kindly check and let me know what to do as I am new to Linux...Its really important.
Attached Files
File Type: txt error.txt (188.5 KB, 68 views)
 
Old 08-30-2017, 07:41 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,622

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by amperenaushad View Post
Hi
I am using RHEL 7.4 on which I have configured tomcat 8.
As you've been told before, unless you are PAYING for RHEL, you should not really be using it. Are you paying?? If so..have you contacted RHEL support and/or checked their knowledgebase for the relevant help articles about this???
Quote:
Everything went perfect until I reboot the system. After rebooting tomcat is not running up. However when I am giving below commands then it is working fine. Below are the commands that I need to run every time to get tomcat up after every reboot.

#export JAVA_HOME=/home/tomcat/jdk1.8.0_144
#export CATALINA_HOME=/home/tomcat/apache-tomcat-8.5.20
#export CATALINA_BASE=$CATALINA_HOME
#$CATALINA_HOME/bin/startup.sh

I have already placed the above 3 lines in .bash_profile of tomcat user (nothing happened)
Right, because until the system is totally up and that user logs in, that profile isn't touched at all.
Quote:
Then I created a service in /etc/systemd/system as tomcat.service. Contents of the service unit are as following
Code:
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target

[Service]
Type=forking

Environment=JAVA_HOME=/home/tomcat/jdk1.8.0_144
Environment=CATALINA_PID=/home/tomcat/apache-tomcat-8.5.20/temp/tomcat.pid
Environment=CATALINA_HOME=/home/tomcat/apache-tomcat-8.5.20
Environment=CATALINA_BASE=/home/tomcat/apache-tomcat-8.5.20

ExecStart=/home/tomcat/apache-tomcat-8.5.20/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID

User=tomcat
Group=tomcat

[Install]
WantedBy=multi-user.target
Then I am starting the service as #systemctl start tomcat.service and getting below error:

Job for tomcat.service failed because the control process exited with error code. See "systemctl status tomcat.service" and "journalctl -xe" for details.

I have attached the error file of journalctl -xe Kindly check and let me know what to do as I am new to Linux...Its really important.
Again, you need to read the "Question Guidelines" and "How to ask a smart question" links in my posting signature. This is NOT IMPORTANT for anyone here...we volunteer our time, so asking for/expecting "urgent/important" help is fairly rude. Especially if you're using RHEL, because you are PAYING them to be there 24/7 for your 'important' help needs.

And posting that entire text file for us to wade through isn't good...just post the relevant parts in your post, and use CODE tags, please. If you open that file up and actually read it, you will see the error. Search for the word "catalina"; the error is VERY clear as to what you need to do. Reference this from a forum moderator, from not too long ago:
https://www.linuxquestions.org/quest...2/#post5670319
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The init-script is not started during reboot thomas2004ch Linux - Software 23 08-09-2013 05:35 AM
By reboot the service is not started thomas2004ch Solaris / OpenSolaris 2 07-09-2013 05:17 PM
[SOLVED] After reboot tomcat 5 will not start on RHEL 3 server lhiggie1 Linux - Server 5 03-21-2011 11:11 PM
The httpd cannot be started after reboot thomas2004ch Linux - Software 5 11-04-2010 03:03 AM
Tomcat should be started as root? thisObject Linux - Software 3 05-09-2006 12:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration