diff --git a/pulsar-broker/src/main/java/com/yahoo/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java b/pulsar-broker/src/main/java/com/yahoo/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java index 3abe6a14bd744..5c7e5457a0980 100644 --- a/pulsar-broker/src/main/java/com/yahoo/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java +++ b/pulsar-broker/src/main/java/com/yahoo/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java @@ -159,7 +159,8 @@ private List getNics() { private boolean isPhysicalNic(Path path) { try { - if (!Files.readSymbolicLink(path).toString().contains("/virtual/")) { + path = Files.isSymbolicLink(path) ? Files.readSymbolicLink(path) : path; + if (!path.toString().contains("/virtual/")) { try { Files.readAllBytes(path.resolve("speed")); return true;