{"record":{"id":"430877178f27f2b7","repo":"alibaba/nacos","slug":"could-not-close-input-stream","errorCode":null,"errorMessage":"Could not close input stream","messagePattern":"Could not close input stream","errorType":"exception","errorClass":"JoranException","httpStatus":null,"severity":"error","filePath":"logger-adapter-impl/logback-adapter-12/src/main/java/com/alibaba/nacos/logger/adapter/logback12/NacosLogbackConfiguratorAdapterV1.java","lineNumber":91,"sourceCode":"            in = urlConnection.getInputStream();\n            if (hasNewDoConfigureApi()) {\n                doConfigure(in, url.toExternalForm());\n            } else {\n                // adapter old version of logback below 1.1.10\n                doConfigure(in);\n            }\n        } catch (IOException ioe) {\n            String errMsg = \"Could not open URL [\" + url + \"].\";\n            addError(errMsg, ioe);\n            throw new JoranException(errMsg, ioe);\n        } finally {\n            if (in != null) {\n                try {\n                    in.close();\n                } catch (IOException ioe) {\n                    String errMsg = \"Could not close input stream\";\n                    addError(errMsg, ioe);\n                    throw new JoranException(errMsg, ioe);\n                }\n            }\n        }\n    }\n    \n    /**\n     * Since logback 1.1.10, Add new doConfigure API with sax systemId and use this API to do configure.\n     *\n     * @return {@code true} when logback is upper 1.1.10, otherwise {@code false}\n     */\n    private boolean hasNewDoConfigureApi() {\n        try {\n            this.getClass().getMethod(\"doConfigure\", InputStream.class, String.class);\n            return true;\n        } catch (NoSuchMethodException e) {\n            return false;\n        }\n    }","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/logger-adapter-impl/logback-adapter-12/src/main/java/com/alibaba/nacos/logger/adapter/logback12/NacosLogbackConfiguratorAdapterV1.java#L73-L109","documentation":"Error \"Could not close input stream\" thrown in alibaba/nacos.","triggerScenarios":"Thrown at logger-adapter-impl/logback-adapter-12/src/main/java/com/alibaba/nacos/logger/adapter/logback12/NacosLogbackConfiguratorAdapterV1.java:91 when the library encounters an invalid state.","commonSituations":"Closing the logging configuration input stream failed.","solutions":["Review the input and runtime state for logback stream close failed, correct the reported problem, and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}