2

I have IPVS configured as:

$ ipvsadm --save
-A -t localhost:<port> -s rr
-a -t localhost:<port> -r <other_hostname>:<port> -m -w 1

It seems to be running:

$ ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  localhost:<port> rr
  -> <other_hostname>:<port>         Masq    1      1          0

but that 1 'ActiveConn' hangs indefinitely, while a direct request responds quickly and as expected:

$ curl https://<other_hostname>:<port>
<response>
$ curl https://localhost:<port>
[hangs]

Nothing seems wrong in dmesg:

$ dmesg | grep IPVS
[ 4795.060820] IPVS: Registered protocols (TCP, UDP, SCTP, AH, ESP)
[ 4795.060932] IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
[ 4795.061202] IPVS: ipvs loaded.
[ 4795.067663] IPVS: [rr] scheduler registered.

And nothing in journalctl from ipvsadm.

It seems to get stuck in state SYN_RECV:

$ ipvsadm -lnc
IPVS connection entries
pro expire state       source             virtual            destination
TCP 00:56  SYN_RECV    127.0.0.1:58322    127.0.0.1:<port>   <other_ip>:<port>

It seems that it isn't a configuration issue with the real server, since it's an issue with all modes (route, masquerade, tunnel) and testing with httpbin.org rather than my own.


What can cause a request to an IPVS to hang or fail when the 'real server'(s) underlying it respond OK, and how can it be debugged?

OJFord
  • 151

0 Answers0