Throw if no port is specified.