[GitHub] [mina-sshd] garyiscoding commented on issue #310: What will cause the failure to open the channel

2023-01-17 Thread GitBox


garyiscoding commented on issue #310:
URL: https://github.com/apache/mina-sshd/issues/310#issuecomment-1385029023

   long openChannelTimeout = 500L;
   try (ChannelExec channel = session.createExecChannel(command);
   ByteArrayOutputStream outputStream = new 
ByteArrayOutputStream();
   ByteArrayOutputStream errorStream = new 
ByteArrayOutputStream()) {
   channel.setOut(outputStream);
   channel.setErr(errorStream);
   channel.open().verify(openChannelTimeout);
   channel.waitFor(EnumSet.of(CLOSED), execTimeout);
   
   Integer exitCode = channel.getExitStatus();
   String outputStr = 
StringUtils.chomp(outputStream.toString());
   String errorStr = StringUtils.chomp(errorStream.toString());
   }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [mina-sshd] garyiscoding commented on issue #310: What will cause the failure to open the channel

2023-01-17 Thread GitBox


garyiscoding commented on issue #310:
URL: https://github.com/apache/mina-sshd/issues/310#issuecomment-1385028394

   `long openChannelTimeout = 500L;
   try (ChannelExec channel = session.createExecChannel(command);
   ByteArrayOutputStream outputStream = new 
ByteArrayOutputStream();
   ByteArrayOutputStream errorStream = new 
ByteArrayOutputStream()) {
   channel.setOut(outputStream);
   channel.setErr(errorStream);
   channel.open().verify(openChannelTimeout);
   channel.waitFor(EnumSet.of(CLOSED), execTimeout);
   
   Integer exitCode = channel.getExitStatus();
   String outputStr = 
StringUtils.chomp(outputStream.toString());
   String errorStr = StringUtils.chomp(errorStream.toString());
   }`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [mina-sshd] garyiscoding commented on issue #310: What will cause the failure to open the channel

2023-01-17 Thread GitBox


garyiscoding commented on issue #310:
URL: https://github.com/apache/mina-sshd/issues/310#issuecomment-1385028733

   `long openChannelTimeout = 500L;
   try (ChannelExec channel = session.createExecChannel(command);
   ByteArrayOutputStream outputStream = new 
ByteArrayOutputStream();
   ByteArrayOutputStream errorStream = new 
ByteArrayOutputStream()) {
   channel.setOut(outputStream);
   channel.setErr(errorStream);
   channel.open().verify(openChannelTimeout);
   channel.waitFor(EnumSet.of(CLOSED), execTimeout);
   
   Integer exitCode = channel.getExitStatus();
   String outputStr = 
StringUtils.chomp(outputStream.toString());
   String errorStr = StringUtils.chomp(errorStream.toString());
   }`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [mina-sshd] garyiscoding commented on issue #310: What will cause the failure to open the channel

2023-01-17 Thread GitBox


garyiscoding commented on issue #310:
URL: https://github.com/apache/mina-sshd/issues/310#issuecomment-1385023724

   When the service is first deployed, there is no error. After running for a 
while, this error occurs
   
   
![image](https://user-images.githubusercontent.com/121858742/212841990-ea8ef337-0412-40a2-8207-9786481972bb.png)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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