{"record":{"id":"3127465f96c919a1","repo":"apache/seatunnel","slug":"failed-to-get-cluster-members-information","errorCode":null,"errorMessage":"Failed to get cluster members information","messagePattern":"Failed to get cluster members information","errorType":"exception","errorClass":"SeaTunnelEngineException","httpStatus":null,"severity":"error","filePath":"seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ServerExecuteCommand.java","lineNumber":157,"sourceCode":"            }\n\n            Collection<Member> memberList = client.getClientClusterService().getMemberList();\n\n            Member masterMember = client.getClientClusterService().getMasterMember();\n            System.out.printf(\n                    \"%-36s %-20s %-20s %-10s\\n\", \"Member ID\", \"Address\", \"Role\", \"Version\");\n\n            for (Member member : members) {\n                System.out.printf(\n                        \"%-36s %-20s %-20s %-10s\\n\",\n                        member.getUuid(),\n                        member.getAddress(),\n                        getRole(masterMember.getAddress(), member),\n                        member.getVersion());\n            }\n            return members;\n        } catch (Exception e) {\n            throw new SeaTunnelEngineException(\"Failed to get cluster members information\", e);\n        } finally {\n            if (client != null) {\n                try {\n                    client.shutdown();\n                } catch (Exception e) {\n                    log.warn(\"Failed to shutdown Hazelcast client\", e);\n                }\n            }\n        }\n    }\n\n    private String getRole(Address masterAddress, Member member) {\n\n        if (member.isLiteMember()) {\n            return EngineConfig.ClusterRole.WORKER.toString();\n        }\n        if (masterAddress.toString().equals(member.getAddress().toString())) {\n            return \"ACTIVE MASTER\";","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ServerExecuteCommand.java#L139-L175","documentation":"This is the catch-all wrap: any exception while listing cluster members (Hazelcast client connection failures, timeouts, address resolution errors) is converted into a SeaTunnelEngineException with this generic message, preserving the original as the cause. It indicates the members listing operation as a whole failed, not a specific member problem.","triggerScenarios":"showClusterMembers throws for any reason — HazelcastClient.newHazelcastClient fails to connect (connection refused, wrong address/port in hazelcast-client config, network partition), or getMembers/getRole calls fail.","commonSituations":"Cluster host unreachable, firewall blocking the Hazelcast port (default 5801), wrong cluster name causing auth/connect failure, DNS resolution problems, or intermittent network issues in Kubernetes environments.","solutions":["Inspect the `cause` of the exception — it contains the real Hazelcast connection error","Verify network reachability to the cluster's Hazelcast port (telnet/nc to host:5801)","Check hazelcast-client.yaml for correct cluster-name and member address lists","Ensure the cluster is running and nodes are joined before running the members command"],"exampleFix":"// before (client config pointing to wrong host)\n// hazelcast-client.yaml: cluster-members: [\"127.0.0.1:5801\"]\n// after\n// hazelcast-client.yaml: cluster-members: [\"10.0.0.5:5801\", \"10.0.0.6:5801\"]","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    Set<Member> members = command.showClusterMembers();\n} catch (SeaTunnelEngineException e) {\n    log.error(\"Members listing failed: {}\", e.getMessage(), e.getCause());\n    // e.getCause() holds the real Hazelcast connect error\n}","preventionTips":["Always log the cause chain, not just the generic message","Pre-check network connectivity to Hazelcast ports","Keep hazelcast-client.yaml cluster-members accurate","Handle transient network errors with retry"],"tags":["cluster","hazelcast","network","cli"],"backgroundTag":"network-request-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}