Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
418 views

Get error 「SSH Channel no longer connected!」when run SSH Shell

Environment:

OO: 10.60; Windows Server 2012

Issue Description:

Get error「SSH Channel no longer connected!」when run /Base/Library/Operations/Remote Command Execution/SSH/v1.0/SSH Shell

This only happen occasionally. 

Troubleshooting Done:

we found customer has many SSH Shell, and this error happened only when the previous SSH Shell response not as usual, seems the remote command was not return correctly. Following is the response:

{SESSION_ON=true, returnCode=0, visualized=<Frames></Frames>, returnResult=ssh 10.124.20.116 "chown apache:apache /work/ootest/test2/test036 .txt", STDOUT=ssh 10.124.20.116 "chown apache:apache /work/ootest/test2/test036 .txt", Result=ssh 10.124.20.116 "chown apache:apache /work/ootest/test2/test036 .txt"}

While the normal response should be following:

{SESSION_ON=true, returnCode=0, visualized=<Frames><Frame index="1">ssh 10.124.20.116 "chown apache:apache /work/ootest/test2/test035</Frame><Frame index="2">.txt"0.124.20.116 "chown apache:apache /work/ootest/test2/test035[root@oo01 ~]#</Frame></Frames>, returnResult=ssh 10.124.20.116 "chown apache:apache /work/ootest/test2/test035 .txt"[root@oo01 ~]# , STDOUT=ssh 10.124.20.116 "chown apache:apache /work/ootest/test2/test035 .txt"[root@oo01 ~]# , Result=ssh 10.124.20.116 "chown apache:apache /work/ootest/test2/test035 .txt"[root@oo01 ~]#

Obviously, the difference is that there is a "[root@oo01 ~]# " at the end of response.

If the previous SSH Shell returned with out "[root@oo01 ~]# " then the next SSH Shell will failed with following error:

{SESSION_ON=true, returnCode=-1, returnResult=SSH Channel nolonger connected!, STDOUT=null, Result=SSH Channel nolonger connected!}

This may same as when we execute command in the terminal, if the previous command is not returned and prompt is not show, we can not operation next command.

 However, we ask customer to mannual run the ssh command directly on the Server, this problem never happen.

And we ask customer to check if there are many SSH to the target server when the problem happen, but they said no, only they are using the server. We also ask customer to restart SSH service on target server or even restart the server, there is no change.

Could anyone give a suggestion?

0 Likes
4 Replies
Ninh_Nguyen_CSA Respected Contributor.
Respected Contributor.

Re: Get error 「SSH Channel no longer connected!」when run SSH Shell

Dear Foy, 

May we klindly know which OO version as well as Base CP version customer is using?

If possible, could you please share with us all the inputs customer using for the previous SSH Shell? 

And as your information, this ONLY happen occasionly. So how ofthen customer  got the correct result and how offen customer got the wrong one. And did you try to capture the packages using Wireshark to compare between 2 above situations?

Looking forward from you.

Warmest Regards, 

Ninh

0 Likes
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Get error 「SSH Channel no longer connected!」when run SSH Shell

Hi,

 OO version is 10.60, I will ask customer the exact base CP version.

We do not have exact result about how often it happen. We have asked customer if the issue is at the same step when the problem occurred, but now no response.  

About the inputs, I give the three SSH Shell parameters and result to you.

1:  Scp file test036.txt to server 10.124.20.116, this is success and return correctly.

{host=10.124.20.173, port=22, command=send scp /work/ootest/test2/test036.txt 10.124.20.116:/work/ootest/test2/test036.txt, username=root, password=pass, privateKeyFile=null, timeout=90000, newlineCharacters=null, characterDelay=null, characterSet=null,
scp /work/ootest/test2/test036.txt 10.124.20.116:/work/ootest/tes t2/test036.txttest036.txt 0% 0 0.0KB/s --:-- ETAtest036.txt 100% 19 0.0KB/s 00:00 [root@oo01 ~]#

2:  Change onwer for file test036.txt on server 10.124.20.116, this is success and return  Not correctly.   NO([root@oo01 ~]# at end)
{host=10.124.20.173, port=22, command=send ssh 10.124.20.116 "chown apache:apache /work/ootest/test2/test036.txt", username=root, password=pass, privateKeyFile=null, timeout=90000, newlineCharacters=null, characterDelay=null, characterSet=null,
ssh 10.124.20.116 "chown apache:apache /work/ootest/test2/test036.txt"

3:  list the file test036.txt to see the attribute but failed.
{host=10.124.20.173, port=22, command=send ssh 10.124.20.116 "ls -l /work/ootest/test2/test036.txt", username=root, password=pass, privateKeyFile=null, timeout=90000, newlineCharacters=null, characterDelay=null, characterSet=null
{SESSION_ON=true, returnCode=-1, returnResult=SSH Channel nolonger connected!, STDOUT=null, Result=SSH Channel nolonger connected!}

0 Likes
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Get error 「SSH Channel no longer connected!」when run SSH Shell

By the way, I do not have capture wireshark package.  And will ask customer to do that.

0 Likes
Luis_V_OO Super Contributor.
Super Contributor.

Re: Get error 「SSH Channel no longer connected!」when run SSH Shell

Hi Foy,

         Could you please confirm if the issue is still present or not?

 

Thank you.

Luis Quiros
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.