[ https://issues.apache.org/jira/browse/SSHD-838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16565509#comment-16565509 ]
Goldstein Lyor commented on SSHD-838: ------------------------------------- {quote} This message happens when a remote user Ctrl+C's a process (typically a git clone or git fetch, in our case) "early" enough to terminate the connection before the handshake completes. {quote} But that is a *client* side event - how can the *server* distinguish between such (let's say) "acceptable" incomplete handshakes from "unacceptable" ones. If there indeed is a problem and we always log it as DEBUG level, we might never know about "unacceptable" handshakes... {quote} Is there any way we can work together to adjust this logging so that it's not so "strong", for lack of a better term, when it's most likely nothing but a client disconnecting early? {quote} Perhaps a possible solution is do define some "events" that can be signalled via a {{ConnectionEventListener}} before the session is established and let the user decide how to log them - e.g., connection requested, connection established, connection accepted, connection terminated + reason (OK or exception), etc.... For backward compatibility, if no event listener is registered then the code will just log the event as it currently does (i.e., WARNING + stack trace)... Once the session is established, all events associated with it should be signalled via the {{SessionListener}}. In this context, please see if there are other such exceptions/warnings that are signalled via logging and could potentially be signalled via either the {{ConnectionEventListener}} or the {{SessionListener}}. What do you think ... ? > Lower the log level in Nio2Acceptor.AcceptCompletionHandler#okToReaccept > ------------------------------------------------------------------------ > > Key: SSHD-838 > URL: https://issues.apache.org/jira/browse/SSHD-838 > Project: MINA SSHD > Issue Type: Improvement > Affects Versions: 2.0.0 > Reporter: jpalacios > Priority: Minor > Attachments: sshd-nio-acceptor-logging.patch > > > As discussed in [SSHD-833|https://issues.apache.org/jira/browse/SSHD-833], it > appears that when a client disconnects before the handshake completes there's > some pretty loud logging coming from the > {{Nio2Acceptor.AcceptCompletionHandler#okToReaccept}}. > The entire message is logged at {{WARN}} level. Also, several lines from the > stack trace are logged individually at the same level. > We feel this much logging at {{WARN}} level will be too much noise for system > administrators who might think there's something wrong with the system. We > propose: > # Changing the log level to {{DEBUG}} / {{FINE}} > # Logging the stacktrace in a single message -- This message was sent by Atlassian JIRA (v7.6.3#76005)