无法启动 ray 速成课程笔记本,ray.init 失败,对等方重置连接

如何解决无法启动 ray 速成课程笔记本,ray.init 失败,对等方重置连接

我正在尝试通过在我的 mac 机器上本地运行光线学院crash course来学习 Ray。我正在使用以下方法设置虚拟环境:

conda env create -f environment.yml
conda activate anyscale-academy
tools/fix-jupyter.sh

但是当我尝试初始化光线会话时:

import ray
ray.init()

并得到错误:

---------------------------------------------------------------------------
ConnectionResetError                      Traceback (most recent call last)
~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/redis/connection.py in read_from_socket(self,timeout,raise_on_timeout)
    426             if HIREDIS_USE_BYTE_BUFFER:
--> 427                 bufflen = recv_into(self._sock,self._buffer)
    428                 if bufflen == 0:

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/redis/_compat.py in recv_into(sock,*args,**kwargs)
     74     def recv_into(sock,**kwargs):
---> 75         return sock.recv_into(*args,**kwargs)
     76 

ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception,another exception occurred:

ConnectionError                           Traceback (most recent call last)
<ipython-input-1-1dcc6cb73a4f> in <module>
      1 import ray
----> 2 ray.init()

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/ray/worker.py in init(address,num_cpus,num_gpus,resources,object_store_memory,local_mode,ignore_reinit_error,include_dashboard,dashboard_host,dashboard_port,job_config,configure_logging,logging_level,logging_format,log_to_driver,_enable_object_reconstruction,_redis_max_memory,_plasma_directory,_node_ip_address,_driver_object_store_memory,_memory,_redis_password,_java_worker_options,_code_search_path,_temp_dir,_load_code_from_local,_lru_evict,_metrics_export_port,_system_config)
    720             shutdown_at_exit=False,721             spawn_reaper=True,--> 722             ray_params=ray_params)
    723     else:
    724         # In this case,we are connecting to an existing cluster.

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/ray/node.py in __init__(self,ray_params,head,shutdown_at_exit,spawn_reaper,connect_only)
    214         # Start processes.
    215         if head:
--> 216             self.start_head_processes()
    217             redis_client = self.create_redis_client()
    218             redis_client.set("session_name",self.session_name)

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/ray/node.py in start_head_processes(self)
    765         assert self._redis_address is None
    766         # If this is the head node,start the relevant head node processes.
--> 767         self.start_redis()
    768 
    769         self.start_gcs_server()

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/ray/node.py in start_redis(self)
    595              redirect_worker_output=True,596              password=self._ray_params.redis_password,--> 597              fate_share=self.kernel_fate_share)
    598         assert (
    599             ray_constants.PROCESS_TYPE_REDIS_SERVER not in self.all_processes)

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/ray/_private/services.py in start_redis(node_ip_address,redirect_files,resource_spec,port,redis_shard_ports,num_redis_shards,redis_max_clients,redirect_worker_output,password,fate_share)
    849     primary_redis_client = redis.StrictRedis(
    850         host=node_ip_address,port=port,password=password)
--> 851     primary_redis_client.set("NumRedisShards",str(num_redis_shards))
    852 
    853     # Put the redirect_worker_output bool in the Redis shard so that workers

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/redis/client.py in set(self,name,value,ex,px,nx,xx,keepttl)
   1799             pieces.append('KEEPTTL')
   1800 
-> 1801         return self.execute_command('SET',*pieces)
   1802 
   1803     def __setitem__(self,value):

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/redis/client.py in execute_command(self,**options)
    896         pool = self.connection_pool
    897         command_name = args[0]
--> 898         conn = self.connection or pool.get_connection(command_name,**options)
    899         try:
    900             conn.send_command(*args)

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/redis/connection.py in get_connection(self,command_name,*keys,**options)
   1190         try:
   1191             # ensure this connection is connected to Redis
-> 1192             connection.connect()
   1193             # connections that the pool provides should be ready to send
   1194             # a command. if not,the connection was either returned to the

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/redis/connection.py in connect(self)
    565         self._sock = sock
    566         try:
--> 567             self.on_connect()
    568         except RedisError:
    569             # clean up after any error in on_connect

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/redis/connection.py in on_connect(self)
    641 
    642             try:
--> 643                 auth_response = self.read_response()
    644             except AuthenticationWrongNumberOfArgsError:
    645                 # a username and password were specified but the Redis

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/redis/connection.py in read_response(self)
    737         "Read the response from a previously sent command"
    738         try:
--> 739             response = self._parser.read_response()
    740         except socket.timeout:
    741             self.disconnect()

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/redis/connection.py in read_response(self)
    468         response = self._reader.gets()
    469         while response is False:
--> 470             self.read_from_socket()
    471             response = self._reader.gets()
    472         # if an older version of hiredis is installed,we need to attempt

~/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/redis/connection.py in read_from_socket(self,raise_on_timeout)
    451                 return False
    452             raise ConnectionError("Error while reading from socket: %s" %
--> 453                                   (ex.args,))
    454         finally:
    455             if custom_timeout:

ConnectionError: Error while reading from socket: (54,'Connection reset by peer')

我已经在初始化之前在端口 6379 上启动了 redis 服务器,并通过

验证了 redis 连接
import redis
r = redis.Redis()
r.ping()
``` and get back True. Now the only way for me to try out Ray is by running it in Google Colab. I am not sure what had gone wrong,so any suggestion or help is greatly appreciated!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-