elasticsearch 无法连接
来源:1-1 python分布式爬虫打造搜索引擎简介
慕码人9386341
2017-05-30
我是win7, pycharm, python 3.5, 就是拿到代码然后运行main.py,尝试一下程序,遇到如下错误:
我还没有看教学视频,只是想先运行一下程序看一看。这和elasticsearch 版本有关么? 我的版本是 5.4.0, elasticsearch-dsl 5.3.0
是否还需要设置其他环境? 必须用virtual environment么?
File "C:\Users\Daniel Cai\AppData\Local\Programs\Python\Python35\lib\site-packages\elasticsearch\connection\http_urllib3.py", line 123, in perform_request
raise ConnectionError('N/A', str(e), e)
elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x0000000006177438>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x0000000006177438>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it)
1回答
-
bobby
2017-06-01
虚拟环境不是必须的, 你是否已经启动了elasticsearch, 启动方式我在课程中讲到过
00
相似问题