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

sentry upgrade not working #5908

Closed
weatherhog opened this issue Aug 17, 2017 · 5 comments

Comments

@weatherhog
Copy link

@weatherhog weatherhog commented Aug 17, 2017

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

@tkaemming

This comment has been minimized.

Copy link
Member

@tkaemming tkaemming commented Aug 18, 2017

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
@tkaemming tkaemming closed this Aug 18, 2017
@BlackYoup

This comment has been minimized.

Copy link

@BlackYoup BlackYoup commented Aug 18, 2017

For the record, the package seems to be redis, not redis-py: pip install redis==2.10.5

@tkaemming

This comment has been minimized.

Copy link
Member

@tkaemming tkaemming commented Aug 18, 2017

Oops, thanks for the correction — I've edited the comment above.

@damm

This comment has been minimized.

Copy link

@damm damm commented Aug 23, 2017

Ran into this; thanks for this issue.

@vincent-dravert

This comment has been minimized.

Copy link

@vincent-dravert vincent-dravert commented Aug 28, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.