Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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.
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
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...
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
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.
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]
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
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] ...
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.