} catch (Exception e) {
OLogManager.instance().error(this, "Error on connecting to %s:%d", e, networkAddress, port);
}
if (channel == null)
throw new ONetworkProtocolException("Cannot connect to server host '" + networkAddress + "', ports: "
+ Arrays.toString(networkPort));
channel.writeByte(OChannelBinaryProtocol.REQUEST_SHUTDOWN);
channel.writeInt(0);
channel.writeString(OServerConfiguration.SRV_ROOT_ADMIN);
channel.writeString(rootPassword);
channel.flush();
if (channel.readByte() == OChannelBinaryProtocol.RESPONSE_STATUS_ERROR) {
channel.readInt();
channel.readString();
throw new ONetworkProtocolException(channel.readString());
}
channel.readInt();
}