{"record":{"id":"6f3a80b6f40fba70","repo":"apache/seatunnel","slug":"failed-to-open-catalog-s-6f3a80","errorCode":null,"errorMessage":"Failed to open catalog %s","messagePattern":"Failed to open catalog (.+?)","errorType":"exception","errorClass":"CatalogException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/catalog/MilvusCatalog.java","lineNumber":101,"sourceCode":"\n    private MilvusServiceClient client;\n\n    public MilvusCatalog(String catalogName, ReadonlyConfig config) {\n        this.catalogName = catalogName;\n        this.config = config;\n    }\n\n    @Override\n    public void open() throws CatalogException {\n        ConnectParam connectParam =\n                ConnectParam.newBuilder()\n                        .withUri(config.get(MilvusSinkOptions.URL))\n                        .withToken(config.get(MilvusSinkOptions.TOKEN))\n                        .build();\n        try {\n            this.client = new MilvusServiceClient(connectParam);\n        } catch (Exception e) {\n            throw new CatalogException(String.format(\"Failed to open catalog %s\", catalogName), e);\n        }\n    }\n\n    @Override\n    public void close() throws CatalogException {\n        this.client.close();\n    }\n\n    @Override\n    public String name() {\n        return catalogName;\n    }\n\n    @Override\n    public PreviewResult previewAction(\n            ActionType actionType, TablePath tablePath, Optional<CatalogTable> catalogTable) {\n        if (actionType == ActionType.CREATE_TABLE) {\n            return new InfoPreviewResult(\"create collection \" + tablePath.getTableName());","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/catalog/MilvusCatalog.java#L83-L119","documentation":"MilvusCatalog.open builds a ConnectParam from the configured URL and token and instantiates a MilvusServiceClient. Any exception from the Milvus SDK during client construction is wrapped in CatalogException with 'Failed to open catalog <name>'. This indicates the catalog could not establish a gRPC connection to the Milvus server.","triggerScenarios":"MilvusCatalog.open() called with an unreachable/incorrect URL, an invalid token, TLS mismatch, or when the Milvus server refuses the gRPC handshake.","commonSituations":"Milvus server not started or wrong host:port in the connector config; auth (token/user-password) mismatch against a Milvus instance with authorization enabled; connecting over HTTPS to a plaintext endpoint or vice versa; Kubernetes network policy / service DNS not resolvable from the SeaTunnel job.","solutions":["Verify the configured Milvus URL (scheme, host, port) and test reachability, e.g. with a Milvus SDK quick connect or `nc -zv host 19530`.","Check the token/credentials match the Milvus instance's auth configuration.","Match TLS/HTTP scheme to the server configuration (http:// vs https://, insecure vs secure channel).","Inspect the wrapped cause 'e' in the stack trace for the underlying gRPC status code."],"exampleFix":"// before\nurl = \"http://milvus-svc:19531\"\n// after\nurl = \"http://milvus-svc:19530\"","handlingStrategy":"try-catch","validationCode":"// pre-flight connectivity check\nString url = config.get(MilvusSinkOptions.URL);\nURI uri = new URI(url);\ntry (Socket s = new Socket()) {\n    s.connect(new InetSocketAddress(uri.getHost(), uri.getPort()), 3000); // throws if unreachable\n}","typeGuard":null,"tryCatchPattern":"try {\n    catalog.open(catalogConfig);\n} catch (CatalogException e) {\n    log.error(\"Milvus catalog open failed for '{}': check URL/token/TLS. Cause: {}\", catalogName, e.getCause());\n    throw e;\n}","preventionTips":["Test host:port reachability from the SeaTunnel runtime network (containers/K8s DNS)","Match http/https and auth settings to the Milvus server configuration","Verify token validity for instances with authorization enabled"],"tags":["milvus","catalog","grpc","connection"],"backgroundTag":"connection-refused","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"}