https://kotlinlang.org logo
#http4k
Title
# http4k
a

andyg

01/29/2020, 3:17 AM
Probably not http4k but... I built a JAR file using http4k w/embedded Undertow server. Deployed it behind an HAProxy load balancer. Currently just 1 instance, no SSL, just testing the connection. Works, but getting
[XNIO-1 task-12] DEBUG <http://io.undertow.request.io|io.undertow.request.io> - UT005013: An IOException occurred
<http://java.net|java.net>.SocketException: Connection reset
immediately after every request. Have tried various HAProxy options but cannot fix.
d

dave

01/29/2020, 4:09 AM
Sorry - think you are right and it's a prob with the proxy config. If you you hit the service directly I presume it works ok from curl?
a

andyg

01/29/2020, 4:42 AM
Yes, a direct connection (bypassing HAProxy) works correctly without error.
j

James Richardson

01/29/2020, 7:13 PM
My guess is your packets are going to different places. A packet that arrives at a place that isn't expecting it will generate a RST
Poorly configured firewalls, or firewalls with connections that are idle for long periods can also cause this problem
@andyg did this help?
a

andyg

02/06/2020, 7:43 AM
@James Richardson not really, tbh. I swapped HAProxy with Caddy, everything works and as a bonus, I get auto-renewed LetsEncrypt
2 Views