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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-15-2012, 06:00 PM
|
#1
|
Member
Registered: Apr 2010
Posts: 82
Rep:
|
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.
|
|
|
05-15-2012, 07:08 PM
|
#2
|
Member
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261
Rep:
|
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: - /var/log/messages
- /var/log/apache2/error_log
- [/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.
|
|
|
05-15-2012, 07:27 PM
|
#3
|
Member
Registered: Apr 2010
Posts: 82
Original Poster
Rep:
|
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
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: - /var/log/messages
- /var/log/apache2/error_log
- [/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.
|
|
|
|
05-16-2012, 06:25 AM
|
#4
|
Senior Member
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
|
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.
|
|
|
05-16-2012, 06:34 AM
|
#5
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep:
|
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.
|
|
|
05-16-2012, 07:48 AM
|
#6
|
Member
Registered: Apr 2010
Posts: 82
Original Poster
Rep:
|
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
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.
|
|
|
|
05-16-2012, 09:29 AM
|
#7
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep:
|
There could be an issue with Apache configuration. Look into the error logs.
|
|
|
05-16-2012, 02:58 PM
|
#8
|
Member
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261
Rep:
|
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.
|
|
|
05-16-2012, 09:34 PM
|
#9
|
Senior Member
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
|
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
|
|
|
All times are GMT -5. The time now is 11:07 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|