try {
InetAddress[] addresses = InetAddress.getAllByName(host.name);
aliases = new Host[addresses.length];
for (int i = 0; i < addresses.length; i++) {
aliases[i] = new Host(addresses[i].getHostAddress(), host.port);
}
}
catch (UnknownHostException uhe) {
throw new AerospikeException.Connection("Invalid host: " + host);
}
Exception exception = null;
for (int i = 0; i < aliases.length; i++) {
Host alias = aliases[i];
try {
InetSocketAddress address = new InetSocketAddress(alias.name, alias.port);
Connection conn = new Connection(address, cluster.getConnectionTimeout());