Skip to content

Commit

Permalink
[core] add "last exception" to error message when GCS connection fail…
Browse files Browse the repository at this point in the history
…s in ray.init(). (ray-project#46516)

This helps debugging GCS connection issues.

Signed-off-by: Ruiyang Wang <[email protected]>
  • Loading branch information
rynewang authored Jul 9, 2024
1 parent 4568ace commit d134c25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/ray/_private/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,11 +759,12 @@ def _init_gcs_client(self):
f" Last {len(errors)} lines of error files:"
f"{error_msg}."
f"Please check {os.path.join(self._logs_dir, 'gcs_server.out')}"
" for details"
f" for details. Last connection error: {last_ex}"
)
else:
raise RuntimeError(
f"Failed to {'start' if self.head else 'connect to'} GCS."
f"Failed to {'start' if self.head else 'connect to'} GCS. Last "
f"connection error: {last_ex}"
)

ray.experimental.internal_kv._initialize_internal_kv(self._gcs_client)
Expand Down

0 comments on commit d134c25

Please sign in to comment.