# Apache2 process running but cannot connect NO ERRORS

## Thrifty

Hi All,

I have just been following through the virtual mailhost how to and have installed Apache2, the problem is that it WILL NOT START.  When I "ps -ef |grep apac" I get:

root     10270     1  0 10:59 ?        00:00:00 /usr/sbin/apache2 -k start

but when I try and connect it eventually times out,  when I nmap the IP address it shows it running as well.

In the error log, all it shows is:

[Mon Nov 24 10:59:06 2003] [notice] Digest: generating secret for digest authentication ...

and nothing else.

Any ideas?

I read on another thread that the problem might be having incorrect hosts entries, but I checked and mine are correct being:

127.0.0.1       localhost

203.98.6.250    gw01.turbogroup.co.nz gw01

192.168.90.250  gw01.turbogroup.co.nz gw01

192.168.99.250  gw01.turbogroup.co.nz gw01

I am a bit stuck so it would be great for a few pointers.

----------

## ckdake

how are you starting apache?  init.d or manually?  if you are using one, try the other and see if you get any more output or any error messages.

----------

## Thrifty

It is being started through init.d

I tried it manually and here is the outout:

gw01 modules.d # /usr/sbin/apache2

gw01 modules.d # ps -ef|grep apa

root     11810     1  0 12:05 ?        00:00:00 /usr/sbin/apache2

root     11812 14784  0 12:05 pts/1    00:00:00 grep apa

It looks like it is going, just nothing can connect

----------

## Thrifty

Config file is as follows:

### /etc/apache2/conf/apache2.conf

### $Id: apache2.conf,v 1.3 2003/09/25 02:20:48 woodchip Exp $

###

### Main Configuration Section

### You really shouldn't change these settings unless you're a guru

###

ServerRoot /etc/apache2

ServerName gw01

#LockFile /etc/apache2/apache2.lock

PidFile /var/run/apache2.pid

ErrorLog logs/error_log

LogLevel warn

DocumentRoot /var/www/localhost/htdocs

### Dynamic Shared Object (DSO) Support

###

### You should always leave these three, as they are needed for normal use.

### mod_access (Order, Allow, etc..)

### mod_log_config (Transferlog, etc..)

### mod_mime (AddType, etc...)

###

LoadModule access_module                 modules/mod_access.so

LoadModule auth_module                   modules/mod_auth.so

LoadModule auth_anon_module              modules/mod_auth_anon.so

LoadModule auth_dbm_module               modules/mod_auth_dbm.so

LoadModule auth_digest_module            modules/mod_auth_digest.so

LoadModule include_module                modules/mod_include.so

LoadModule log_config_module             modules/mod_log_config.so

LoadModule env_module                    modules/mod_env.so

LoadModule mime_magic_module             modules/mod_mime_magic.so

LoadModule cern_meta_module              modules/mod_cern_meta.so

LoadModule expires_module                modules/mod_expires.so

LoadModule headers_module                modules/mod_headers.so

LoadModule usertrack_module              modules/mod_usertrack.so

LoadModule unique_id_module              modules/mod_unique_id.so

LoadModule setenvif_module               modules/mod_setenvif.so

LoadModule proxy_module                  modules/mod_proxy.so

LoadModule proxy_connect_module          modules/mod_proxy_connect.so

LoadModule proxy_ftp_module              modules/mod_proxy_ftp.so

LoadModule proxy_http_module             modules/mod_proxy_http.so

LoadModule mime_module                   modules/mod_mime.so

LoadModule status_module                 modules/mod_status.so

LoadModule autoindex_module              modules/mod_autoindex.so

LoadModule asis_module                   modules/mod_asis.so

LoadModule info_module                   modules/mod_info.so

LoadModule cgi_module                    modules/mod_cgi.so

LoadModule cgid_module                   modules/mod_cgid.so

LoadModule vhost_alias_module            modules/mod_vhost_alias.so

LoadModule negotiation_module            modules/mod_negotiation.so

LoadModule dir_module                    modules/mod_dir.so

LoadModule imap_module                   modules/mod_imap.so

LoadModule actions_module                modules/mod_actions.so

LoadModule speling_module                modules/mod_speling.so

LoadModule userdir_module                modules/mod_userdir.so

LoadModule alias_module                  modules/mod_alias.so

LoadModule rewrite_module                modules/mod_rewrite.so

###

### New Modules for 2.0 (some are experimental)

###

LoadModule file_cache_module             modules/mod_file_cache.so

LoadModule echo_module                   modules/mod_echo.so

LoadModule charset_lite_module           modules/mod_charset_lite.so

LoadModule cache_module                  modules/mod_cache.so

LoadModule disk_cache_module             modules/mod_disk_cache.so

LoadModule mem_cache_module              modules/mod_mem_cache.so

LoadModule ext_filter_module             modules/mod_ext_filter.so

LoadModule case_filter_module            modules/mod_case_filter.so

LoadModule case_filter_in_module         modules/mod_case_filter_in.so

LoadModule deflate_module                modules/mod_deflate.so

#LoadModule optional_hook_export_module   modules/mod_optional_hook_export.so

#LoadModule optional_hook_import_module   modules/mod_optional_hook_import.so

#LoadModule optional_fn_import_module     modules/mod_optional_fn_import.so

#LoadModule optional_fn_export_module     modules/mod_optional_fn_export.so

#LoadModule bucketeer_module              modules/mod_bucketeer.so

LoadModule logio_module                  modules/mod_logio.so

###

### Global Configuration

###

# Splitting up apache2.conf into two files makes it easier to support

# multiple configurations on the same serer.  In commonapache2.conf

# you keep directives that apply to all implementations and in this

# file you keep server-specific directives.  While we don't yet have

# multiple configurations out-of-the-box, this allows us to do that

# in the future easily.  (PERLPROXIED *ahem*)

#

# For Apache2 we load all conf files in conf/modules.d

Include conf/modules.d/*.conf

Include conf/commonapache2.conf

###

### IP Address/Port

###

#BindAddress *

Listen 80

###

### Log configuration Section

###

<IfModule mod_log_config.c>

#Single logfile with access, agent and referer information

#This is the default, if vlogs are not defined for the main server

CustomLog logs/access_log combined env=!VLOG

#If VLOG is defined in conf/vhosts/vhosts.conf, we use this entry

#CustomLog "|/usr/sbin/apache2splitlogfile" vhost env=VLOG

</IfModule>

###

### Virtual Hosts

###

# We include different templates for Virtual Hosting. Have a look in the

# vhosts directory and modify to suit your needs.

Include conf/vhosts/vhosts.conf

#Include conf/vhosts/dynamic-vhosts.conf

#Include conf/vhosts/virtual-homepages.conf

###

### Performance settings Section

###

#

# Timeout: The number of seconds before receives and sends time out.

#

Timeout 300

#

# KeepAlive: Whether or not to allow persistent connections (more than

# one request per connection). Set to "Off" to deactivate.

#

KeepAlive On

#

# MaxKeepAliveRequests: The maximum number of requests to allow

# during a persistent connection. Set to 0 to allow an unlimited amount.

# We recommend you leave this number high, for maximum performance.

#

MaxKeepAliveRequests 100

#

# KeepAliveTimeout: Number of seconds to wait for the next request from the

# same client on the same connection.

#

KeepAliveTimeout 15

# prefork MPM [THIS IS THE DEFAULT]

# StartServers: number of server processes to start

# MinSpareServers: minimum number of server processes which are kept spare

# MaxSpareServers: maximum number of server processes which are kept spare

# MaxClients: maximum number of server processes allowed to start

# MaxRequestsPerChild: maximum number of requests a server process serves

<IfModule prefork.c>

StartServers         5

MinSpareServers      5

MaxSpareServers     10

MaxClients         150

MaxRequestsPerChild  0

</IfModule>

# worker MPM

# StartServers: initial number of server processes to start

# MaxClients: maximum number of simultaneous client connections

# MinSpareThreads: minimum number of worker threads which are kept spare

# MaxSpareThreads: maximum number of worker threads which are kept spare

# ThreadsPerChild: constant number of worker threads in each server process

# MaxRequestsPerChild: maximum number of requests a server process serves

<IfModule worker.c>

StartServers         2

MaxClients         150

MinSpareThreads     25

MaxSpareThreads     75

ThreadsPerChild     25

MaxRequestsPerChild  0

</IfModule>

# perchild MPM

# NumServers: constant number of server processes

# StartThreads: initial number of worker threads in each server process

# MinSpareThreads: minimum number of worker threads which are kept spare

# MaxSpareThreads: maximum number of worker threads which are kept spare

# MaxThreadsPerChild: maximum number of worker threads in each server process

# MaxRequestsPerChild: maximum number of connections per server process

<IfModule perchild.c>

NumServers           5

StartThreads         5

MinSpareThreads      5

MaxSpareThreads     10

MaxThreadsPerChild  20

MaxRequestsPerChild  0

</IfModule>

----------

## ckdake

How much time are you giving apache to start before you kill it?  If i rememeber right, it takes a while to start up the first time.  Also, it should start child processes so you should have atleast a few other processes named apache if it successfully starts.  So give it a few minutes.  What is your CPU load when you are trying to start it?

----------

## Thrifty

The CPU load blips up a couple of percent, then nothing.

Machine is a 2.6Ghz P4 800fsb with 1GB Ram.

And I started it about an hour ago now, and still not working ;(

----------

## ckdake

it definitely shouldn't take that long.  does anything show up on you main system log when you try to start apache?

try this one:

```
#apache2ctl configtest
```

That will ensure that your config files are ok.

then try changing the loglevel to debug"

```
LogLevel debug
```

in /etc/apache2/conf/apache2.conf

and try starting up things again.  Then see what shows up in the logs.

----------

## professorn

Try to stop apache, you get any errors?

----------

## indros

If you're only getting that one line for apache, it's hanging up, and not forking properly. I recommend commenting out all APACHE2_OPTS, and try starting. Then if it works successfully, you need to add the opts one-by-one. And start and restart.

----------

## Thrifty

Professorn:  No, no errors but the process doesn't die.

I then just killall -9 apache2

----------

## professorn

I dont know but have a look at my thred: https://forums.gentoo.org/viewtopic.php?t=107826

----------

## Thrifty

After turning Debug on I am now getting:

[Tue Nov 25 09:09:27 2003] [info] mod_unique_id: using ip addr 203.98.6.250

[Tue Nov 25 09:09:28 2003] [notice] Digest: generating secret for digest authentication ...

in the error log, nothing in the /var/log/messages though.

----------

## ckdake

That is pretty weird indeed.  I think I may be out of ideas.  There is always reemerging the whole thing from scratch.

----------

## Thrifty

I have also tried unmerging it then re-emerging it and no difference.

----------

## ckdake

do you have -D SSL in /etc/conf.d/apache2?  Someone mentioned something about this above but I dont think you said anything in response to it so you might have missed it.

If so, did you redo the ssl stuff per the virtual/mailhost guide instructions?

If you did and it still doesnt work,  try unmerging it again, then

```
#locate apache
```

and delete everything it lists. 

Then emerge it again, and who knows.

----------

## Thrifty

That -D SSL

was in there but commented, I uncommented it but there was no difference.

It seems that a module or something is jamming the server as the web client can establish a socket connection but the server sends NOTHING at all.

Oh well, will try a locate and delete and see what happens.

----------

## Thrifty

WHAT THE F*&^

I restarted the machine as a last ditch attempt, then on reboot did a "service apache2 start" and it damn well worked.

I cannot beleive it!!!

I thought things like this only happened on Windows!

/me kicks self in head.

----------

## Thrifty

Thanks for all the help guys.

If you were in New Zealand I would shout you a 6pack of premium beer.

----------

## ckdake

Glad you finally got it working! note to self:  yes, linux does have to be restarted for reasons other than new mm-sources...

----------

## benc

I've got the *exact* same problem - let's try a reboot

----------

## benc

And it's resolved by a reboot? I did one earlier, but without apache being started by init. Now I had added apache2 to the startup list and it works - if anyone can explain this, please do  :Smile: 

----------

## UberLord

I had the same problem until I removed the auth_digest module like so

```
# LoadModule auth_digest_module modules/mod_auth_digest.so
```

----------

## professorn

It seems like i haven't compiled in "System V IPC" in the kernel, it's found in General Setup in menuconfig. Havn't tried my server but i got the same error at my workstation when i compiled 2.6-test11 from scrach

----------

## UberLord

 *professorn wrote:*   

> It seems like i haven't compiled in "System V IPC" in the kernel, it's found in General Setup in menuconfig. Havn't tried my server but i got the same error at my workstation when i compiled 2.6-test11 from scrach

 

Is this the correct thread? LOL   :Laughing: 

(I already have this in my kernel)

----------

## Hellfire

 *UberLord wrote:*   

> I had the same problem until I removed the auth_digest module like so
> 
> ```
> # LoadModule auth_digest_module modules/mod_auth_digest.so
> ```
> ...

 

Ditto.

I've installed various ebuilds of apache2 on a slew of machines with no problem. I only get this error when I'm using a Proliant 1600 smp box. Anyone else with the issue with similar hardware?

-h

----------

## professorn

UberLord, I must have made some more modifications in the kernel exept "System V IPC" coz I recompiled my kernel again on my server and now apache wont start, it may be MTRR or some other opition =/

----------

## rburcham

I have had the same problem with the digest module too.. on SMP sparc64 boxes.

I am betting this is an SMP thing.

If I comment out the module from the apache.conf, I am good to go.

----------

## Carbs

Hellfire,

I'm having the same problem and I am using the same hardware (Compaq Proliant 1600 SMP).

Commenting out the LoadModule worked for me also.

The problem only started happening when I upgraded to 2.6.0-test11 (previously 2.4.23), but atleast its all fixed now   :Very Happy: 

----------

## UberLord

 *Hellfire wrote:*   

>  *UberLord wrote:*   I had the same problem until I removed the auth_digest module like so
> 
> ```
> # LoadModule auth_digest_module modules/mod_auth_digest.so
> ```
> ...

 

Mine's a single VIA C3 Nehemiah so I doubt it's a SMP problem.

I'm using a 2.6.0-test11 kernel with NTPL. Maybe this is the problem?

Not that I need digest auth atm so it's not that much of a biggie for me.Last edited by UberLord on Mon Dec 15, 2003 11:04 am; edited 2 times in total

----------

## UberLord

 *professorn wrote:*   

> UberLord, I must have made some more modifications in the kernel exept "System V IPC" coz I recompiled my kernel again on my server and now apache wont start, it may be MTRR or some other opition =/

 

Well, you'll need to post the error message you get. I'm not a mind reader - yet   :Rolling Eyes: 

----------

## Peng

I've had exactly the same probs and its not MTTR or SMP. The reason for this ist that the digest generator doesn't get enough entropy from /dev/random. You can fix this by building apach with /dev/urandom as source of entropy:

```
MY_BUILTINS="--with-devrandom=/dev/urandom" emerge apache
```

This works for me.

Empty /dev/random can be filled by mouse or keyboard activity, but since my machine is a little server without either of them, and without that much disc-ativity (another source), this doesn't work for me.

I've seen a kernel-patch that gathers entropy from the network-devices, but thats probably not that good source.

----------

## apyh

i had the exact same problem, but am using a 2.4ghz p4.  using the 2.4.20-gentoo-r7 kernel.

----------

## flo44

Yes, i own an Proliant 800 smp (2x 200mhz pentium pro) and get the same error, bt no solution

----------

## Peng

Look at https://bugs.gentoo.org/show_bug.cgi?id=37039 for possible solutions.

----------

## falcon7493

 *Hellfire wrote:*   

>  *UberLord wrote:*   I had the same problem until I removed the auth_digest module like so
> 
> ```
> # LoadModule auth_digest_module modules/mod_auth_digest.so
> ```
> ...

 

Yep.  Proliant 5500 SMP.  And commenting out auth_digest_module resolved the problem.

----------

## Crimson Rider

I am having excatly the same problem, with a twist.

Somteimes it works, and sometimes it doesn't. It's driving my absolutly insane. I am building a box to replace an old server. The old server ran Apache1 and virtual hosts, this new box should do the same with Apache2.

Now whenever I restart apache2 it either works or doesn't. I have restart a whole bunch of times and then it suddenly works. This is not supposed to happen on Linux, it is supposed to happen on windows.

In short. This freaks my out, for te record, I run it on  AMD Athlon 700, kernel 2.6, anyone got some chiptruth on this.

----------

