LinuxQuestions.org
Visit Jeremy's Blog.
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 05-15-2012, 06:00 PM   #1
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Rep: Reputation: 1
httpd and tomcat start when boot


I want httpd(apache http server) and tomcat to start when my box starts up, I installed httpd using yum and tomcat I did manual installation and I created tomcat file and added it to chkconfig

when I do chkconfig--list

I get this
Code:
[root@domU-12-31-39-0E-AA-22 ec2-user]# chkconfig --list
acpid           0:off   1:off   2:on    3:on    4:on    5:on    6:off
atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off
auditd          0:off   1:off   2:on    3:on    4:on    5:on    6:off
cgconfig        0:off   1:off   2:off   3:off   4:off   5:off   6:off
cgred           0:off   1:off   2:off   3:off   4:off   5:off   6:off
cloud-init      0:off   1:off   2:on    3:on    4:on    5:on    6:off
cloud-init-user-scripts 0:off   1:off   2:on    3:on    4:on    5:on    6:off
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
irqbalance      0:off   1:off   2:off   3:on    4:on    5:on    6:off
lvm2-monitor    0:off   1:on    2:on    3:on    4:on    5:on    6:off
mdmonitor       0:off   1:off   2:on    3:on    4:on    5:on    6:off
messagebus      0:off   1:off   2:on    3:on    4:on    5:on    6:off
netconsole      0:off   1:off   2:off   3:off   4:off   5:off   6:off
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
ntpd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
ntpdate         0:off   1:off   2:on    3:on    4:on    5:on    6:off
psacct          0:off   1:off   2:off   3:off   4:off   5:off   6:off
racoon          0:off   1:off   2:off   3:off   4:off   5:off   6:off
rdisc           0:off   1:off   2:off   3:off   4:off   5:off   6:off
rsyslog         0:off   1:off   2:on    3:on    4:on    5:on    6:off
saslauthd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
sendmail        0:off   1:off   2:on    3:on    4:on    5:on    6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
tomcat          0:off   1:off   2:off   3:on    4:on    5:on    6:off
udev-post       0:off   1:on    2:on    3:on    4:on    5:on    6:off
yum-updatesd    0:off   1:off   2:on    3:on    4:on    5:on    6:off
this shows both tomcat and httpd .When I reboot machine both tomcat and httpd does not start , please help me. I want both of these to start automatically when I machine start up.Please advice.
 
Old 05-15-2012, 07:08 PM   #2
ShadowCat8
Member
 
Registered: Nov 2004
Location: Ontario, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 235

Rep: Reputation: 52
Well,

Let's try to get a bit more information to find the core cause of the issue...

Can you get us the sections of the logs for both apache and tomcat where it attempts to start and then fails out? You can check a couple locations:
  1. /var/log/messages
  2. /var/log/apache2/error_log
  3. [/var/log/tomcat#/,/opt/tomcat#/logs/]catalina.out (Could be either directory, depending on your install. The '#' is the version number of your tomcat, which will be part of the path.)

HTH. Let us know.
 
Old 05-15-2012, 07:27 PM   #3
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Original Poster
Rep: Reputation: 1
here is logs for httpd/error_log

Code:
[Tue May 15 22:18:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:18:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:19:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:19:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:20:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:20:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:21:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:21:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:22:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:22:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:23:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:23:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:24:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:24:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:25:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:25:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:26:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:26:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:27:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:27:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:28:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:28:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:29:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:29:37 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:30:07 2012] [error] [client 10.70.91.131] File does not exist: /var/www/html/artms
[Tue May 15 22:30:12 2012] [notice] caught SIGTERM, shutting down
[Tue May 15 22:37:54 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue May 15 22:37:54 2012] [notice] Digest: generating secret for digest authentication ...
[Tue May 15 22:37:54 2012] [notice] Digest: done
[Tue May 15 22:37:54 2012] [notice] Apache/2.2.22 (Unix) DAV/2 configured -- resuming normal operations
[Tue May 15 22:37:56 2012] [error] [client 74.116.63.13] Directory index forbidden by Options directive: /var/www/html/
[Tue May 15 22:37:56 2012] [error] [client 74.116.63.13] File does not exist: /var/www/html/favicon.ico
[Tue May 15 22:40:20 2012] [notice] caught SIGTERM, shutting down
Unable to open logs
Unable to open logs


Quote:
Originally Posted by ShadowCat8 View Post
Well,

Let's try to get a bit more information to find the core cause of the issue...

Can you get us the sections of the logs for both apache and tomcat where it attempts to start and then fails out? You can check a couple locations:
  1. /var/log/messages
  2. /var/log/apache2/error_log
  3. [/var/log/tomcat#/,/opt/tomcat#/logs/]catalina.out (Could be either directory, depending on your install. The '#' is the version number of your tomcat, which will be part of the path.)

HTH. Let us know.
 
Old 05-16-2012, 06:25 AM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Did you use these commands-

Code:
# chkconfig httpd on
# chkconfig tomcat on
If not then try these command and you'll get automatic start of these services whenver you reboot your machine.
 
Old 05-16-2012, 06:34 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Code:
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
This says it all. You need to enable httpd to start at boot using the command Satyaveer mentioned.
 
Old 05-16-2012, 07:48 AM   #6
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Original Poster
Rep: Reputation: 1
I tried as you said and rebooted .
checked service httpd status

got this

Code:
httpd dead but subsys locked
Quote:
Originally Posted by linuxlover.chaitanya View Post
Code:
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
This says it all. You need to enable httpd to start at boot using the command Satyaveer mentioned.
 
Old 05-16-2012, 09:29 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
There could be an issue with Apache configuration. Look into the error logs.
 
Old 05-16-2012, 02:58 PM   #8
ShadowCat8
Member
 
Registered: Nov 2004
Location: Ontario, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 235

Rep: Reputation: 52
Hmmmm...

Well, from the following snippet of the original post:
Code:
tomcat          0:off   1:off   2:off   3:on    4:on    5:on    6:off
That says that Tomcat *should* be running on the standard boot of the machine and showing the "Install Success" page on http://domU-12-31-39-0E-AA-22:8080/ (by default configuration.)

So, when you try to browse to that page inside your network, or from the system itself, do you get anything? BTW, if you have no GUI on the server, or are only ssh'd into it, you can use 'lynx' to check it from the console on the server itself. You can try the above URL and/or try http://127.0.0.1:8080/ and see if anything comes up.

HTH. Let us know.
 
Old 05-16-2012, 09:34 PM   #9
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
httpd dead but subsys locked
Try this-

Code:
# rm -f  /var/lock/subsys/httpd
And again restart the httpd service-

Code:
# /etc/init.d/httpd restart
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Start Tomcat before Apache on boot Swakoo Linux - Server 3 04-10-2007 02:25 AM
rc.httpd won't start on boot pioniere Slackware 7 06-27-2006 08:39 PM
Getting Tomcat to start on Boot Greenman Red Hat 5 11-22-2004 09:41 AM
How to start Apache and Tomcat with Linux boot montejr Linux - Newbie 2 04-23-2004 02:03 PM
How to start scriptfile(tomcat) automatically at boot-time run fmohideen76 Linux - General 4 07-11-2002 10:44 PM

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

All times are GMT -5. The time now is 07:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration