{"record":{"id":"2ec08e80e2551052","repo":"apache/seatunnel","slug":"invalid-target-address-null","errorCode":null,"errorMessage":"Invalid target address: NULL","messagePattern":"Invalid target address: NULL","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/joiner/LiteNodeDropOutTcpIpJoiner.java","lineNumber":110,"sourceCode":"            long maxJoinMergeTargetMillis =\n                    node.getProperties().getMillis(ClusterProperty.MAX_JOIN_MERGE_TARGET_SECONDS);\n            joinViaTargetMember(targetAddress, maxJoinMergeTargetMillis);\n            if (!clusterService.isJoined()) {\n                joinViaPossibleMembers();\n            }\n        } else if (joinConfig.getTcpIpConfig().getRequiredMember() != null) {\n            Address requiredMember = getRequiredMemberAddress();\n            long maxJoinMillis = getMaxJoinMillis();\n            joinViaTargetMember(requiredMember, maxJoinMillis);\n        } else {\n            joinViaPossibleMembers();\n        }\n    }\n\n    private void joinViaTargetMember(Address targetAddress, long maxJoinMillis) {\n        try {\n            if (targetAddress == null) {\n                throw new IllegalArgumentException(\"Invalid target address: NULL\");\n            }\n            if (logger.isFineEnabled()) {\n                logger.fine(\"Joining over target member \" + targetAddress);\n            }\n            if (targetAddress.equals(node.getThisAddress()) || isLocalAddress(targetAddress)) {\n                clusterJoinManager.setThisMemberAsMaster();\n                return;\n            }\n            long joinStartTime = Clock.currentTimeMillis();\n            Connection connection;\n            while (shouldRetry() && (Clock.currentTimeMillis() - joinStartTime < maxJoinMillis)) {\n                ServerConnectionManager connectionManager =\n                        node.getServer().getConnectionManager(MEMBER);\n                connection = connectionManager.getOrConnect(targetAddress);\n                if (connection == null) {\n                    connectionManager.blockOnConnect(targetAddress, JOIN_RETRY_WAIT_TIME, 0);\n                    continue;\n                }","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/joiner/LiteNodeDropOutTcpIpJoiner.java#L92-L128","documentation":"joinViaTargetMember is invoked during TCP-IP cluster join with the address of the member to join. If the target address is null, meaning no master candidate could be resolved, the joiner throws IllegalArgumentException 'Invalid target address: NULL' instead of proceeding with a null address. It is a defensive check inside the join procedure reachable via doJoin.","triggerScenarios":"A lite member configured with a TCP-IP join list where all configured member addresses are unreachable/unresolvable, so the resolved target member address is null when joinViaTargetMember runs; or the join target lookup returns null due to network/DNS failure.","commonSituations":"Master node down or not yet started when a lite (client-coordination) node tries to join; wrong host/port listed in the member-list config; DNS name not resolvable in the container environment; firewall blocking the cluster port.","solutions":["Ensure the target/master node is running and reachable before starting this node.","Verify the 'member-list' addresses and ports in the hazelcast TCP-IP join config are correct.","Check DNS resolution and firewall/network rules between nodes.","Retry the join after the master becomes available; review cluster logs for why the target address resolved to null."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// before starting the node\nnc -z <masterHost> <clusterPort> && echo reachable || echo 'master not reachable'","typeGuard":null,"tryCatchPattern":"try {\n    startNode();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"Invalid target address\")) {\n        // wait for master then retry join\n        Thread.sleep(joinRetryMs);\n        startNode();\n    } else throw e;\n}","preventionTips":["Start the master node before lite/worker members that join via TCP-IP.","Verify member-list hostnames resolve and ports are open (nc/telnet).","Use stable DNS names or IPs in the join member-list."],"tags":["network","cluster-join","null-address","hazelcast"],"backgroundTag":"null-argument","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"}