[jbosstools-issues] [JBoss JIRA] (JBIDE-22153) Closing log of a pod throws an exception

Viacheslav Kabanovich (JIRA) issues at jboss.org
Mon Apr 11 12:52:01 EDT 2016


    [ https://issues.jboss.org/browse/JBIDE-22153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190056#comment-13190056 ] 

Viacheslav Kabanovich commented on JBIDE-22153:
-----------------------------------------------

There is no way to check if input stream is closed externally other than by catching IOException. Even if caught, the data already read into the buffer stream is lost. To decrease the damage we have to read data from buffered stream by smaller portions (now it is 8192, I would suggest as little as 128) and nicely quit at caught IOException for message "Stream closed".

> Closing log of a pod throws an exception
> ----------------------------------------
>
>                 Key: JBIDE-22153
>                 URL: https://issues.jboss.org/browse/JBIDE-22153
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.3.1.CR1
>            Reporter: Marián Labuda
>            Assignee: Xavier Coulon
>              Labels: openshift_v3
>             Fix For: 4.4.0.Alpha1
>
>
> When I am trying to close log of a pod (build pod or application pod, does not matter which one) by clicking on gray view tool item Close, I get following exception
> {code}
> Exception reading pod log inputstream
> java.io.IOException: Stream closed
> 	at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:170)
> 	at java.io.BufferedInputStream.read(BufferedInputStream.java:336)
> 	at java.io.SequenceInputStream.read(SequenceInputStream.java:207)
> 	at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
> 	at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
> 	at java.io.FilterInputStream.read(FilterInputStream.java:107)
> 	at org.jboss.tools.openshift.internal.ui.job.PodLogsJob$ConsoleStreamPipe.runOCBinary(PodLogsJob.java:166)
> 	at org.jboss.tools.openshift.internal.core.OCBinaryOperation.run(OCBinaryOperation.java:34)
> 	at org.jboss.tools.openshift.internal.ui.job.PodLogsJob$ConsoleStreamPipe.run(PodLogsJob.java:153)
> 	at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the jbosstools-issues mailing list