Undertow load balancer not working: "Cannot send advertise message."
cmich Aug 11, 2016 5:38 AMHello,
I use WildFly 10 and I try to load balance two backend servers with Undertow. I adapted Stuart Douglas' tuto to fit my project settings.
However, I can't make it work.
I have these errors:
ERROR [io.undertow.client] (MSC service thread 1-2) UT005026: Jetty ALPN support not found on boot class path, SPDY client will not be available.
ERROR [io.undertow.client] (MSC service thread 1-2) UT005026: Jetty ALPN support not found on boot class path, HTTP2 client will not be available.
Then each 10s, the load balancer server says :
ERROR [io.undertow] (default I/O-3) UT005041: Cannot send advertise message. Address: /224.0.1.105:0: java.net.SocketException: Invalid argument
at sun.nio.ch.DatagramChannelImpl.send0(Native Method)
at sun.nio.ch.DatagramChannelImpl.sendFromNativeBuffer(DatagramChannelImpl.java:521)
at sun.nio.ch.DatagramChannelImpl.send(DatagramChannelImpl.java:498)
at sun.nio.ch.DatagramChannelImpl.send(DatagramChannelImpl.java:462)
at org.xnio.nio.NioUdpChannel.sendTo(NioUdpChannel.java:136)
at io.undertow.server.handlers.proxy.mod_cluster.MCMPAdvertiseTask.run(MCMPAdvertiseTask.java:177)
at org.xnio.nio.WorkerThread$RepeatKey.run(WorkerThread.java:659)
at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:580)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:464)
(Is it related to the ALPN error?)
And the backend servers say:
DEBUG [io.undertow.request.io] (default I/O-4) Error reading request: java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at org.xnio.nio.NioSocketConduit.read(NioSocketConduit.java:282)
at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:152)
at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:130)
at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:56)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:559)
I don't find how to fix it.
Thank you in advance for your help.
PS: My host is dockerized.