On Wed, Feb 27, 2008 at 06:28:40PM +0100, Pierre-Yves Ritschard wrote:
> Please try with an insanely high value (10seconds) and see if you still
> get a connection timeout message.
>
> To make logging more meaningful you can try with this diff and send me
> the relayd -dv output:
I can't set timeout to 10s (complains of "global timeout exceeds
interval".
Here are the results with your diff:
# obj/relayd -dv -f /root/relayd.conf
startup
init_filter: filter init done
tcp_write: connect timed out
relay_privinit: adding relay www
init_tables: created 0 tables
hce_notify_done: dd.ee.ff.209 (tcp_write: connect timed out)
protocol 0: name http
host dd.ee.ff.209, check http code (2ms), state unknown -> down, availability
0.00%
flags: 0x0004
tcp_write: connect timed out
type: hce_notify_done: dd.ee.ff.211 (tcp_write: connect timed out)
http
host dd.ee.ff.211, check http code (3ms), state unknown -> down, availability
0.00%
pfe_dispatch_imsg: state -1 for host 3 dd.ee.ff.209
request pfe_dispatch_imsg: state -1 for host 2 dd.ee.ff.211
append "$SERVER_ADDR:$SERVER_PORT" to "X-Forwarded-By"
request append "$REMOTE_ADDR" to "X-Forwarded-For"
relay_init: max open files 1024
relay_init: max open files 1024
relay_init: max open files 1024
relay_init: max open files 1024
relay_init: max open files 1024
adding 2 hosts from table webhosts:80
adding 2 hosts from table webhosts:80
adding 2 hosts from table webhosts:80
adding 2 hosts from table webhosts:80
adding 2 hosts from table webhosts:80
relay_launch: running relay www
relay_launch: running relay www
relay_launch: running relay www
relay_launch: running relay www
relay_launch: running relay www
tcp_write: connect timed out
hce_notify_done: dd.ee.ff.209 (tcp_write: connect timed out)
tcp_write: connect timed out
hce_notify_done: dd.ee.ff.211 (tcp_write: connect timed out)
^Chost check engine exiting
kill_tables: deleted 0 tables
flush_rulesets: flushed rules
pf update engine exiting
socket relay engine exiting
socket relay engine exiting
socket relay engine exiting
socket relay engine exiting
socket relay engine exiting
terminating
The configuration file I'm using:
# cat /root/relayd.conf
ext_addr="aa.bb.cc.114"
webhost1="dd.ee.ff.209"
webhost2="dd.ee.ff.211"
timeout 9999
table <webhosts> { $webhost1 $webhost2 }
http protocol http {
header append "$REMOTE_ADDR" to "X-Forwarded-For"
header append "$SERVER_ADDR:$SERVER_PORT" to "X-Forwarded-By"
tcp { nodelay, sack, socket buffer 65536, backlog 128 }
}
relay www {
listen on $ext_addr port 80
protocol http
forward to <webhosts> port http mode loadbalance \
check http "/" host www.mysite.com code 200
}
Ben