Python异常:错误:[Errno 10054]远程主机已强制关闭现有连接

Python异常:错误:[Errno 10054]远程主机已强制关闭现有连接,python,exception,error-handling,prediction,Python,Exception,Error Handling,Prediction,我最近安装了predictionio,以获得有关流浪者箱的建议。我对它相当陌生。当我尝试运行其python示例文件import_eventserver时,遇到以下错误: C:\HashiCorp\Vagrant\PredictionIO-Vagrant-0.8.2\MyRecommendation>python data/imp ort_eventserver.py --access_key some_access_key Namespace(access_key='some_access

我最近安装了predictionio,以获得有关流浪者箱的建议。我对它相当陌生。当我尝试运行其python示例文件import_eventserver时,遇到以下错误:

C:\HashiCorp\Vagrant\PredictionIO-Vagrant-0.8.2\MyRecommendation>python data/imp
ort_eventserver.py --access_key some_access_key
Namespace(access_key='some_access_key', file='./data/sample_movielens_data.txt', url='http://localhost:7070')
正在导入数据

Traceback (most recent call last):
  File "data/import_eventserver.py", line 76, in <module>
    import_events(client, args.file)
  File "data/import_eventserver.py", line 45, in import_events
    target_entity_id=data[1]
  File "C:\Anaconda\lib\site-packages\predictionio-0.8.3-py2.7.egg\predictionio\
__init__.py", line 243, in create_event
    event_time).get_response()
  File "C:\Anaconda\lib\site-packages\predictionio-0.8.3-py2.7.egg\predictionio\
connection.py", line 113, in get_response
    self._response = self.rfunc(tmp_response)
  File "C:\Anaconda\lib\site-packages\predictionio-0.8.3-py2.7.egg\predictionio\
__init__.py", line 120, in _acreate_resp
    (response.error, response.request))
predictionio.NotCreatedError: Exception happened: [Errno 10054] An existing conn
ection was forcibly closed by the remote host for request POST /events.json?acce
ssKey=some_access_key {'eventTime': '2015-01-26T02:16:36.285+0000', 'entityType': 'user', 'targetEntityType': '
item', 'targetEntityId': '2', 'entityId': '0', 'event': 'buy'} /events.json?acce
ssKey=enFymhjuV3ighOz9R3u3FuiWSHNgWch241WbaTaXpdXyNJbKp5tYWO5IplkxUvR7?eventTime
=2015-01-26T02%3A16%3A36.285%2B0000&entityType=user&targetEntityType=item&target
EntityId=2&entityId=0&event=buy
回溯(最近一次呼叫最后一次):
文件“data/import_eventserver.py”,第76行,在
导入事件(客户端,args.file)
导入事件中第45行的文件“data/import\u eventserver.py”
目标实体id=数据[1]
文件“C:\Anaconda\lib\site packages\predictionio-0.8.3-py2.7.egg\predictionio\
__init_uuu.py”,第243行,在创建_u事件中
事件\时间)。获取\响应()
文件“C:\Anaconda\lib\site packages\predictionio-0.8.3-py2.7.egg\predictionio\
“connection.py”,第113行,在get_响应中
self.\u response=self.rfunc(tmp\u response)
文件“C:\Anaconda\lib\site packages\predictionio-0.8.3-py2.7.egg\predictionio\
__“初始值”,第120行,分别位于
(response.error,response.request)
predictionio.NotCreatedError:发生异常:[Errno 10054]现有连接
远程主机强制关闭了请求POST/events.json?acce的连接
ssKey=some_access_key{'eventTime':'2015-01-26T02:16:36.285+0000','entityType':'user','targetEntityType':'
item','targetEntityId':'2','entityId':'0','event':'buy'}/events.json?acce
ssKey=ENFYMHJUV3IGHOZ9R3U3FUIWSHNGWCH241WBATAXDxYNJBKP5TYWO5IPLKXUVR7?事件时间
=2015-01-26T02%3A16%3A36.285%2B0000和实体类型=用户和目标实体类型=项目和目标
EntityId=2&EntityId=0&event=buy

有没有办法知道这里出了什么问题?感谢您的帮助

此错误与预测IO API无关。您收到的错误消息显示已从连接池中提取连接,与服务器的连接已丢失。 误差是可再现的吗?你没有遇到网络问题吗?请检查组件之间的网络连接。
我刚刚试着在Mac w/Vagrant上安装了w/Python,一切都很好。

我想需要以下命令来解决这个错误。在VM内运行PIO eventserver或部署引擎时,需要指定“-ip 0.0.0.0”,以便从主机访问事件服务器和部署的引擎:

要运行eventserver,请执行以下操作: $pio事件服务器--ip 0.0.0.0

要部署引擎,请执行以下操作: $pio部署--ip 0.0.0.0