java.io.IOException: Only SOCKS5 supported

We get this in the error logs regularly, every few minutes.

The reason behind this is, that we have a load balancer (HAProxy), which periodically “pings” the file transfer port 7777, but appearently does not speak the SOCKS5 protocol.

The problem is that the log is full of this error, which makes log analysis hard.

Can you think of any reasonable way to either prevent this, or don’t log it, or don’t log the whole stacktrace, or log it to debug?

Maybe a better idea is to return a proper error code to the client as specified in RFC 1928 - SOCKS Protocol Version 5 instead of just closing the socket.

In this case we can remove the logging imo.

2015.12.12 01:59:27 org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager - Error processing file transfer proxy connection
java.io.IOException: Only SOCKS5 supported
    at org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager.processConnection(ProxyConnectionManager.java:158)
    at org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager.access$200(ProxyConnectionManager.java:57)
    at org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager$1$1.run(ProxyConnectionManager.java:127)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    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)