[ 
https://issues.apache.org/jira/browse/DIRMINA-1174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Florian Hof updated DIRMINA-1174:
---------------------------------
    Description: 
After a connection using the default SFTP client, I get lot's of WARN logs like 
the following: 
{{handleUnknownRequest(ClientConnectionService[ClientSessionImpl[x...@sftp-intern.xxx.com/xx.xx.xx.xx:993]])
 unknown global request: keepal...@proftpd.org}}

It seems that the server send keep-alive messages to the client. The 
{{[KeepAliveHandler|https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/server/global/KeepAliveHandler.java]}}
 handles this properly. It is per default in the server handlers. I propose to 
add it per default in the client handlers. This shouldn't have negative effect, 
should it? Adding it afterwards avoids the WARN logs. 

Implementation on 
{{[ClientBuilder.DEFAULT_GLOBAL_REQUEST_HANDLERS|https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/client/ClientBuilder.java#L69-L70]}}
 would be trivial:
{code:java}
    public static final List<RequestHandler<ConnectionService>> 
DEFAULT_GLOBAL_REQUEST_HANDLERS
            = List.of(OpenSshHostKeysHandler.INSTANCE, 
KeepAliveHandler.INSTANCE);
 {code}
(and eventually move the {{KeepAliveHandler}} from 
{{org.apache.sshd.server.global}} to {{org.apache.sshd.common.global}}).

  was:
After a connection using the default SFTP client, I get lot's of WARN logs like 
the following: 
{{handleUnknownRequest(ClientConnectionService[ClientSessionImpl[x...@sftp-intern.xxx.com/xx.xx.xx.xx:993]])
 unknown global request: keepal...@proftpd.org}}

It seems that the server send keep-alive messages to the client. The 
{{[KeepAliveHandler|https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/server/global/KeepAliveHandler.java]}}
 handles this properly. It is per default in the server handlers. I propose to 
add it per default in the client handlers. This shouldn't have negative effect, 
should it? Adding it afterwards avoids the WARN logs. 

Implementation on 
[ClientBuilder.DEFAULT_GLOBAL_REQUEST_HANDLERS|https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/client/ClientBuilder.java#L69-L70]
 would be trivial:
{code:java}
    public static final List<RequestHandler<ConnectionService>> 
DEFAULT_GLOBAL_REQUEST_HANDLERS
            = List.of(OpenSshHostKeysHandler.INSTANCE, 
KeepAliveHandler.INSTANCE);
 {code}


> keep-alive handler on client
> ----------------------------
>
>                 Key: DIRMINA-1174
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1174
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Florian Hof
>            Priority: Minor
>
> After a connection using the default SFTP client, I get lot's of WARN logs 
> like the following: 
> {{handleUnknownRequest(ClientConnectionService[ClientSessionImpl[x...@sftp-intern.xxx.com/xx.xx.xx.xx:993]])
>  unknown global request: keepal...@proftpd.org}}
> It seems that the server send keep-alive messages to the client. The 
> {{[KeepAliveHandler|https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/server/global/KeepAliveHandler.java]}}
>  handles this properly. It is per default in the server handlers. I propose 
> to add it per default in the client handlers. This shouldn't have negative 
> effect, should it? Adding it afterwards avoids the WARN logs. 
> Implementation on 
> {{[ClientBuilder.DEFAULT_GLOBAL_REQUEST_HANDLERS|https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/client/ClientBuilder.java#L69-L70]}}
>  would be trivial:
> {code:java}
>     public static final List<RequestHandler<ConnectionService>> 
> DEFAULT_GLOBAL_REQUEST_HANDLERS
>             = List.of(OpenSshHostKeysHandler.INSTANCE, 
> KeepAliveHandler.INSTANCE);
>  {code}
> (and eventually move the {{KeepAliveHandler}} from 
> {{org.apache.sshd.server.global}} to {{org.apache.sshd.common.global}}).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to