haproxy的send-proxy记录源IP

yangshx 发布于 2017/06/15 14:09
阅读 611
收藏 0

大家好, 我在listen中配置了server s1 192.168.1.10:9900 send-proxy check,内网服务是TCP服务,在客户端访问时的确能收到proxy包。但是HA的自动check也会发proxy包,并且HA会主动断连,会导致服务端频繁报错。报错信息如下,有那位大神可以帮助解答下,谢谢!

2017-06-15 14:11:10,338 INFO  [NioProcessor-6] logging.LoggingFilter (LoggingFilter.java:186) - CREATED
2017-06-15 14:11:10,338 DEBUG [NioProcessor-6] executor.OrderedThreadPoolExecutor (OrderedThreadPoolExecutor.java:432) - Adding event SESSION_OPENED to session 25
Queue : [SESSION_OPENED, ]

2017-06-15 14:11:10,339 DEBUG [pool-3-thread-12] filterchain.IoFilterEvent (IoFilterEvent.java:68) - Firing a SESSION_OPENED event for session 25
2017-06-15 14:11:10,340 INFO  [pool-3-thread-12] logging.LoggingFilter (LoggingFilter.java:186) - OPENED
2017-06-15 14:11:10,339 DEBUG [NioProcessor-6] executor.OrderedThreadPoolExecutor (OrderedThreadPoolExecutor.java:432) - Adding event EXCEPTION_CAUGHT to session 25
Queue : [EXCEPTION_CAUGHT, ]

2017-06-15 14:11:10,340 INFO  [pool-3-thread-12] sendproxy.ServerSessionHandler (ServerSessionHandler.java:20) - [sessionOpened] sessionId=25, IP = /10.24.29.199:34010
2017-06-15 14:11:10,341 DEBUG [pool-3-thread-12] filterchain.IoFilterEvent (IoFilterEvent.java:117) - Event SESSION_OPENED has been fired for session 25
2017-06-15 14:11:10,341 DEBUG [NioProcessor-6] executor.OrderedThreadPoolExecutor (OrderedThreadPoolExecutor.java:432) - Adding event SESSION_CLOSED to session 25
Queue : [EXCEPTION_CAUGHT, , SESSION_CLOSED, ]

2017-06-15 14:11:10,341 DEBUG [pool-3-thread-12] filterchain.IoFilterEvent (IoFilterEvent.java:68) - Firing a EXCEPTION_CAUGHT event for session 25
2017-06-15 14:11:10,342 WARN  [pool-3-thread-12] logging.LoggingFilter (LoggingFilter.java:130) - EXCEPTION :
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:197)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:384)
        at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:317)
        at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:45)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:683)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:659)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:648)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1120)
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
2017-06-15 14:11:10,342 ERROR [pool-3-thread-12] sendproxy.ServerSessionHandler (ServerSessionHandler.java:55) - server exception caught, client is (0x00000019: nio socket, server, null => 0.0.0.0/0.0.0.0:9900), cause -> java.io.IOException: Connection reset by peer

加载中
返回顶部
顶部