You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by DUTERTRY Nicolas <Ni...@soprahr.com> on 2021/06/29 07:36:58 UTC

SSH session not properly closed by Karaf

Hi,

After using < client > script, the tcp socket is not closed by karaf (4.3.2) and remains in CLOSE_WAIT state. The session is only closed after ssh timeout is reached.

For instance with a SSH timeout set to 30 s :

$ ./client "bundle:list"

$ netstat | grep 8101
tcp6       0      0 localhost:8101          localhost:47844         CLOSE_WAIT

$ tail karaf.log
INFO  | sshd-SshServer[2f716f77](port=8101)-nio2-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Session karaf@/127.0.0.1:47844 authenticated
INFO  | sshd-SshServer[2f716f77](port=8101)-timer-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Disconnecting(ServerSessionImpl[karaf@/127.0.0.1:47844]): SSH2_DISCONNECT_PROTOCOL_ERROR - Detected IdleTimeout after 30415/30000 ms.

Do you have a fix for this issue ?

Regards,
--
Nicolas Dutertry
Sopra HR Software - http://www.soprahr.com/



C2 - Usage restreint

Re: SSH session not properly closed by Karaf

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Thanks to you !

I will work on release preparation/Jira.

Regards
JB

> Le 29 juin 2021 à 10:32, DUTERTRY Nicolas <Ni...@soprahr.com> a écrit :
> 
> https://issues.apache.org/jira/browse/KARAF-7190 <https://issues.apache.org/jira/browse/KARAF-7190>
>  
> Thanks JB !
> --
> Nicolas Dutertry
>  
>  
> C2 – Usage restreint
> De : Jean-Baptiste Onofre <jb...@nanthrax.net> 
> Envoyé : mardi 29 juin 2021 10:17
> À : user <us...@karaf.apache.org>
> Objet : Re: SSH session not properly closed by Karaf
>  
> Oh, really. Then, I think I know the issue: it’s probably the SSHD stream handler.
>  
> Can you please create a Jira about that ? I will fix that for 4.3.3/4.2.12.
>  
> Thanks !
>  
> Regards
> JB
>  
> 
> Le 29 juin 2021 à 10:14, DUTERTRY Nicolas <Nicolas.Dutertry@soprahr.com <ma...@soprahr.com>> a écrit :
>  
> No, the issue is the same.
>  
> --
> Nicolas Dutertry
>  
>  
> C2 – Usage restreint
> De : Jean-Baptiste Onofre <jb@nanthrax.net <ma...@nanthrax.net>> 
> Envoyé : mardi 29 juin 2021 09:53
> À : user <user@karaf.apache.org <ma...@karaf.apache.org>>
> Objet : Re: SSH session not properly closed by Karaf
>  
> Hi,
>  
> I guess the connexion is cleanly closed when you do:
>  
> $ bin/client
> And then CTRL-D 
>  
> Right ?
>  
> Regards
> JB
>  
> 
> Le 29 juin 2021 à 09:36, DUTERTRY Nicolas <Nicolas.Dutertry@soprahr.com <ma...@soprahr.com>> a écrit :
>  
> Hi,
>  
> After using « client » script, the tcp socket is not closed by karaf (4.3.2) and remains in CLOSE_WAIT state. The session is only closed after ssh timeout is reached.
>  
> For instance with a SSH timeout set to 30 s :
>  
> $ ./client “bundle:list”
>  
> $ netstat | grep 8101
> tcp6       0      0 localhost:8101          localhost:47844         CLOSE_WAIT
>  
> $ tail karaf.log
> INFO  | sshd-SshServer[2f716f77](port=8101)-nio2-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Session karaf@/127.0.0.1:47844 <mailto:karaf@/127.0.0.1:47844> authenticated
> INFO  | sshd-SshServer[2f716f77](port=8101)-timer-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Disconnecting(ServerSessionImpl[karaf@/127.0.0.1:47844]): SSH2_DISCONNECT_PROTOCOL_ERROR - Detected IdleTimeout after 30415/30000 ms.
>  
> Do you have a fix for this issue ?
>  
> Regards,
> --
> Nicolas Dutertry
> Sopra HR Software - http://www.soprahr.com/ <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.soprahr.com%2F&data=04%7C01%7CNicolas.Dutertry%40soprahr.com%7C9e854f8f41d946def40c08d93ad64673%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637605514297762233%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=BU%2FJ%2BAilM22esUc007gSQq2leVNf62zfanofYtOTyvc%3D&reserved=0>
>  
>  
> C2 – Usage restreint


RE: SSH session not properly closed by Karaf

Posted by DUTERTRY Nicolas <Ni...@soprahr.com>.
https://issues.apache.org/jira/browse/KARAF-7190

Thanks JB !
--
Nicolas Dutertry



C2 - Usage restreint
De : Jean-Baptiste Onofre <jb...@nanthrax.net>
Envoyé : mardi 29 juin 2021 10:17
À : user <us...@karaf.apache.org>
Objet : Re: SSH session not properly closed by Karaf

Oh, really. Then, I think I know the issue: it's probably the SSHD stream handler.

Can you please create a Jira about that ? I will fix that for 4.3.3/4.2.12.

Thanks !

Regards
JB

Le 29 juin 2021 à 10:14, DUTERTRY Nicolas <Ni...@soprahr.com>> a écrit :

No, the issue is the same.

--
Nicolas Dutertry


C2 - Usage restreint
De : Jean-Baptiste Onofre <jb...@nanthrax.net>>
Envoyé : mardi 29 juin 2021 09:53
À : user <us...@karaf.apache.org>>
Objet : Re: SSH session not properly closed by Karaf

Hi,

I guess the connexion is cleanly closed when you do:

$ bin/client
And then CTRL-D

Right ?

Regards
JB

Le 29 juin 2021 à 09:36, DUTERTRY Nicolas <Ni...@soprahr.com>> a écrit :

Hi,

After using « client » script, the tcp socket is not closed by karaf (4.3.2) and remains in CLOSE_WAIT state. The session is only closed after ssh timeout is reached.

For instance with a SSH timeout set to 30 s :

$ ./client "bundle:list"

$ netstat | grep 8101
tcp6       0      0 localhost:8101          localhost:47844         CLOSE_WAIT

$ tail karaf.log
INFO  | sshd-SshServer[2f716f77](port=8101)-nio2-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Session karaf@/127.0.0.1:47844<mailto:karaf@/127.0.0.1:47844> authenticated
INFO  | sshd-SshServer[2f716f77](port=8101)-timer-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Disconnecting(ServerSessionImpl[karaf@/127.0.0.1:47844]): SSH2_DISCONNECT_PROTOCOL_ERROR - Detected IdleTimeout after 30415/30000 ms.

Do you have a fix for this issue ?

Regards,
--
Nicolas Dutertry
Sopra HR Software - http://www.soprahr.com/<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.soprahr.com%2F&data=04%7C01%7CNicolas.Dutertry%40soprahr.com%7C9e854f8f41d946def40c08d93ad64673%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637605514297762233%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=BU%2FJ%2BAilM22esUc007gSQq2leVNf62zfanofYtOTyvc%3D&reserved=0>


C2 - Usage restreint


Re: SSH session not properly closed by Karaf

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Oh, really. Then, I think I know the issue: it’s probably the SSHD stream handler.

Can you please create a Jira about that ? I will fix that for 4.3.3/4.2.12.

Thanks !

Regards
JB

> Le 29 juin 2021 à 10:14, DUTERTRY Nicolas <Ni...@soprahr.com> a écrit :
> 
> No, the issue is the same.
>  
> --
> Nicolas Dutertry
>  
>  
> C2 – Usage restreint
> De : Jean-Baptiste Onofre <jb...@nanthrax.net> 
> Envoyé : mardi 29 juin 2021 09:53
> À : user <us...@karaf.apache.org>
> Objet : Re: SSH session not properly closed by Karaf
>  
> Hi,
>  
> I guess the connexion is cleanly closed when you do:
>  
> $ bin/client
> And then CTRL-D 
>  
> Right ?
>  
> Regards
> JB
>  
> 
> Le 29 juin 2021 à 09:36, DUTERTRY Nicolas <Nicolas.Dutertry@soprahr.com <ma...@soprahr.com>> a écrit :
>  
> Hi,
>  
> After using « client » script, the tcp socket is not closed by karaf (4.3.2) and remains in CLOSE_WAIT state. The session is only closed after ssh timeout is reached.
>  
> For instance with a SSH timeout set to 30 s :
>  
> $ ./client “bundle:list”
>  
> $ netstat | grep 8101
> tcp6       0      0 localhost:8101          localhost:47844         CLOSE_WAIT
>  
> $ tail karaf.log
> INFO  | sshd-SshServer[2f716f77](port=8101)-nio2-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Session karaf@/127.0.0.1:47844 <mailto:karaf@/127.0.0.1:47844> authenticated
> INFO  | sshd-SshServer[2f716f77](port=8101)-timer-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Disconnecting(ServerSessionImpl[karaf@/127.0.0.1:47844]): SSH2_DISCONNECT_PROTOCOL_ERROR - Detected IdleTimeout after 30415/30000 ms.
>  
> Do you have a fix for this issue ?
>  
> Regards,
> --
> Nicolas Dutertry
> Sopra HR Software - http://www.soprahr.com/ <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.soprahr.com%2F&data=04%7C01%7CNicolas.Dutertry%40soprahr.com%7C7713128dbc2a4140e2d908d93ad2e8fb%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637605500396813837%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TAwbcmU%2BBeC6i562OVXe3kyooDE5T9215gSfmR2g7r0%3D&reserved=0>
>  
>  
> C2 – Usage restreint


RE: SSH session not properly closed by Karaf

Posted by DUTERTRY Nicolas <Ni...@soprahr.com>.
No, the issue is the same.

--
Nicolas Dutertry



C2 - Usage restreint
De : Jean-Baptiste Onofre <jb...@nanthrax.net>
Envoyé : mardi 29 juin 2021 09:53
À : user <us...@karaf.apache.org>
Objet : Re: SSH session not properly closed by Karaf

Hi,

I guess the connexion is cleanly closed when you do:

$ bin/client
And then CTRL-D

Right ?

Regards
JB

Le 29 juin 2021 à 09:36, DUTERTRY Nicolas <Ni...@soprahr.com>> a écrit :

Hi,

After using « client » script, the tcp socket is not closed by karaf (4.3.2) and remains in CLOSE_WAIT state. The session is only closed after ssh timeout is reached.

For instance with a SSH timeout set to 30 s :

$ ./client "bundle:list"

$ netstat | grep 8101
tcp6       0      0 localhost:8101          localhost:47844         CLOSE_WAIT

$ tail karaf.log
INFO  | sshd-SshServer[2f716f77](port=8101)-nio2-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Session karaf@/127.0.0.1:47844<mailto:karaf@/127.0.0.1:47844> authenticated
INFO  | sshd-SshServer[2f716f77](port=8101)-timer-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Disconnecting(ServerSessionImpl[karaf@/127.0.0.1:47844]): SSH2_DISCONNECT_PROTOCOL_ERROR - Detected IdleTimeout after 30415/30000 ms.

Do you have a fix for this issue ?

Regards,
--
Nicolas Dutertry
Sopra HR Software - http://www.soprahr.com/<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.soprahr.com%2F&data=04%7C01%7CNicolas.Dutertry%40soprahr.com%7C7713128dbc2a4140e2d908d93ad2e8fb%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637605500396813837%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TAwbcmU%2BBeC6i562OVXe3kyooDE5T9215gSfmR2g7r0%3D&reserved=0>


C2 - Usage restreint


Re: SSH session not properly closed by Karaf

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi,

I guess the connexion is cleanly closed when you do:

$ bin/client
And then CTRL-D 

Right ?

Regards
JB

> Le 29 juin 2021 à 09:36, DUTERTRY Nicolas <Ni...@soprahr.com> a écrit :
> 
> Hi,
>  
> After using « client » script, the tcp socket is not closed by karaf (4.3.2) and remains in CLOSE_WAIT state. The session is only closed after ssh timeout is reached.
>  
> For instance with a SSH timeout set to 30 s :
>  
> $ ./client “bundle:list”
>  
> $ netstat | grep 8101
> tcp6       0      0 localhost:8101          localhost:47844         CLOSE_WAIT
>  
> $ tail karaf.log
> INFO  | sshd-SshServer[2f716f77](port=8101)-nio2-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Session karaf@/127.0.0.1:47844 authenticated
> INFO  | sshd-SshServer[2f716f77](port=8101)-timer-thread-1 | ServerSessionImpl                | 46 - org.apache.sshd.osgi - 2.5.1 | Disconnecting(ServerSessionImpl[karaf@/127.0.0.1:47844]): SSH2_DISCONNECT_PROTOCOL_ERROR - Detected IdleTimeout after 30415/30000 ms.
>  
> Do you have a fix for this issue ?
>  
> Regards,
> --
> Nicolas Dutertry
> Sopra HR Software - http://www.soprahr.com/ <http://www.soprahr.com/>
>  
> 
> C2 – Usage restreint