Quote:
Originally Posted by amperenaushad
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