LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-31-2010, 05:29 PM   #1
eboy98
Member
 
Registered: Oct 2007
Distribution: RHEL5
Posts: 64

Rep: Reputation: 15
http service failed to start


Hello There,

i am using RHEL5 at VirtualBox,at the time of installation i did create two partition one for / and another for swap.Now my /var directory is taking too much space and i decided to create a new partition with required size and mount that partition to /var.

Now http service wont start and i did not reboot yet.

am i in the right track, if not what should i do?

Last edited by eboy98; 03-31-2010 at 05:46 PM.
 
Old 03-31-2010, 05:57 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,775

Rep: Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614
Quote:
Originally Posted by eboy98 View Post
Hello There,

i am using RHEL5 at VirtualBox,at the time of installation i did create two partition one for / and another for swap.Now my /var directory is taking too much space and i decided to create a new partition with required size and mount that partition to /var.

Now http service wont start and i did not reboot yet.

am i in the right track, if not what should i do?
No idea, since your question is hard to understand.

You say your http service won't start....have you checked the logs? What error(s) did you get? What did you do/try? Did you move the data from your old /var to the new one? All we can tell from your question, is that http won't start...which doesn't give us alot to go on, to try to help.
 
Old 04-01-2010, 01:35 PM   #3
eboy98
Member
 
Registered: Oct 2007
Distribution: RHEL5
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by TB0ne View Post
No idea, since your question is hard to understand.

You say your http service won't start....have you checked the logs? What error(s) did you get? What did you do/try? Did you move the data from your old /var to the new one? All we can tell from your question, is that http won't start...which doesn't give us alot to go on, to try to help.
yes first i create a partition then mount it to /mnt and copy all files and directories in /dev with cp -rvf to /mnt.Then unmount /mnt and add new line to /etc/fstab so that new partition can mount to /var.



Code:
[root@pc5 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             8.6G  4.0G  4.2G  49% /
tmpfs                  62M     0   62M   0% /dev/shm
/dev/hdd2             940M   75M  818M   9% /var
/dev/hda2             965M   25M  891M   3% /home
[root@pc5 ~]# ls /var
account  cvs    ftp    initctl  lock  nis   preserve  spool  yp
cache    db     games  lib      log   null  racoon    tmp
crash    empty  gdm    local    mail  opt   run       www
[root@pc5 ~]#


Code:
[root@pc5 log]# rpm -qa http*
httpd-2.2.3-6.el5
[root@pc5 log]# chkconfig --list httpd
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@pc5 log]# service httpd start
Starting httpd:                                            [FAILED]
[root@pc5 log]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [FAILED]
[root@pc5 log]# 



[root@pc5 ~]# tail -f /var/log/messages
Mar 31 17:56:50 pc5 Installed: httpd-devel.i386 2.2.3-6.el5
Mar 31 18:03:00 pc5 kernel: kjournald starting.  Commit interval 5 seconds
Mar 31 18:03:00 pc5 kernel: EXT3 FS on hdd2, internal journal
Mar 31 18:03:00 pc5 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Mar 31 18:03:30 pc5 kernel: kjournald starting.  Commit interval 5 seconds
Mar 31 18:03:30 pc5 kernel: EXT3 FS on hdd2, internal journal
Mar 31 18:03:30 pc5 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Mar 31 18:04:07 pc5 kernel: kjournald starting.  Commit interval 5 seconds
Mar 31 18:04:07 pc5 kernel: EXT3 FS on hdd2, internal journal
Mar 31 18:04:07 pc5 kernel: EXT3-fs: mounted filesystem with ordered data mode.

Last edited by eboy98; 04-01-2010 at 01:37 PM.
 
Old 04-01-2010, 03:35 PM   #4
eboy98
Member
 
Registered: Oct 2007
Distribution: RHEL5
Posts: 64

Original Poster
Rep: Reputation: 15
after enter service httpd start i found the following message at the end of file /var/log/dmesg

Code:
audit(1270153882.889:164): avc:  denied  { search } for  pid=2817 comm="httpd" name="/" dev=hdd2 ino=2 scontext=root:system_r:httpd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
audit(1270153882.889:165): avc:  denied  { search } for  pid=2817 comm="httpd" name="/" dev=hdd2 ino=2 scontext=root:system_r:httpd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
audit(1270153882.889:166): avc:  denied  { search } for  pid=2817 comm="httpd" name="/" dev=hdd2 ino=2 scontext=root:system_r:httpd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
audit(1270153882.901:167): avc:  denied  { search } for  pid=2817 comm="httpd" name="/" dev=hdd2 ino=2 scontext=root:system_r:httpd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
audit(1270153882.901:168): avc:  denied  { search } for  pid=2817 comm="httpd" name="/" dev=hdd2 ino=2 scontext=root:system_r:httpd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
 
Old 04-01-2010, 06:43 PM   #5
gumaheru
LQ Newbie
 
Registered: Nov 2009
Posts: 20

Rep: Reputation: 0
Try this run the command "httpd -t". What does it say? I do know that if you install apache without making any changes to paths that it will install the "www" directory under var. I believe that you broke this with either permissions or it is missing it altogether. The command above will run a check against the config and make sure that everything is correct especially the document root. If that says everything is okay, I would run strace again apache.

Let us know what you find.
 
Old 04-01-2010, 11:27 PM   #6
mweed
Member
 
Registered: Mar 2006
Posts: 33

Rep: Reputation: 17
Looks like a selinux problem. Not my strong area so I'm taking a guess.

Does the output on your system match:
Code:
$ ls -Z -d /var
drwxr-xr-x  root root system_u:object_r:var_t          /var
$ ls -Z -d /var/www
drwxr-xr-x  root root system_u:object_r:httpd_sys_content_t /var/www
 
Old 04-02-2010, 11:51 AM   #7
bnettles
LQ Newbie
 
Registered: Jul 2008
Posts: 4

Rep: Reputation: 0
http service failed to start

Why are you checking /var/log/messages. You should be checking /var/log/httpd

What do the apache logs say?
 
Old 04-02-2010, 11:58 AM   #8
gumaheru
LQ Newbie
 
Registered: Nov 2009
Posts: 20

Rep: Reputation: 0
I would say see what "httpd -t" says first. If you do believe it is selinux and you wan to check that first run "getenforce". Correct me if I am wrong but you can expect only three responses. First is "Enforcing". Second says "Permissive". This means that Selinux is install and running but will not manage security. It will log messages to the system log file. The third option is that you get an error "Command not found". That should indicate that it isn't installed. If it is installed you can

If it is enabled you can disable by using the command "setenforce 0". Use the "getenforce" and verify that it states "Permissive". Now setting it from the command line will only set until you reboot. You will have to edit "/etc/sysconfig/selinux", or use "system-config-securitylevel".

If you want to continue to use Selinux then you should find all the answers on the permissions that should be used by looking through the man pages of apache. You can find all of the man pages associated with apache by either using "man -k httpd" or "rpm -qd httpd".

Last edited by gumaheru; 04-02-2010 at 12:11 PM.
 
  


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
Inquiry:Problem in getting HTTP service hadimotamedi Linux - Newbie 1 09-14-2009 12:49 AM
http service problem syok Slackware 1 11-01-2007 07:15 PM
when i try to start samba pdc's smb service nmbd failed to start . sandeepchau123 Linux - Newbie 2 10-20-2007 01:59 PM
httpd start, Faild! htabesh Linux - Server 4 09-03-2007 08:16 AM
Not able to access http service curious_srk Linux - Software 5 11-30-2004 10:10 AM


All times are GMT -5. The time now is 07:57 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration