Skip to content

[serve] Better validation for arguments to client.start() #12769

@edoakes

Description

@edoakes

What is the problem?

If I pass in a bad host to serve, it gives me an obscure error:

(base) ray/python % serve start --http-host 0.0.0.
File descriptor limit 256 is too low for production servers and may result in connection errors. At least 8192 is recommended. --- Fix with 'ulimit -n 8192'
2020-12-10 18:50:14,006 INFO worker.py:653 -- Connecting to existing Ray cluster at address: 192.168.0.124:6379
(pid=10674) 2020-12-10 18:50:14,534     INFO controller.py:346 -- Starting HTTP proxy with name 'SERVE_CONTROLLER_ACTOR:SERVE_PROXY_ACTOR-node:192.168.0.124-0' on node 'node:192.168.0.124-0' listening on '0.0.0.:8000'
(pid=10677) Task exception was never retrieved
(pid=10677) future: <Task finished name='Task-5' coro=<HTTPProxyActor.run() done, defined at /Users/eoakes/code/ray/python/ray/serve/http_proxy.py:159> exception=gaierror(8, 'nodename nor servname provided, or not known')>
(pid=10677) Traceback (most recent call last):
(pid=10677)   File "/Users/eoakes/code/ray/python/ray/serve/http_proxy.py", line 167, in run
(pid=10677)     sock.bind((self.host, self.port))
(pid=10677) socket.gaierror: [Errno 8] nodename nor servname provided, or not known

Likely to be the same with a bad port number.

Reproduction (REQUIRED)

Please provide a short code snippet (less than 50 lines if possible) that can be copy-pasted to reproduce the issue. The snippet should have no external library dependencies (i.e., use fake or mock data / environments):

If the code snippet cannot be run by itself, the issue will be closed with "needs-repro-script".

  • I have verified my script runs in a clean environment and reproduces the issue.
  • I have verified the issue also occurs with the latest wheels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequest for new feature and/or capabilityfix-error-msgThis issue has a bad error message that should be improved.good-first-issueGreat starter issue for someone just starting to contribute to RayserveRay Serve Related Issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions