Apache 2 in 6.0 jails: Connection refused: connect to listener on 0.0.0.0:80

Philippe Lang philippe.lang at attiksystem.ch
Sun Jul 16 12:54:00 UTC 2006


I wrote:

>> Hi,
>> 
>> Every now and then, Apache 2.2.2 starts filling my httpd-error.log
>> with thousands of lines like: 
>> 
>> [Sat Jul 08 20:57:32 2006] [warn] (61)Connection refused:
>> connect to listener on 0.0.0.0:80 [Sat Jul 08 20:57:33 2006] [warn]
>> (61)Connection refused: connect to listener on 0.0.0.0:80 [Sat Jul 08
>> 20:57:34 2006] [warn] (61)Connection
>> refused: connect to listener on 0.0.0.0:80 [Sat Jul 08
>> 20:57:35 2006] [warn] (61)Connection refused: connect to listener on
>> 0.0.0.0:80 [Sat Jul 08 20:57:36 2006] [warn] (61)Connection refused:
>> connect to listener on 0.0.0.0:80 [Sat Jul 08 20:57:37 2006] [warn]
>> (61)Connection refused: connect to listener on 0.0.0.0:80 [Sat Jul
>> 08 20:57:38 2006] [warn] (61)Connection refused: connect to listener
>> on 0.0.0.0:80 [Sat Jul 08 20:57:39 2006] [warn] (61)Connection
>> refused: connect to listener on 0.0.0.0:80 [Sat Jul 08 20:57:40 2006]
>> [warn] (61)Connection refused: connect to listener on 0.0.0.0:80
>> 
>> I'm running Apache in FreeBSD 6.0 RELEASE-p2 jails.
>> 
>> Restarting Apache cures the problem for some time, until the problem
>> appears again. It is not that frequent, but the servers are not much
>> loaded either. 
>> 
>> I think I saw this problem appear with Apache 2.0, 2.1, and 2.2, so
>> it's apparently here for a while. And others had this problem
>> too:
>> 
>> http://groups.google.ch/group/lucky.freebsd.apache/browse_thre
>> ad/thread/7a5735ae7a3a4c2d/e2d0d9ba4ad7266e?lnk=st&q=Connectio
> n+refused%3A+connect+to+listener+on+0.0.0.0%3A80&rnum=1>
> &hl=de#e2d0d9ba4ad7266e
>> 
>> I'm pretty sure this problem must be BSD or Jails specific.
>> Does anyone have the same problem, or maybe a workaround?
>> Note that Lighttpd NEVER had this problem on this server.
> 
> One more precision: of course, when apache starts filling the
> log with "Connection refused: connect to listener on
> 0.0.0.0:80", the web server does not respond anymore, until I restart
> it. 

Hi again,

I did some further tests with Apache under FreeBSD 6.0 - Jail, and unfortunately, there is still the same annoying problem: suddenly the log starts being filled with hundreds of lines "Connection refused: connect to listener on 0.0.0.0:80", and Apache does not respond anymore.

I have a log example, that shows the Apache freeze:

--------------------------
[Sat Jul 15 14:25:36 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/adserver
[Sat Jul 15 14:25:37 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/phpAdsNew
[Sat Jul 15 14:25:37 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/phpadsnew
[Sat Jul 15 14:25:37 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/phpads
[Sat Jul 15 14:25:37 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/Ads
[Sat Jul 15 14:25:38 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/ads
[Sat Jul 15 14:25:38 2006] [error] [client 66.147.238.238] script
'/home/verticaldrape/www/data/xmlrpc.php' not found or unabl
e to stat
[Sat Jul 15 14:25:39 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/xmlrpc
[Sat Jul 15 14:25:39 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/xmlsrv
[Sat Jul 15 14:25:39 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/blog
[Sat Jul 15 14:25:39 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/drupal
[Sat Jul 15 14:25:40 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/community
[Sat Jul 15 14:25:40 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/blogs
[Sat Jul 15 14:25:40 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/blogs
[Sat Jul 15 14:25:40 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/blog
[Sat Jul 15 14:25:41 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/blogtest
[Sat Jul 15 14:25:41 2006] [error] [client 66.147.238.238] File does not exist:
/home/verticaldrape/www/data/b2
[Sat Jul 15 14:25:42 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sat Jul 15 14:25:43 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sat Jul 15 14:25:44 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sat Jul 15 14:25:45 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sat Jul 15 14:25:46 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sat Jul 15 14:25:47 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sat Jul 15 14:25:48 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sat Jul 15 14:25:49 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sat Jul 15 14:25:50 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sat Jul 15 14:25:51 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80

[snip]

[Sun Jul 16 04:50:10 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sun Jul 16 04:50:11 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sun Jul 16 04:50:12 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sun Jul 16 04:50:13 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sun Jul 16 04:50:14 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sun Jul 16 04:50:15 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sun Jul 16 04:50:16 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sun Jul 16 04:50:17 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sun Jul 16 04:50:18 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sun Jul 16 04:50:19 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sun Jul 16 04:50:20 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80
[Sun Jul 16 04:50:21 2006] [warn] (61)Connection refused: connect to listener on
0.0.0.0:80

--------------------------

The freeze appears apparently under high load, with about 4 connections a second from a robot.

I made 2 changes in httpd.conf the last days, which apparently did not help:

1. Commented out:
#LoadModule ssl_module libexec/apache22/mod_ssl.so

2. Added:
AcceptFilter http none


Does anyone have an idea where this problem might come from? I'm pretty sure it must be linked to the jail system in some way... Any chance things might be corrected in FreeBSD 6.1?

My jails are all configured like this:

jail_j29_hostname="j29.attiksystem.ch"
jail_j29_ip="83.222.129.29"
jail_j29_rootdir="/usr/jails/j29"
jail_j29_exec="/bin/sh /etc/rc"
jail_j29_devfs_enable="YES"

I'm using the network interface "em" driver.


Thanks for your help,

---------------
Philippe Lang
Attik System

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3125 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060716/2d5cf6fe/smime.bin


More information about the freebsd-questions mailing list