diff --git a/pom.xml b/pom.xml
index ec73d20..37a1675 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
de.craftmania
DockerizedCraft
- 0.2.5
+ 0.2.6
diff --git a/src/main/java/de/craftmania/dockerizedcraft/container/inspector/kubernetes/PodWatcher.java b/src/main/java/de/craftmania/dockerizedcraft/container/inspector/kubernetes/PodWatcher.java
index 51341bb..db3067a 100644
--- a/src/main/java/de/craftmania/dockerizedcraft/container/inspector/kubernetes/PodWatcher.java
+++ b/src/main/java/de/craftmania/dockerizedcraft/container/inspector/kubernetes/PodWatcher.java
@@ -94,8 +94,16 @@ public void eventReceived(Action action, Pod resource) {
logger.info("[Kubernetes Container Inspector] port: " + port);
logger.info("[Kubernetes Container Inspector] ip: " + ip);
}
- containerEvent.setPort(Integer.parseInt(port));
- containerEvent.setIp(InetAddress.getByName(ip));
+ try {
+ containerEvent.setPort(Integer.parseInt(port));
+ containerEvent.setIp(InetAddress.getByName(ip));
+ }
+ catch(Exception ex) {
+ if (this.debug) {
+ logger.info("Error while parsing port or IP.");
+ }
+ return;
+ }
} else {
if (this.debug) {
logger.info("[Kubernetes Container Inspector] env:" + environmentVariables);