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

Janitor crashes if it cannot connect to Redis #17

Open
willgraf opened this issue May 29, 2019 · 2 comments
Open

Janitor crashes if it cannot connect to Redis #17

willgraf opened this issue May 29, 2019 · 2 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@willgraf
Copy link
Contributor

willgraf commented May 29, 2019

Encountered the following error during kiosk startup (Redis is not yet ready I assume)

[2019-05-29 22:26:23,598]:[INFO]:[clean-redis.py]: Janitor Initialized.
[2019-05-29 22:26:24,614]:[CRITICAL]:[clean-redis.py]: Fatal Error: ConnectionError: Error 111 connecting to redis-master:6379. Connection refused.
[2019-05-29 22:26:24,618]:[CRITICAL]:[clean-redis.py]: Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line 492, in connect
    sock = self._connect()
  File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line 550, in _connect
    raise err
  File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line 538, 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 "clean-redis.py", line 112, in <module>
    janitor.clean()
  File "/usr/src/app/redis_janitor/janitors.py", line 234, in clean
    for q in self.get_processing_keys(count=100):
  File "/usr/local/lib/python3.6/site-packages/redis/client.py", line 1767, in scan_iter
    cursor, data = self.scan(cursor=cursor, match=match, count=count)
  File "/usr/local/lib/python3.6/site-packages/redis/client.py", line 1754, in scan
    return self.execute_command('SCAN', *pieces)
  File "/usr/local/lib/python3.6/site-packages/redis/client.py", line 772, in execute_command
    connection = pool.get_connection(command_name, **options)
  File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line 994, in get_connection
    connection.connect()
  File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line 497, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to redis-master:6379. Connection refused.

/usr/local/lib/python3.6/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.2) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)

Update: The RequestsDependencyWarning is caused by conflicting versions inside the kubernetes 9.0.0 install.

@willgraf
Copy link
Contributor Author

I think this is related to #5

@willgraf
Copy link
Contributor Author

The cause of this issue is that the SCAN_ITER call does not get wrapped inside the retry loop. I believe this has to do with the generator function itself (so a faulty wrapping job inside the redis client).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant