Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Apache hangs

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
27 posts
  • 1
  • 2
  • Next
Author
Message
jcampbell
n00b
n00b
User avatar
Posts: 40
Joined: Sat Sep 24, 2005 8:04 pm

Apache hangs

  • Quote

Post by jcampbell » Sun Sep 25, 2005 4:13 am

This is strange... I start apache and it works. I restart it and get this:

Code: Select all

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.
Top
jcampbell
n00b
n00b
User avatar
Posts: 40
Joined: Sat Sep 24, 2005 8:04 pm

  • Quote

Post by jcampbell » Sun Sep 25, 2005 4:50 am

okay... more info... viewing apache's error_log:

Code: Select all

[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: Select all

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
http://forums.gentoo.org/viewtopic-t-15 ... odule.html
Top
gbpack
n00b
n00b
Posts: 8
Joined: Mon Oct 11, 2004 5:44 pm

  • Quote

Post by gbpack » Sun Sep 25, 2005 7:03 am

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.
Top
Janne Pikkarainen
Veteran
Veteran
User avatar
Posts: 1143
Joined: Tue Jul 29, 2003 6:36 pm
Location: Helsinki, Finland
Contact:
Contact Janne Pikkarainen
Website

  • Quote

Post by Janne Pikkarainen » Sun Sep 25, 2005 8:19 am

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.".
Top
gbpack
n00b
n00b
Posts: 8
Joined: Mon Oct 11, 2004 5:44 pm

  • Quote

Post by gbpack » Sun Sep 25, 2005 3:25 pm

cat /proc/sys/kernel/random/entropy_avail says 4096.
Top
gbpack
n00b
n00b
Posts: 8
Joined: Mon Oct 11, 2004 5:44 pm

  • Quote

Post by gbpack » Sun Sep 25, 2005 5:04 pm

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?
Top
Troy
n00b
n00b
Posts: 23
Joined: Tue May 27, 2003 4:38 pm
Location: Oklahoma
Contact:
Contact Troy
Website

  • Quote

Post by Troy » Mon Sep 26, 2005 4:46 am

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
Top
taiger
Tux's lil' helper
Tux's lil' helper
Posts: 112
Joined: Tue Nov 25, 2003 9:36 am

  • Quote

Post by taiger » Mon Sep 26, 2005 6:35 pm

I have the same problem

I have temporaly cammented:

modules/mod_auth_digest.so


:?:
Top
chrismear
n00b
n00b
User avatar
Posts: 12
Joined: Mon Jul 11, 2005 2:43 pm
Location: London, England
Contact:
Contact chrismear
Website

  • Quote

Post by chrismear » Sat Oct 01, 2005 9:17 am

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.
Top
Taily
Tux's lil' helper
Tux's lil' helper
Posts: 115
Joined: Sat Jun 19, 2004 3:32 pm

  • Quote

Post by Taily » Fri Oct 07, 2005 9:20 pm

Well for me the apache server would just "hang" at

Code: Select all

[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.
Top
j-m
Retired Dev
Retired Dev
Posts: 975
Joined: Sun Oct 31, 2004 3:54 pm

  • Quote

Post by j-m » Fri Oct 07, 2005 10:10 pm

emerge sys-apps/clrngd
:idea:
Top
bytelab
n00b
n00b
Posts: 14
Joined: Mon Sep 29, 2003 8:42 am
Location: Sweden

  • Quote

Post by bytelab » Tue Nov 08, 2005 12:07 pm

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
Top
TJNII
l33t
l33t
User avatar
Posts: 648
Joined: Sun Nov 09, 2003 3:16 am
Location: for(;;);

  • Quote

Post by TJNII » Wed Nov 09, 2005 2:22 am

Wow. I never knew a computer could run out of entropy. :P

Code: Select all

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 / # 
Top
ohcnetwork
n00b
n00b
Posts: 2
Joined: Tue Dec 27, 2005 7:39 am

  • Quote

Post by ohcnetwork » Tue Dec 27, 2005 7:50 am

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: Select all

[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
Top
ocbMaurice
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 91
Joined: Fri Feb 14, 2003 2:32 pm
Location: Switzerland

  • Quote

Post by ocbMaurice » Tue Dec 27, 2005 3:19 pm

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.
Top
ohcnetwork
n00b
n00b
Posts: 2
Joined: Tue Dec 27, 2005 7:39 am

  • Quote

Post by ohcnetwork » Tue Dec 27, 2005 6:46 pm

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
Top
mizery de aria
Guru
Guru
Posts: 309
Joined: Sun Dec 07, 2003 9:23 am

  • Quote

Post by mizery de aria » Wed Feb 15, 2006 12:34 am

*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.
Top
pirus3210
n00b
n00b
Posts: 19
Joined: Thu Mar 02, 2006 7:35 pm

  • Quote

Post by pirus3210 » Fri Mar 03, 2006 1:43 pm

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
Top
LL0rd
l33t
l33t
User avatar
Posts: 652
Joined: Mon May 24, 2004 4:29 pm
Location: Schlundcity

  • Quote

Post by LL0rd » Sat Mar 04, 2006 11:38 am

Hi,

I have exactly the same problem.

Code: Select all

[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.
Top
Bash[DevNull]
Guru
Guru
User avatar
Posts: 333
Joined: Fri Oct 10, 2003 2:52 pm

  • Quote

Post by Bash[DevNull] » Wed Mar 08, 2006 11:13 pm

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....
Last edited by Bash[DevNull] on Thu Mar 09, 2006 4:45 am, edited 1 time in total.
Biomechanical Artificial Sabotage Humanoid
Top
LL0rd
l33t
l33t
User avatar
Posts: 652
Joined: Mon May 24, 2004 4:29 pm
Location: Schlundcity

  • Quote

Post by LL0rd » Wed Mar 08, 2006 11:21 pm

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 :D 8) :D After about half an hour I was back and apache was running
Alte Mathematiker sterben nicht - sie verlieren nur einige ihrer Funktionen.
Top
maverick6664
Guru
Guru
Posts: 413
Joined: Fri May 13, 2005 7:20 pm
Location: Tokyo / Japan
Contact:
Contact maverick6664
Website

  • Quote

Post by maverick6664 » Fri Mar 24, 2006 1:57 pm

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
Top
eltech
Guru
Guru
User avatar
Posts: 582
Joined: Tue Nov 05, 2002 11:21 pm
Location: New York

  • Quote

Post by eltech » Thu Apr 13, 2006 7:24 pm

j-m wrote:
emerge sys-apps/clrngd
:idea:
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>?
Top
okuhl
n00b
n00b
Posts: 22
Joined: Wed Apr 09, 2003 11:49 am

Solution for me

  • Quote

Post by okuhl » Mon Apr 24, 2006 2:11 pm

Hi,

this worked for me, too:


Code: Select all

# 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.
Top
soth
Apprentice
Apprentice
User avatar
Posts: 207
Joined: Fri Sep 12, 2003 12:27 am

  • Quote

Post by soth » Wed Jul 26, 2006 7:51 am

yay! No more problems for me!
- Never argue with an idiot. They just drag you down to your level and beat you with experience.

Join the adopt an unanswered post initiative today
Top
Post Reply

27 posts
  • 1
  • 2
  • Next

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic