Scifabric / pybossa

PYBOSSA is the ultimate crowdsourcing framework (aka microtasking) to analyze or enrich data that can't be processed by machines alone.
http://pybossa.com
GNU Affero General Public License v3.0
745 stars 269 forks source link

redis set 104, 'Connection reset by peer' error #2021

Open yogeshdewangan opened 3 years ago

yogeshdewangan commented 3 years ago

INFO zta-automation-log:redis_utilities.py:15 Port forwarding to 6379 has been stopped INFO zta-automation-log:redis_utilities.py:28 Forwarding from 127.0.0.1:6379 -> 6379 INFO zta-automation-log:redis_utilities.py:29 Port forwarding to 6379 has been started ERROR zta-automation-log:redis_utilities.py:50 exception: Error while reading from socket: (104, 'Connection reset by peer') Traceback (most recent call last): File "/space/jenkins/venv-linux/lib/python3.6/site-packages/redis/connection.py", line 198, in _read_from_socket data = recv(self._sock, socket_read_size) File "/space/jenkins/venv-linux/lib/python3.6/site-packages/redis/_compat.py", line 72, in recv return sock.recv(*args, **kwargs) ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/space/jenkins/agent/workspace/ytics_Tests_analytics-charanjeet/AnalyticsBackend/utilities/redis_utilities.py", line 44, in modify_redis_key_business_hour existing_key_json = json.loads(rd.get("analytics*")) File "/space/jenkins/venv-linux/lib/python3.6/site-packages/redis/client.py", line 1606, in get return self.execute_command('GET', name) File "/space/jenkins/venv-linux/lib/python3.6/site-packages/redis/client.py", line 898, in execute_command conn = self.connection or pool.get_connection(command_name, **options) File "/space/jenkins/venv-linux/lib/python3.6/site-packages/redis/connection.py", line 1192, in get_connection connection.connect() File "/space/jenkins/venv-linux/lib/python3.6/site-packages/redis/connection.py", line 567, in connect self.on_connect() File "/space/jenkins/venv-linux/lib/python3.6/site-packages/redis/connection.py", line 643, in on_connect auth_response = self.read_response() File "/space/jenkins/venv-linux/lib/python3.6/site-packages/redis/connection.py", line 739, in read_response response = self._parser.read_response() File "/space/jenkins/venv-linux/lib/python3.6/site-packages/redis/connection.py", line 324, in read_response raw = self._buffer.readline() File "/space/jenkins/venv-linux/lib/python3.6/site-packages/redis/connection.py", line 256, in readline self._read_from_socket() File "/space/jenkins/venv-linux/lib/python3.6/site-packages/redis/connection.py", line 223, in _read_from_socket (ex.args,)) redis.exceptions.ConnectionError: Error while reading from socket: (104, 'Connection reset by peer')

python code rd = redis.Redis(host="localhost", port=6379, password=redis_password) existing_key_json = json.loads(rd.get("analytics*")) time.sleep(5) rd.set(key, json.dumps(json_value))

teleyinex commented 3 years ago

Can you provide more information. Was the redis server running? I mean, could it be that redis rejected the connection?