Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yogeshdewangan opened this issue Mar 3, 2021 · 1 comment
Open

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

yogeshdewangan opened this issue Mar 3, 2021 · 1 comment

Comments

@yogeshdewangan
Copy link

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants