{"record":{"id":"fd5e601f0319971f","repo":"apache/seatunnel","slug":"failed-close-kudu-client","errorCode":null,"errorMessage":"Failed close kudu client","messagePattern":"Failed close kudu client","errorType":"exception","errorClass":"CatalogException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-kudu/src/main/java/org/apache/seatunnel/connectors/seatunnel/kudu/catalog/KuduCatalog.java","lineNumber":89,"sourceCode":"        this.catalogName = catalogName;\n    }\n\n    @Override\n    public void open() throws CatalogException {\n        kuduClientResource = KuduUtil.getKuduClientResource(config);\n        kuduClient = kuduClientResource.getClient();\n    }\n\n    @Override\n    public void close() throws CatalogException {\n        try {\n            if (kuduClientResource != null) {\n                kuduClientResource.close();\n            } else if (kuduClient != null) {\n                kuduClient.close();\n            }\n        } catch (KuduException e) {\n            throw new CatalogException(\"Failed close kudu client\", e);\n        } finally {\n            kuduClient = null;\n            kuduClientResource = null;\n        }\n    }\n\n    @Override\n    public String name() {\n        return catalogName;\n    }\n\n    @Override\n    public String getDefaultDatabase() throws CatalogException {\n        return defaultDatabase;\n    }\n\n    @Override\n    public boolean databaseExists(String databaseName) throws CatalogException {","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-kudu/src/main/java/org/apache/seatunnel/connectors/seatunnel/kudu/catalog/KuduCatalog.java#L71-L107","documentation":"KuduCatalog.close() attempts to release the underlying Kudu client (or its resource wrapper). If closing the Kudu client raises a KuduException, it is rethrown as a CatalogException with this message. It signals the client connection to the Kudu masters/tablets could not be shut down cleanly.","triggerScenarios":"Calling catalog.close() when the KuduClient's close RPC fails — e.g. connection to Kudu masters already broken or a KuduException thrown during client shutdown.","commonSituations":"Job teardown after a network partition with the Kudu cluster; stale clients after Kudu master restarts; shutdown during connection timeouts.","solutions":["Check network connectivity to Kudu master addresses at shutdown","Verify the Kudu cluster is healthy (master status)","Retry catalog close; the finally block nulls the client so leaks are unlikely","Inspect the wrapped KuduException cause for the root RPC failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { catalog.close(); } catch (CatalogException e) { log.warn(\"Kudu client close failed\", e.getCause()); } // resources are nulled in finally, safe to continue","preventionTips":["Ensure Kudu masters are reachable for the lifetime of the job","Close catalogs in a shutdown hook with logging rather than failing the job","Monitor network stability between workers and Kudu cluster"],"tags":["kudu","catalog","close","network"],"backgroundTag":"database-query-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}