diff --git a/htroot/Status.java b/htroot/Status.java index 269ddbcd3..5cea1c217 100644 --- a/htroot/Status.java +++ b/htroot/Status.java @@ -27,6 +27,7 @@ // javac -classpath .:../Classes Status.java // if the shell's current path is HTROOT +import java.net.InetAddress; import java.util.Date; import de.anomic.http.httpRequestHeader; @@ -163,7 +164,8 @@ public class Status { } else { prop.put("extPortFormat", "0"); } - prop.put("host", serverDomains.myPublicLocalIP().getHostAddress()); + InetAddress hostIP = serverDomains.myPublicLocalIP(); + prop.put("host", hostIP!=null ? hostIP.getHostAddress() : "Unkown IP"); // ssl support prop.put("sslSupport",sb.getConfig("keyStore", "").length() == 0 ? "0" : "1"); diff --git a/source/de/anomic/server/serverDomains.java b/source/de/anomic/server/serverDomains.java index a2e8a6a18..20b04f162 100644 --- a/source/de/anomic/server/serverDomains.java +++ b/source/de/anomic/server/serverDomains.java @@ -646,6 +646,7 @@ public class serverDomains { return ia[0]; } catch (final java.net.UnknownHostException e) { System.err.println("ERROR: (internal) " + e.getMessage()); + e.printStackTrace(); return null; } }