Locate Task Fails with Redis Connection Error
Closed this issue · 2 comments
dwmcqueen commented
I am using the latest deployment script which, I believe, uses RabbitMQ. However, on running the Locate task, I get the following error:
INFO 2018-01-12 16:22:57,615 | Start task "Locate", id=10
INFO 2018-01-12 16:22:57,622 | Deleted 0 RatioUsage objects
INFO 2018-01-12 16:22:57,625 | Deleted 0 TextUnitTag(tag=ratio)
INFO 2018-01-12 16:22:57,628 | Deleted 0 CurrencyUsage objects
INFO 2018-01-12 16:22:57,631 | Deleted 0 TextUnitTag(tag=currency)
INFO 2018-01-12 16:22:57,634 | Deleted 0 AmountUsage objects
INFO 2018-01-12 16:22:57,636 | Deleted 0 TextUnitTag(tag=amount)
INFO 2018-01-12 16:22:57,639 | Deleted 0 UrlUsage objects
INFO 2018-01-12 16:22:57,642 | Deleted 0 TextUnitTag(tag=url)
INFO 2018-01-12 16:22:57,644 | Deleted 0 CopyrightUsage objects
INFO 2018-01-12 16:22:57,647 | Deleted 0 TextUnitTag(tag=copyright)
INFO 2018-01-12 16:22:57,650 | Deleted 0 PercentUsage objects
INFO 2018-01-12 16:22:57,654 | Deleted 0 TextUnitTag(tag=percent)
INFO 2018-01-12 16:22:57,657 | Deleted 0 DefinitionUsage objects
INFO 2018-01-12 16:22:57,659 | Deleted 0 TextUnitTag(tag=definition)
INFO 2018-01-12 16:22:57,662 | Deleted 0 GeoEntityUsage objects
INFO 2018-01-12 16:22:57,665 | Deleted 0 GeoAliasUsage objects
INFO 2018-01-12 16:22:57,667 | Deleted 0 TextUnitTag(tag=geoentity)
INFO 2018-01-12 16:22:57,670 | Deleted 0 CourtUsage objects
INFO 2018-01-12 16:22:57,673 | Deleted 0 TextUnitTag(tag=court)
INFO 2018-01-12 16:22:57,675 | Deleted 0 TermUsage objects
INFO 2018-01-12 16:22:57,678 | Deleted 0 TextUnitTag(tag=term)
INFO 2018-01-12 16:22:57,681 | Deleted 0 CitationUsage objects
INFO 2018-01-12 16:22:57,683 | Deleted 0 TextUnitTag(tag=citation)
INFO 2018-01-12 16:22:57,686 | Deleted 0 PartyUsage objects
INFO 2018-01-12 16:22:57,689 | Deleted 0 TextUnitTag(tag=party)
INFO 2018-01-12 16:22:57,691 | Deleted 0 TrademarkUsage objects
INFO 2018-01-12 16:22:57,694 | Deleted 0 TextUnitTag(tag=trademark)
INFO 2018-01-12 16:22:57,697 | Deleted 0 DistanceUsage objects
INFO 2018-01-12 16:22:57,699 | Deleted 0 TextUnitTag(tag=distance)
INFO 2018-01-12 16:22:57,702 | Deleted 0 DateDurationUsage objects
INFO 2018-01-12 16:22:57,705 | Deleted 0 TextUnitTag(tag=duration)
INFO 2018-01-12 16:22:57,708 | Deleted 0 DateUsage objects
INFO 2018-01-12 16:22:57,711 | Deleted 0 TextUnitTag(tag=date)
INFO 2018-01-12 16:22:57,714 | Deleted 0 RegulationUsage objects
INFO 2018-01-12 16:22:57,717 | Deleted 0 TextUnitTag(tag=regulation)
INFO 2018-01-12 16:22:57,931 | Run location of [ratio; amount; currency; copyright; percent; definition; geoentity; citation; term; party; court; trademark; distance; regulation; duration; date; url].
INFO 2018-01-12 16:22:57,933 | Locate in [paragraphs].
INFO 2018-01-12 16:22:57,948 | Found 12750 Text Units. Added 12750 subtasks.
ERROR 2018-01-12 16:22:57,950 | ERROR
ERROR 2018-01-12 16:22:57,953 | ConnectionError: Error 111 connecting to 127.0.0.1:6379. Connection refused.
ERROR 2018-01-12 16:22:57,955 | Traceback (most recent call last):
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 484, in connect
sock = self._connect()
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 541, in _connect
raise err
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 529, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/ve/lib/python3.5/site-packages/redis/client.py", line 667, in execute_command
connection.send_command(*args)
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 610, in send_command
self.send_packed_command(self.pack_command(*args))
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 585, in send_packed_command
self.connect()
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 489, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to 127.0.0.1:6379. Connection refused.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 484, in connect
sock = self._connect()
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 541, in _connect
raise err
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 529, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/lexpredict-contraxsuite/contraxsuite_services/apps/task/tasks.py", line 208, in run
self.process(**kwargs)
File "/opt/lexpredict-contraxsuite/contraxsuite_services/apps/task/tasks.py", line 760, in process
transfer.put(key=locate_cache_key, value=locate)
File "/opt/lexpredict-contraxsuite/contraxsuite_services/apps/common/advancedcelery/transfer.py", line 162, in put
self._del_non_active_from_redis([key, *active_keys])
File "/opt/lexpredict-contraxsuite/contraxsuite_services/apps/common/advancedcelery/transfer.py", line 123, in _del_non_active_from_redis
redis_keys = self._get_active_keys_from_storage()
File "/opt/lexpredict-contraxsuite/contraxsuite_services/apps/common/advancedcelery/transfer.py", line 114, in _get_active_keys_from_storage
return [bb.decode('utf-8') for bb in self._redis.keys(TransferManager._full_key('*'))]
File "/opt/ve/lib/python3.5/site-packages/redis/client.py", line 1032, in keys
return self.execute_command('KEYS', pattern)
File "/opt/ve/lib/python3.5/site-packages/redis/client.py", line 673, in execute_command
connection.send_command(*args)
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 610, in send_command
self.send_packed_command(self.pack_command(*args))
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 585, in send_packed_command
self.connect()
File "/opt/ve/lib/python3.5/site-packages/redis/connection.py", line 489, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to 127.0.0.1:6379. Connection refused.
INFO 2018-01-12 16:22:57,960 | End of main task "Locate", id=10
INFO 2018-01-12 16:22:57,965 | There are 12750 uncompleted subtasks remaining. Please wait.
I believe it looks like it is trying to connect to redis instead.
dwmcqueen commented
This may be an issue with the deploy script not installing redis server.
However, is redis necessary or should rabbitmq suffice?
dwmcqueen commented
Fixed with recent addition to deploy script to install redis.