Reputation: 1948
When running Apache drill in kubernetes cluster, this exception is throwed a moment after startup:
Starting drillbit, logging to /opt/drill/log/drillbit.out
Exception in thread "main" org.apache.drill.exec.exception.DrillbitStartupException: Could not get canonical hostname.
at org.apache.drill.exec.server.BootStrapContext.getCanonicalHostName(BootStrapContext.java:169)
at org.apache.drill.exec.server.BootStrapContext.<init>(BootStrapContext.java:81)
at org.apache.drill.exec.server.Drillbit.<init>(Drillbit.java:161)
at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:518)
at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:498)
at org.apache.drill.exec.server.Drillbit.main(Drillbit.java:494)
Caused by: java.net.UnknownHostException: aks-nodepool1-20640609-1: aks-nodepool1-20640609-1: Try again
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
at org.apache.drill.exec.server.BootStrapContext.getCanonicalHostName(BootStrapContext.java:167)
... 5 more
Caused by: java.net.UnknownHostException: aks-nodepool1-20640609-1: Try again
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
aks-nodepool1-20640609-1
is name of the node, where the container is running.
Every other application than Drill is running ok on this stack. How can this be fixed ...?
Upvotes: 0
Views: 219
Reputation: 671
Looks like InetAddress.getLocalHost().getCanonicalHostName()
could not get canonical host name, you can investigate why this is happening, maybe you need to configure something in your env. Another option is to use custom host name, it can be set using env variable: DRILL_HOST_NAME
-> System.getenv("DRILL_HOST_NAME")
.
Upvotes: 3