LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-16-2014, 03:35 PM   #1
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Rep: Reputation: 15
HTTPD stop running


Hi,

After trying to upgrade to httpd 2.2.3-83, my system stop running and I am getting the following.

Code:
# /etc/rc.d/init.d/httpd start
Starting httpd: httpd: Syntax error on line 196 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_file_cache.so into server: /etc/httpd/modules/mod_file_cache.so: cannot open shared object file: No such file or directory
                                                           [FAILED]
apparently the module "mod_file_cache.so" doesn't exist.
I edited the httpd.conf and I commented these lines and it worked but I am getting errors on the server.

Code:
[root@localhost superale]# uname -a
Linux localhost.localdomain 2.6.18-371.8.1.el5 #1 SMP Thu Apr 24 18:23:07 EDT 2014 i686 athlon i386 GNU/Linux
I want to try to uninstall httpd but how start?

can someone help me to solve this problem ?
 
Old 05-16-2014, 06:06 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Quote:
I edited the httpd.conf and I commented these lines and it worked but I am getting errors on the server.
You forgot to post the errors so there is not much anyone can tell you.
 
Old 05-16-2014, 06:21 PM   #3
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
mod_file_cache caches a list of statically configured files via MMapFile or CacheFile directives in the main server configuration.


I have a funny feeling I know what error message they are getting.......

You probably need to grep out the "MmapFile" and the "CacheFile" directives in the server conf and try again

Last edited by dijetlo; 05-16-2014 at 06:23 PM.
 
Old 05-17-2014, 01:27 AM   #4
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dijetlo View Post

I have a funny feeling I know what error message they are getting.......

You probably need to grep out the "MmapFile" and the "CacheFile" directives in the server conf and try again
but how can I do it?, how can I fix it?
 
Old 05-17-2014, 02:30 AM   #5
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
but how can I do it?, how can I fix it?
We're not at the stage where I can tell you how to fix it. I'm still not sure I know what's wrong with it because, thus far, you haven't done the thing Yancek asked you to do...

Quote:
You forgot to post the errors so there is not much anyone can tell you.
He is following established protocol for diagnosing server errors. I probably should have kept my mouth shut however you represented yourself as a web server admin so I thought the link to the documentation for the Apache module you unloaded and the direct reference to the directives in the main conf file controlling which files should be cached (by the module you unloaded) might be enough help to get you to read the documentation and come back with "it's the orphaned directives, thanks guys I got it" or "it's not the orphaned directives, here's my server errors" or perhaps a request for clarification regarding the rather dense language our friends at Apache tend to employ. I would have gladly welcomed any of those responses however what I got was...
Quote:
but how can I do it?, how can I fix it?
Didn't you already ask me that and didn't I provide you a link to the manual that explains what you did wrong and how to fix it? Did you read the thing I took the time to find for you? Did you do the thing that Yancek asked you to do? No? Hmmm.....and here you are again, huh?

You probably need to think a little about that....

Last edited by dijetlo; 05-17-2014 at 05:03 AM. Reason: Microsoftisms creeping into technical discussions...
 
Old 05-17-2014, 10:20 AM   #6
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dijetlo View Post
We're not at the stage where I can tell you how to fix it. I'm still not sure I know what's wrong with it because, thus far, you haven't done the thing Yancek asked you to do...



He is following established protocol for diagnosing server errors. I probably should have kept my mouth shut however you represented yourself as a web server admin so I thought the link to the documentation for the Apache module you unloaded and the direct reference to the directives in the main conf file controlling which files should be cached (by the module you unloaded) might be enough help to get you to read the documentation and come back with "it's the orphaned directives, thanks guys I got it" or "it's not the orphaned directives, here's my server errors" or perhaps a request for clarification regarding the rather dense language our friends at Apache tend to employ. I would have gladly welcomed any of those responses however what I got was...

Didn't you already ask me that and didn't I provide you a link to the manual that explains what you did wrong and how to fix it? Did you read the thing I took the time to find for you? Did you do the thing that Yancek asked you to do? No? Hmmm.....and here you are again, huh?

You probably need to think a little about that....
Thank you for your comments I really appreciate but is easy copy and paste some info that you think is probability the solution, I researched already online and that's why I am posting here, to try to get some other solutions to get out of this issue.

Quote:
Originally Posted by dijetlo View Post
We're not at the stage where I can tell you how to fix it. I'm still not sure I know what's wrong with it because, thus far, you haven't done the thing Yancek asked you to do...
I think the main issue that I have is the httpd is not running and giving this error that I already posted here
Code:
# /etc/rc.d/init.d/httpd start
Starting httpd: httpd: Syntax error on line 196 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_file_cache.so into server: /etc/httpd/modules/mod_file_cache.so: cannot open shared object file: No such file or directory  [FAILED]
and I said; "apparently the module "mod_file_cache.so" doesn't exist."

Now, I tried to solve this issue just commenting the line 196 on httpd.conf and the server started worked but does weird acting when I use php or mysql, is NOT exactly an errors. I found out that is because the server not cache.
I have lost the files "mod_file_cache.so" and "mod_mem_cache.so"

I just want to get some solution from people here that really know, how can I fix this issue, trying to replace the httpd version that I have or finding the files that I lost.
 
Old 05-17-2014, 10:24 AM   #7
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by yancek View Post
You forgot to post the errors so there is not much anyone can tell you.
Code:
# /etc/rc.d/init.d/httpd start
Starting httpd: httpd: Syntax error on line 196 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_file_cache.so 
into server: /etc/httpd/modules/mod_file_cache.so: cannot open shared object file: No such file or directory
[FAILED]
 
Old 05-17-2014, 10:33 AM   #8
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Original Poster
Rep: Reputation: 15
This is my uname -a
Code:
Linux localhost.localdomain 2.6.18-371.8.1.el5 #1 SMP Thu Apr 24 18:23:07 EDT 2014 i686 athlon i386 GNU/Linux
II am trying this command
#yum whatprovides mod_cache.so
and I having this error
Code:
# yum whatprovides mod_cache.so
Loaded plugins: fastestmirror, security
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30977)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 157, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 187, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 665, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 240, in _getConfig
    self._conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 805, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 878, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed
any sugesstion
 
Old 05-17-2014, 12:59 PM   #9
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Fix yum
OR
Build the module from source
OR
Locate your missing module
OR
Locate the module directives in your server conf file

From the link I supplied you
Quote:
The MMapFile directive of mod_file_cache maps a list of statically configured files into memory through the system call mmap()...Syntax: MMapFile file-path [file-path] ...
Code:
grep -in mmapfile /path/to/server/conf/file/on/your/system/*.conf > roadmap
Same Source
Quote:
When the file is requested, the server retrieves the handle from the cache and passes it to the sendfile()...Syntax CacheFile file-path [file-path]
Code:
grep -in cachefile /path/to/server/conf/file/on/your/system/*.conf >> roadmap
Open roadmap
Go to the line in your server conf file listed next to each entry
Check to see if it's a mod_cache_file directive. If it is, comment it out. Keep in mind the file entrys may be a list so it might not be enough to just comment out the line with the module directive on it. You'll have to get all the files as well.
Save the conf file.
Restart the server
Look at the error log.

BTW, I think when Yancek was asking you to post any errors, he meant from the server log. Some possible locations of that log are
Slackware/RHEL / Red Hat / CentOS / Fedora Linux Apache error file location - /var/log/httpd/error_log
Debian / Ubuntu Linux Apache error log file location - /var/log/apache2/error.log
FreeBSD Apache error log file location - /var/log/httpd-error.log

Which path do you want to follow ?

Last edited by dijetlo; 05-17-2014 at 03:24 PM. Reason: Accuracy and completeness
 
Old 05-17-2014, 02:00 PM   #10
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
I fix errors in order they appear, in too many cases the first error is causing all others. I'd fix the syntax error on line 196 first.
 
Old 05-17-2014, 02:16 PM   #11
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
I researched already online
I know you did.
Did you find anything useful?
No?
I did, (not actually "found" it, I knew it was there, I've RTFM'd, many, many times) I already knew there were probably mmap and cache directives in the server.conf that no longer referenced a working module. I knew lines the apached can't parse generate errors (in the error.log) and generally abhorrent behavior on the part of the server, but they don't (often) stop a demon from spawning.
Missing modules do, however.
I was trying to help you learn that.


edit: I'm not at all angry at you alejandroye, if I was I'd stop responding. I could've been nicer though and for that, I apologize, but you need to realize, if you're really going to administer a web server, you need to learn how to fix problems like this. That's why I pointed you to that particular manual page. I'd hoped you'd realize what every web admin already knows. Most problems can be solved by reading the manual.
Problems like this come up all the time. It's what web admins do for a living. If you don't want to learn to administer the server, why don't you host it? It's free on the internet and then you wont have these issues.

Last edited by dijetlo; 05-17-2014 at 03:29 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
Service httpd auto stop AppleH Linux - Server 3 04-24-2011 02:01 AM
how to set httpd to stop automically when reboot in my server?? ansarynaga Linux - Server 5 10-15-2010 11:38 AM
Cannot stop httpd , named, proftpd etc.. !! ximpda Linux - Server 4 04-12-2009 10:44 AM
problem with kolab installation - can't stop httpd meczo Linux - Server 4 08-05-2008 09:19 AM
Powercut made httpd stop working. Gramphos Linux - Software 3 11-01-2003 08:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:47 PM.

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