View previous topic :: View next topic |
Author |
Message |
jcampbell n00b
Joined: 24 Sep 2005 Posts: 40
|
Posted: Sun Sep 25, 2005 4:13 am Post subject: Apache hangs |
|
|
This is strange... I start apache and it works. I restart it and get this:
Code: | tiger ~ # /etc/init.d/apache2 start
* Starting apache2 ... [ ok ]
tiger ~ # /etc/init.d/apache2 stop
* Stopping apache2 ...
httpd (no pid file) not running [ ok ]
tiger ~ # /etc/init.d/apache2 start
* Starting apache2 ...
(98)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs
tiger ~ # /etc/init.d/apache2 zap
* Manually resetting apache2 to stopped state.
tiger ~ # killall -s SIGKILL apache2
tiger ~ # |
The apache server stays running even after the init script dies. There is no apache.pid in /var/run but the process continues to run. Best part is that no matter how many times I start apache after the initial failure, the server hangs when I try to browse any sites that it hosts. The only way I've been able to fix it is to reboot.
I don't recall ever having this problem before...
Last edited by jcampbell on Sun Sep 25, 2005 5:31 am; edited 1 time in total |
|
Back to top |
|
|
jcampbell n00b
Joined: 24 Sep 2005 Posts: 40
|
Posted: Sun Sep 25, 2005 4:50 am Post subject: |
|
|
okay... more info... viewing apache's error_log:
Code: | [Sun Sep 25 01:16:39 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Sun Sep 25 01:16:39 2005] [notice] Digest: generating secret for digest authentication ... |
I commented out this line in httpd.conf:
Code: | LoadModule auth_digest_module modules/mod_auth_digest.so |
and it cured the problem. It's okay for a work-around, but why is this causing apache to hang?
Apparently, this has been an issue before? It's a different apache version... I have 2.0.54-r31
https://forums.gentoo.org/viewtopic-t-151105-highlight-authdigestmodule.html |
|
Back to top |
|
|
gbpack n00b
Joined: 11 Oct 2004 Posts: 8
|
Posted: Sun Sep 25, 2005 7:03 am Post subject: |
|
|
I'm still having this exact problem. I tried the workaround but that didn't work either. I posted this in IRC a little while ago but no one replied. If anyone has any ideas .... it would be greatly appreciated. |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Sun Sep 25, 2005 8:19 am Post subject: |
|
|
I had the same problem with Apache 1.3.x some years back, but I can't remember if I ever fixed it (in any other way than not using the mod_auth_digest).
Anyway, maybe this problem could be a classic "kernel runs out of entropy" problem? If your server runs mostly idle and mod_auth_digest gets its digest data from /dev/random, it could be that kernel is unable to generate random data fast enough. Check that with command cat /proc/sys/kernel/random/entropy_avail -- if it's 0, then your server has temporarily run out of entropy.
In that case you may emerge rng-tools and run rngd, which generates some less perfect entropy. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
gbpack n00b
Joined: 11 Oct 2004 Posts: 8
|
Posted: Sun Sep 25, 2005 3:25 pm Post subject: |
|
|
cat /proc/sys/kernel/random/entropy_avail says 4096. |
|
Back to top |
|
|
gbpack n00b
Joined: 11 Oct 2004 Posts: 8
|
Posted: Sun Sep 25, 2005 5:04 pm Post subject: |
|
|
installed rng-tools and started it up. Tried starting apache2 again and it still doesn't put a pid file in /var/run. Apache says it started ok, but my home page won't load. Error log says:
[Sun Sep 25 11:31:05 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Sun Sep 25 11:31:07 2005] [notice] Digest: generating secret for digest authentication ...
[Sun Sep 25 11:31:07 2005] [notice] Digest: done
I have no idea what to do? |
|
Back to top |
|
|
Troy n00b
Joined: 27 May 2003 Posts: 23 Location: Oklahoma
|
Posted: Mon Sep 26, 2005 4:46 am Post subject: |
|
|
It's not just you. Since the update, I can't restart apache I have no entropy and no physical access to the system to create entropy. I'd used MY_BUILTINS="--with-devrandom=/dev/urandom" emerge apache in the past to fix this. It's not fixing it this time. I added urandom to my USE flags as suggested by the apr-0.9.6 ebuild, rebuilt APR and apache2 with no success. Not good... _________________ And the glory of the LORD shall be revealed, and all flesh shall see it together: for the mouth of the LORD hath spoken it.
Isaiah 40.5 |
|
Back to top |
|
|
taiger Tux's lil' helper
Joined: 25 Nov 2003 Posts: 112
|
Posted: Mon Sep 26, 2005 6:35 pm Post subject: |
|
|
I have the same problem
I have temporaly cammented:
modules/mod_auth_digest.so
|
|
Back to top |
|
|
chrismear n00b
Joined: 11 Jul 2005 Posts: 12 Location: London, England
|
Posted: Sat Oct 01, 2005 9:17 am Post subject: |
|
|
This might be some help. On one of my servers, it generates the secret instantly, so I never noticed this problem. But on another server, it takes about two minutes to generate the secret. Once it's done that, though, apache runs perfectly:
[Sat Oct 01 10:00:36 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Sat Oct 01 10:00:36 2005] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 01 10:02:33 2005] [notice] Digest: done
[Sat Oct 01 10:02:34 2005] [notice] Apache configured -- resuming normal operations
I don't know how to make it work faster, but in the meantime I'm happy just to wait for a couple of minutes while it sorts itself out. |
|
Back to top |
|
|
Taily Tux's lil' helper
Joined: 19 Jun 2004 Posts: 115
|
Posted: Fri Oct 07, 2005 9:20 pm Post subject: |
|
|
Well for me the apache server would just "hang" at
Code: | [Sat Oct 08 00:12:27 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Sat Oct 08 00:12:28 2005] [notice] Digest: generating secret for digest authentication ... |
However when you did /etc/init.d/apache2 stop.. the server would actually not die, it finnishes loading itself and is alive :/
This was all due to an error in apache configuration. I suggest running apache2 -k stop after you've started it and see if it reports some error. |
|
Back to top |
|
|
j-m Retired Dev
Joined: 31 Oct 2004 Posts: 975
|
Posted: Fri Oct 07, 2005 10:10 pm Post subject: |
|
|
Quote: | emerge sys-apps/clrngd |
|
|
Back to top |
|
|
bytelab n00b
Joined: 29 Sep 2003 Posts: 14 Location: Sweden
|
Posted: Tue Nov 08, 2005 12:07 pm Post subject: |
|
|
I have the same problem but after a little testing I found it to be an entropy issue.
Thanks guys for a very informative thread _________________ AMD Athlon 64 4000+
2048 meg MEMORY
Asus Radeon x800xt PE
2x80 GB (raid 0)
Gentoo Linux 2005.1 + Win XP Home |
|
Back to top |
|
|
TJNII l33t
Joined: 09 Nov 2003 Posts: 648 Location: for(;;);
|
Posted: Wed Nov 09, 2005 2:22 am Post subject: |
|
|
Wow. I never knew a computer could run out of entropy.
Code: |
PrISUm2 / # ps -ec | grep apache
25393 TS 14 ? 00:00:00 apache2
PrISUm2 / # emerge -s I_Like_Pudding
Searching...
[ Results for search key : I_Like_Pudding ]
[ Applications found : 0 ]
PrISUm2 / # ps -ec | grep apache
25393 TS 23 ? 00:00:00 apache2
25482 TS 21 ? 00:00:00 apache2
25484 TS 20 ? 00:00:00 apache2
25485 TS 19 ? 00:00:00 apache2
25486 TS 18 ? 00:00:00 apache2
25487 TS 17 ? 00:00:00 apache2
25488 TS 15 ? 00:00:00 apache2
PrISUm2 / #
|
|
|
Back to top |
|
|
ohcnetwork n00b
Joined: 27 Dec 2005 Posts: 2
|
Posted: Tue Dec 27, 2005 7:50 am Post subject: |
|
|
Hi, I know that this is not RHE or Apache forum, but after I spent many hours searching for a solution to my problem, I only found a few places that discuss the problem, and this seems to be one place that I can ask about the problem and its possible solution, so I'm posting here. Hope it's ok ...
I am having a similar problem, and Apache2 installed on my server hangs. Apache2 is installed on RHE and it happens periodically. I tried to find causes, but the reason why I'm posting here is that I see the following error message in my error log file (and this is mentioned in this thread):
Code: |
[Fri Dec 23 01:00:30 2005] [notice] Digest: generating secret for digest authentication ...
[Fri Dec 23 01:00:30 2005] [notice] Digest: done
|
I see the notice recorded number of times although this is not exactly when Apache2 hangs. My questions are as follows:
Q1. Does the notice indicate that Apache2 can hang periodically?
Q2. If so, does commenting out modules/mod_auth_digest.so resolve the problem (temporarily)?
Q2.2. What does modules/mod_auth_digest.so really do and do I need it?
Q3. A couple of people mention about entropy in this thread, but what is it (my apology if this is such a trivial question)?
Q4. If entropy is really the problem on my system, how do I know if it's really the case?
Q5. If it is the case, how can I fix it? _________________ Current Health News Mental Health Problems
Recumbent Exercise Bikes |
|
Back to top |
|
|
ocbMaurice Tux's lil' helper
Joined: 14 Feb 2003 Posts: 90 Location: Switzerland
|
Posted: Tue Dec 27, 2005 3:19 pm Post subject: |
|
|
Your Problem is not likely related to the entropy pool. The problem with the entropy pool is the automatic generation of the secret for mod_auth_digest. To create a new secret (cypher key) it needs some (real) random data which is taken from the entropy pool. If the entropy pool is empty, the generation will take a long time. But in your case the generation was done in a very short time. |
|
Back to top |
|
|
ohcnetwork n00b
Joined: 27 Dec 2005 Posts: 2
|
Posted: Tue Dec 27, 2005 6:46 pm Post subject: |
|
|
ocbMaurice wrote: | Your Problem is not likely related to the entropy pool. The problem with the entropy pool is the automatic generation of the secret for mod_auth_digest. To create a new secret (cypher key) it needs some (real) random data which is taken from the entropy pool. If the entropy pool is empty, the generation will take a long time. But in your case the generation was done in a very short time. |
... then what is causing Apache (on my server) to hang? _________________ Current Health News Mental Health Problems
Recumbent Exercise Bikes |
|
Back to top |
|
|
mizery de aria Guru
Joined: 07 Dec 2003 Posts: 309
|
Posted: Wed Feb 15, 2006 12:34 am Post subject: |
|
|
*bump*
having this problem too... _________________ Do not repIy to or othErwise communicate with me if you use religious, spiritual or similar terminologies or references in your typings. |
|
Back to top |
|
|
pirus3210 n00b
Joined: 02 Mar 2006 Posts: 19
|
Posted: Fri Mar 03, 2006 1:43 pm Post subject: |
|
|
i had the same problem.. Apache2 wouldnt start.
Try
#ps aux
if you can see apache there do this
#pkill -KILL apache
then try restarting |
|
Back to top |
|
|
LL0rd l33t
Joined: 24 May 2004 Posts: 652 Location: Schlundcity
|
Posted: Sat Mar 04, 2006 11:38 am Post subject: |
|
|
Hi,
I have exactly the same problem.
Code: | [Fri Dec 23 01:00:30 2005] [notice] Digest: generating secret for digest authentication ...
[Fri Dec 23 01:00:30 2005] [notice] Digest: done |
That problem appears, when I try to restart apache with the restart command. You can do everything you want, you can't get apache up. But if I restart apache with stop and then start, apache runs without problems. To solve the problem with hanging apache, I restarted the whole OS, after that, I could start apache with the start command.
Thats a realy strange behavior, it's like...... windows _________________ Alte Mathematiker sterben nicht - sie verlieren nur einige ihrer Funktionen. |
|
Back to top |
|
|
Bash[DevNull] Guru
Joined: 10 Oct 2003 Posts: 333
|
Posted: Wed Mar 08, 2006 11:13 pm Post subject: |
|
|
I've removed "LoadModule auth_digest_module modules/mod_auth_digest.so" line from config,
BUT it's not HELP me because on restart/start apache2 freezes (50-200sec) on reading from /dev/random!!!
Why? I have no other digest modules.... _________________ Biomechanical Artificial Sabotage Humanoid
Last edited by Bash[DevNull] on Thu Mar 09, 2006 4:45 am; edited 1 time in total |
|
Back to top |
|
|
LL0rd l33t
Joined: 24 May 2004 Posts: 652 Location: Schlundcity
|
Posted: Wed Mar 08, 2006 11:21 pm Post subject: |
|
|
okay, I don't realy know, what the error realy is, but I had restarted my apache webserver. After the restart I had just one apache process. Then me and my girlfriend hat a little bit fun After about half an hour I was back and apache was running _________________ Alte Mathematiker sterben nicht - sie verlieren nur einige ihrer Funktionen. |
|
Back to top |
|
|
maverick6664 Guru
Joined: 13 May 2005 Posts: 413 Location: Tokyo / Japan
|
Posted: Fri Mar 24, 2006 1:57 pm Post subject: |
|
|
Thanks all. Having the same problem I found this thread today, and finally found tapping the keyboard (not on a remote console, but on the "real" console w/o X Window) seemed to help. Maybe moving the mouse or other factors will also help.
The value of /proc/sys/kernel/random/entropy_avail on my http server is often low (around or below 100) and this value actually affects the freezing time period. My kernel is generic 2.6.16.
EDIT: Running X Server doesn't seem to matter at all. Keyboard and mouse always affect much. Moving mouse is the most efficient in my case. _________________ Tetsuji Rai
a.k.a. Lukiest in the world |
|
Back to top |
|
|
eltech Guru
Joined: 05 Nov 2002 Posts: 582 Location: New York
|
Posted: Thu Apr 13, 2006 7:24 pm Post subject: |
|
|
j-m wrote: | Quote: | emerge sys-apps/clrngd |
| This did work for me today as i ran into this problem .. and i just ran clrngd and the problem has been fixed, but will this run again on its own if and when centropy memory runs out ?
how can i prevent such happening>? |
|
Back to top |
|
|
okuhl n00b
Joined: 09 Apr 2003 Posts: 22
|
Posted: Mon Apr 24, 2006 2:11 pm Post subject: Solution for me |
|
|
Hi,
this worked for me, too:
Code: | # cat /proc/sys/kernel/random/entropy_avail
0
# emerge -a clrngd
# /etc/init.d/clrngd start
# cat /proc/sys/kernel/random/entropy_avail
256
# /etc/init.d/apache2 start
|
Regards,
Oliver. |
|
Back to top |
|
|
soth Apprentice
Joined: 12 Sep 2003 Posts: 207
|
|
Back to top |
|
|
|