I followed the instructions at https://docs.sentry.io/server/installation/python/. Everything worked fine until the SENTRY_CONF=/etc/sentry sentry upgrade command.
This ist the Stacktrace:
(sentry) root@sentry:~# SENTRY_CONF=/etc/sentry sentry upgrade
Error in sys.excepthook:
Traceback (most recent call last):
File "/www/sentry/local/lib/python2.7/site-packages/raven/base.py", line 249, in handle_exception
self.captureException(exc_info=exc_info, level='fatal')
File "/www/sentry/local/lib/python2.7/site-packages/raven/base.py", line 781, in captureException
'raven.events.Exception', exc_info=exc_info, kwargs)
File "/www/sentry/local/lib/python2.7/site-packages/sentry/utils/raven.py", line 43, in capture
return super(SentryInternalClient, self).capture(args, *kwargs)
File "/www/sentry/local/lib/python2.7/site-packages/raven/contrib/django/client.py", line 284, in capture
result = super(DjangoClient, self).capture(event_type, **kwargs)
File "/www/sentry/local/lib/python2.7/site-packages/raven/base.py", line 610, in capture
self.send(data)
File "/www/sentry/local/lib/python2.7/site-packages/sentry/utils/raven.py", line 64, in send
from sentry.coreapi import ClientApiHelper
File "/www/sentry/local/lib/python2.7/site-packages/sentry/coreapi.py", line 28, in
from sentry import filters
File "/www/sentry/local/lib/python2.7/site-packages/sentry/filters/__init__.py", line 8, in
from .base import Filter # NOQA
File "/www/sentry/local/lib/python2.7/site-packages/sentry/filters/base.py", line 5, in
from sentry.models import ProjectOption
File "/www/sentry/local/lib/python2.7/site-packages/sentry/models/__init__.py", line 14, in
import_submodules(globals(), __name__, __path__)
File "/www/sentry/local/lib/python2.7/site-packages/sentry/utils/imports.py", line 52, in import_submodules
module = __import__(module_name, globals(), locals(), ['__name__'])
File "/www/sentry/local/lib/python2.7/site-packages/sentry/models/deploy.py", line 11, in
from sentry.app import locks
File "/www/sentry/local/lib/python2.7/site-packages/sentry/app.py", line 15, in
from sentry.utils.locking.backends.redis import RedisLockBackend
File "/www/sentry/local/lib/python2.7/site-packages/sentry/utils/locking/backends/redis.py", line 10, in
delete_lock = redis.load_script('utils/locking/delete_lock.lua')
File "/www/sentry/local/lib/python2.7/site-packages/sentry/utils/redis.py", line 145, in load_script
script = Script(None, resource_string('sentry', posixpath.join('scripts', path)))
File "/www/sentry/local/lib/python2.7/site-packages/redis/client.py", line 2930, in __init__
encoder = registered_client.connection_pool.get_encoder()
AttributeError: 'NoneType' object has no attribute 'connection_pool'
Original exception was:
Traceback (most recent call last):
File "/www/sentry/bin/sentry", line 11, in
sys.exit(main())
File "/www/sentry/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 160, in main
cli(prog_name=get_prog(), obj={}, max_content_width=100)
File "/www/sentry/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(args, *kwargs)
File "/www/sentry/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/www/sentry/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/www/sentry/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, *ctx.params)
File "/www/sentry/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(args, *kwargs)
File "/www/sentry/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, *kwargs)
File "/www/sentry/local/lib/python2.7/site-packages/sentry/runner/decorators.py", line 35, in inner
configure()
File "/www/sentry/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 123, in configure
configure(ctx, py, yaml, skip_service_validation)
File "/www/sentry/local/lib/python2.7/site-packages/sentry/runner/settings.py", line 152, in configure
skip_service_validation=skip_service_validation
File "/www/sentry/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 251, in initialize_app
apply_legacy_settings(settings)
File "/www/sentry/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 437, in apply_legacy_settings
url_prefix = options.get('system.url-prefix', silent=True)
File "/www/sentry/local/lib/python2.7/site-packages/sentry/options/manager.py", line 152, in get
result = self.store.get(opt, silent=silent)
File "/www/sentry/local/lib/python2.7/site-packages/sentry/options/store.py", line 72, in get
result = self.get_store(key, silent=silent)
File "/www/sentry/local/lib/python2.7/site-packages/sentry/options/store.py", line 164, in get_store
except self.model.DoesNotExist:
File "/www/sentry/local/lib/python2.7/site-packages/django/utils/functional.py", line 49, in __get__
res = instance.__dict__[self.func.__name__] = self.func(instance)
File "/www/sentry/local/lib/python2.7/site-packages/sentry/options/store.py", line 58, in model
from sentry.models.option import Option
File "/www/sentry/local/lib/python2.7/site-packages/sentry/models/__init__.py", line 14, in
import_submodules(globals(), __name__, __path__)
File "/www/sentry/local/lib/python2.7/site-packages/sentry/utils/imports.py", line 52, in import_submodules
module = __import__(module_name, globals(), locals(), ['__name__'])
File "/www/sentry/local/lib/python2.7/site-packages/sentry/models/deploy.py", line 11, in
from sentry.app import locks
File "/www/sentry/local/lib/python2.7/site-packages/sentry/app.py", line 15, in
from sentry.utils.locking.backends.redis import RedisLockBackend
File "/www/sentry/local/lib/python2.7/site-packages/sentry/utils/locking/backends/redis.py", line 10, in
delete_lock = redis.load_script('utils/locking/delete_lock.lua')
File "/www/sentry/local/lib/python2.7/site-packages/sentry/utils/redis.py", line 145, in load_script
script = Script(None, resource_string('sentry', posixpath.join('scripts', path)))
File "/www/sentry/local/lib/python2.7/site-packages/redis/client.py", line 2930, in __init__
encoder = registered_client.connection_pool.get_encoder()
AttributeError: 'NoneType' object has no attribute 'connection_pool'
Sentry Version: 8.19.0
Postgres Version: 9.6.4
Redis Version: 2.8.17
pythom version: 2.7
Host system: Debian 8.9
Let me know if you need some more information
This was caused by an upgrade in our Redis client driver that broke the way we load Redis scripts. There will be more details soon at GH-5915 (and work to track the fix will be centralized there as well.) In the meantime you can manually install a version that works via pip to get a compatible version:
pip install redis==2.10.5
For the record, the package seems to be redis, not redis-py: pip install redis==2.10.5
Oops, thanks for the correction — I've edited the comment above.
Ran into this; thanks for this issue.
Hi guys,
I am using AWS for Redis and I am not able to select that specific version. Is there anyone assigned to fixing that issue ?
Thank you
Most helpful comment
This was caused by an upgrade in our Redis client driver that broke the way we load Redis scripts. There will be more details soon at GH-5915 (and work to track the fix will be centralized there as well.) In the meantime you can manually install a version that works via
pipto get a compatible version: