Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error messages when nodes can't communicate with each other. #223

Merged
merged 3 commits into from
Jan 22, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Good error messages when nodes can't communicate with each other
  • Loading branch information
Ubuntu authored and robertnishihara committed Jan 22, 2017
commit 4cfd00eeb0814c57e808f58097a9ba59c8dda540
2 changes: 2 additions & 0 deletions python/ray/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,13 @@ def wait_for_redis_to_start(redis_host, redis_port, num_retries=5):
Exception: An exception is raised if we could not connect with Redis.
"""
redis_client = redis.StrictRedis(host=redis_host, port=redis_port)
print("Redis Client Started!")
# Wait for the Redis server to start.
counter = 0
while counter < num_retries:
try:
# Run some random command and see if it worked.
print("Waiting for %s to respond..." % redis_host)
redis_client.client_list()
except redis.ConnectionError as e:
# Wait a little bit.
Expand Down