pymongo.errors.ServerSelectionTimeoutError: 192.168.1.101:27017: [WinError 10061] 由于目标计算机积极拒绝,无法连接。可我明明开启mongodb服务了的,而且在可视化软件里面也能看到别的数据库,这是怎么回事呢?
['douban.pipelines.DoubanPipeline']
2019-04-11 17:34:06 [scrapy.core.engine] INFO: Spider opened
2019-04-11 17:34:06 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2019-04-11 17:34:06 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6023
2019-04-11 17:34:06 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://movie.douban.com/top250> (referer: None)
2019-04-11 17:34:36 [scrapy.core.scraper] ERROR: Error processing {'describe': '希望让人自由。',
'evaluate': '1387301人评价',
'introduce': '1994/美国/犯罪剧情',
'movie_name': '肖申克的救赎',
'serial_number': '1',
'star': '9.6'}
Traceback (most recent call last):
File "E:\python\lib\site-packages\twisted\internet\defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "C:\Users\star\douban\douban\pipelines.py", line 24, in process_item
self.post.insert(data)
File "E:\python\lib\site-packages\pymongo\collection.py", line 3161, in insert
check_keys, manipulate, write_concern)
File "E:\python\lib\site-packages\pymongo\collection.py", line 607, in _insert
bypass_doc_val, session)
File "E:\python\lib\site-packages\pymongo\collection.py", line 595, in _insert_one
acknowledged, _insert_command, session)
File "E:\python\lib\site-packages\pymongo\mongo_client.py", line 1247, in _retryable_write
with self._tmp_session(session) as s:
File "E:\python\lib\contextlib.py", line 81, in __enter__
return next(self.gen)
File "E:\python\lib\site-packages\pymongo\mongo_client.py", line 1576, in _tmp_session
s = self._ensure_session(session)
File "E:\python\lib\site-packages\pymongo\mongo_client.py", line 1563, in _ensure_session
return self.__start_session(True, causal_consistency=False)
File "E:\python\lib\site-packages\pymongo\mongo_client.py", line 1516, in __start_session
server_session = self._get_server_session()
File "E:\python\lib\site-packages\pymongo\mongo_client.py", line 1549, in _get_server_session
return self._topology.get_server_session()
File "E:\python\lib\site-packages\pymongo\topology.py", line 427, in get_server_session
None)
File "E:\python\lib\site-packages\pymongo\topology.py", line 199, in _select_servers_loop
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: 192.168.1.101:27017: [WinError 10061] 由于目标计算机积极拒绝,无法连接。