use $HOSTPORT for registering in etcd if provided