diff --git a/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/server/ServerService.java b/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/server/ServerService.java index b2bb8a223e..9b3d97432b 100644 --- a/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/server/ServerService.java +++ b/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/server/ServerService.java @@ -81,7 +81,8 @@ public boolean isAvailableServer(final String ip) { private boolean hasOnlineInstances(final String ip) { for (String each : jobNodeStorage.getJobNodeChildrenKeys(InstanceNode.ROOT)) { - if (each.startsWith(ip)) { + String eachIp = each.split("@-@")[0]; + if (eachIp.equals(ip)) { return true; } }