LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   HTTPD stop running (https://www.linuxquestions.org/questions/linux-server-73/httpd-stop-running-4175505242/)

alejandroye 05-16-2014 03:35 PM

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 ?

yancek 05-16-2014 06:06 PM

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.

dijetlo 05-16-2014 06:21 PM

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

alejandroye 05-17-2014 01:27 AM

Quote:

Originally Posted by dijetlo (Post 5172388)

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?

dijetlo 05-17-2014 02:30 AM

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....

alejandroye 05-17-2014 10:20 AM

Quote:

Originally Posted by dijetlo (Post 5172524)
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 (Post 5172524)
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.

alejandroye 05-17-2014 10:24 AM

Quote:

Originally Posted by yancek (Post 5172378)
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]


alejandroye 05-17-2014 10:33 AM

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

dijetlo 05-17-2014 12:59 PM

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 ?

Emerson 05-17-2014 02:00 PM

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.

dijetlo 05-17-2014 02:16 PM

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.


All times are GMT -5. The time now is 10:23 AM.