Я запускаю свой Redis в качестве Docker Контейнера
docker run --name redis_env --hostname redis \
-p 6379:6379 \
-v $PWD/DBVOL/redis/data:/data:rw \
--privileged=true \
-d redis redis-server
Я могу подключить мой сервер Redis через Redis Desktop Manager
![enter image description here](https://i.stack.imgur.com/XByAR.png)
Но когда scrapy-redis хочет подключиться к серверу, он отказывается с кодом ошибки 111
.Вот мои настройки.py:
# Set up Redis Server
REDIS_URL = 'redis://127.0.0.1:6379/0'
# Enable scheduler stores requested queues
SCHEDULER = 'scrapy_redis.scheduler.Scheduler'
# Ensure all scraper share same duplicates filter through redis
DUPEFILTER_CLASS = 'scrapy_redis.dupefilter.RFPDupeFilter'
# Don't cleanup redis queues
SCHEDULER_PERSIST = True
# Configure item pipelines
# See https://doc.scrapy.org/en/latest/topics/item-pipeline.html
ITEM_PIPELINES = {
#'GeoCrawler.pipelines.GeocrawlerPipeline': 300,
'scrapy_redis.pipelines.RedisPipeline': 300
}
Вот отладочное сообщение:
![enter image description here](https://i.stack.imgur.com/FmnDN.png)
Что с ним не так?
Кстати, я могу успешно подключиться с консоли Python:
>>>import redis
>>>redis.Connection("redis://localhost:6379/0")
Connection<host=redis://localhost:6379/0,port=6379,db=0>