diff --git a/doc/source/configure.rst b/doc/source/configure.rst index a5c4b4c41..2c8bac625 100644 --- a/doc/source/configure.rst +++ b/doc/source/configure.rst @@ -116,6 +116,9 @@ behind a firewall, this feature is useful for instances exposed to the internet where configuring a firewall is not possible. Because Redis is very fast at serving queries, the chosen password should be long. + +.. note:: The Redis passwords provided below may not contain spaces. + Redis authentication is only supported on the raylet code path. To add authentication via the Python API, start Ray using: diff --git a/python/ray/services.py b/python/ray/services.py index 5b806f8dc..e4247d7f2 100644 --- a/python/ray/services.py +++ b/python/ray/services.py @@ -772,6 +772,8 @@ def _start_redis_instance(executable, # Construct the command to start the Redis server. command = [executable] if password: + if " " in password: + raise ValueError("Spaces not permitted in redis password.") command += ["--requirepass", password] command += ( ["--port", str(port), "--loglevel", "warning"] + load_module_args)