stream: handle failed port allocation