Hi Guys,
I'm trying out relayd here and first of all, filicitation to PYR and
the community for their work on this piece of software. This is my
first time install and while trying it out, I came on to an issue, I
keep on getting "tcp_write: connect timed out" when relayd checks the
hosts table. I searched the entire net for a solution and the only
solution I found is that a good timeout could solve the issue (rather
than a patch that is wrong said by the man himself PYR), I just ran
out of luck I tried in every possible way to change the config of this
it's just not working, on the webserver side I'm not even seing an
attempt to connect, this is weird for me. I know I'm doing something
wrong here but I don't see it, I greatly appreciate if anyone
encountered this problem to share a bit of info with me.
This is the message I'm getting when I try to connect to the
loadbalancer on port 80:
"relay httpproxy, session 1 (1 active), 0, 192.168.4.22 -> :80, session
failed"
This is the full debug of relayd with -d -vv :
--
startup
relay_privinit: adding relay httpproxy
protocol 0: name httpfilter
flags: 0x20004
type: tcp
request change "Keep-Alive" to "$TIMEOUT"
request append "$REMOTE_ADDR" to "X-Forwarded-For"
relay_init: max open files 3520
adding 2 hosts from table web_hosts:80
relay_launch: running relay httpproxy
init_filter: filter init done
init_tables: created 0 tables
relay_init: max open files 3520
adding 2 hosts from table web_hosts:80
relay_launch: running relay httpproxy
relay_init: max open files 3520
adding 2 hosts from table web_hosts:80
relay_launch: running relay httpproxy
relay_init: max open files 3520
adding 2 hosts from table web_hosts:80
relay_launch: running relay httpproxy
relay_init: max open files 3520
adding 2 hosts from table web_hosts:80
relay_launch: running relay httpproxy
tcp_write: connect timed out
hce_notify_done: 192.168.4.78 (tcp_write: connect failed)
host 192.168.4.78, check http code (18ms), state unknown -> down,
availability 0.00%
tcp_write: connect timed out
hce_notify_done: 192.168.4.76 (tcp_write: connect failed)
host 192.168.4.76, check http code (19ms), state unknown -> down,
availability 0.00%
pfe_dispatch_imsg: state -1 for host 3 192.168.4.78
pfe_dispatch_imsg: state -1 for host 2 192.168.4.76
tcp_write: connect timed out
relay httpproxy, session 1 (1 active), 0, 192.168.4.22 -> :80, session failed
hce_notify_done: 192.168.4.78 (tcp_write: connect failed)
tcp_write: connect timed out
hce_notify_done: 192.168.4.76 (tcp_write: connect failed)
--
Running OpenBSD 4.3
Here is my relayd.conf :
--
relayd_addr="127.0.0.1"
relayd_port="8080"
web_port="80"
table <web_hosts> { 192.168.4.78, 192.168.4.76 }
interval 10
timeout 1000
prefork 5
log updates
http protocol "httpfilter" {
return error
header append "$REMOTE_ADDR" to "X-Forwarded-For"
header change "Keep-Alive" to "$TIMEOUT"
}
relay httpproxy {
listen on $relayd_addr port $relayd_port
protocol "httpfilter"
forward to <web_hosts> port $web_port mode loadbalance check http
"/" code 200
}
--
Here is my pf.conf:
--
int_if="vic0"
rdr-anchor "relayd/*"
rdr pass on $int_if proto tcp to port http -> 127.0.0.1 port 8080
--
Thanks for the help guys.
Sincerely,
Uday