On Wed, Feb 27, 2008 at 11:53:03AM +0100, Pierre-Yves Ritschard wrote: > Your fix is wrong, you run in a timeout which happens because the > default relayd configuration supposes you are in the same broadcast > domain than your relayed host and has a 200ms timeout.
While my relay server isn't in the same broadcast domain as my backend servers, there is on average 2ms rtt between the systems. Average response time from the HTTP servers is about 300ms. > The error reporting is a bit confusing and should just mention that a > timeout occured, I will fix that. The gettimeofday you used indeed > fixed your issue but is really wrong since it modifies the value you > specify in the configuration file. > > A simple fix for you would be to specify: > > timeout 1000 # (or any appropriate timeout value for your application) > > in your configuration file. I hate to say this Pierre-Yves, but this occurs even with a timeout of 5000ms in my configuration file. The *very* same system, polling the *very same* hosts with hoststated does not have this problem. > > > startup > > > init_filter: filter init done > > > tcp_write: connect timed out > > > relay_privinit: adding relay www > > > init_tables: created 0 tables > > > hce_notify_done: aa.bb.cc.209 (tcp_write: connect failed) > > > protocol 0: name http > > > host aa.bb.cc.209, check http code (3ms), state unknown -> down, > > > availability 0.00% > > > flags: 0x0004 > > > tcp_write: connect timed out > > The timeout is mentionned here. # grep timeout /root/relayd.conf timeout 5000 > > > > type: hce_notify_done: aa.bb.cc.211 (tcp_write: connect > > > failed) http > > And then a connect failed error happens which might have confused you. If you look here, the connect succeeds.. The initial SYN: 11:07:56.249025 aa.bb.cc.140.43847 > dd.ee.ff.209.80: S [tcp sum ok] 1292907170:1292907170(0) win 16384 <mss 1460,nop,nop,sackOK,nop,wscale 0,nop,nop,timestamp 3626625731 0> (DF) (ttl 64, id 10238, len 64) The SYN/ACK: 11:07:56.250782 dd.ee.ff.209.80 > aa.bb.cc.140.43847: S [tcp sum ok] 394683021:394683021(0) ack 1292907171 win 5792 <mss 1460,sackOK,timestamp 1366160992 3626625731,nop,wscale 2> (DF) (ttl 54, id 0, len 60) The RST (by the host initiating the session in the first place): 11:07:56.250814 aa.bb.cc.140.43847 > dd.ee.ff.209.80: R [tcp sum ok] 1292907171:1292907171(0) win 0 (DF) (ttl 64, id 17473, len 40) Ben

