Avoid exception when finding elasticsearch host.