/home/sentry/sentry_app/bin/sentry upgrade + error

[sentry@sentry ~]$ /home/sentry/sentry_app/bin/sentry upgrade
12:52:56 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
12:52:59 [INFO] sentry.plugins.github: apps-not-configured
Operations to perform:
Apply all migrations: admin, auth, contenttypes, jira_ac, nodestore, sentry, sessions, sites, social_auth
Running migrations:
Applying sentry.0061_alertrule_partial_index…Traceback (most recent call last):
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/decorators.py”, line 91, in inner
return func(self, sql, *args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/base.py”, line 76, in execute
return self.cursor.execute(sql)
psycopg2.ProgrammingError: syntax error at or near “NOT”
LINE 2: … CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS…
^

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/backends/utils.py”, line 62, in execute
return self.cursor.execute(sql)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/decorators.py”, line 77, in inner
raise_the_exception(self.db, e)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/decorators.py”, line 75, in inner
return func(self, *args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/decorators.py”, line 18, in inner
return func(self, *args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/decorators.py”, line 95, in inner
raise exc_info0.with_traceback(exc_info[2])
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/decorators.py”, line 91, in inner
return func(self, sql, *args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/base.py”, line 76, in execute
return self.cursor.execute(sql)
psycopg2.ProgrammingError: ProgrammingError(‘syntax error at or near “NOT”\nLINE 2: … CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS…\n ^\n’,)
SQL:
CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS sentry_alertrule_status_active
ON sentry_alertrule USING btree (organization_id, name, status)
WHERE status = 0;

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/home/sentry/sentry_app/bin/sentry”, line 8, in
sys.exit(main())
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/runner/init.py”, line 195, in main
func(**kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/sentry/sentry_app/lib/python3.6/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/runner/decorators.py”, line 29, in inner
return ctx.invoke(f, *args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/runner/commands/upgrade.py”, line 171, in upgrade
_upgrade(not noinput, traceback, verbosity, not no_repair, with_nodestore)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/runner/commands/upgrade.py”, line 127, in _upgrade
ignore_ghost_migrations=True,
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/core/management/init.py”, line 131, in call_command
return command.execute(*args, **defaults)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/core/management/base.py”, line 330, in execute
output = self.handle(*args, **options)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/core/management/commands/migrate.py”, line 204, in handle
fake_initial=fake_initial,
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/migrations/executor.py”, line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/migrations/executor.py”, line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/new_migrations/monkey/executor.py”, line 23, in apply_migration
return super().apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/migrations/executor.py”, line 244, in apply_migration
state = migration.apply(state, schema_editor)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/migrations/migration.py”, line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/migrations/operations/special.py”, line 44, in database_forwards
database_operation.database_forwards(app_label, schema_editor, from_state, to_state)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/migrations/operations/special.py”, line 108, in database_forwards
self._run_sql(schema_editor, self.sql)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/migrations/operations/special.py”, line 133, in _run_sql
schema_editor.execute(statement, params=None)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/backends/base/schema.py”, line 136, in execute
cursor.execute(sql, params)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry_sdk/integrations/django/init.py”, line 499, in execute
return real_execute(self, sql, params)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/utils.py”, line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/utils/six.py”, line 685, in reraise
raise value.with_traceback(tb)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/django/db/backends/utils.py”, line 62, in execute
return self.cursor.execute(sql)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/decorators.py”, line 77, in inner
raise_the_exception(self.db, e)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/decorators.py”, line 75, in inner
return func(self, *args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/decorators.py”, line 18, in inner
return func(self, *args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/decorators.py”, line 95, in inner
raise exc_info0.with_traceback(exc_info[2])
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/decorators.py”, line 91, in inner
return func(self, sql, *args, **kwargs)
File “/home/sentry/sentry_app/lib/python3.6/site-packages/sentry/db/postgres/base.py”, line 76, in execute
return self.cursor.execute(sql)
django.db.utils.ProgrammingError: ProgrammingError(‘syntax error at or near “NOT”\nLINE 2: … CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS…\n ^\n’,)
SQL:
CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS sentry_alertrule_status_active
ON sentry_alertrule USING btree (organization_id, name, status)
WHERE status = 0;

[sentry@sentry ~]$

I am also facing the same issue while installing/configuring Sentry in Centos 7

Please help…

Any help would be appreciated.

Seems like you are not using our recommended way of installing sentry: GitHub - getsentry/onpremise: Sentry On-Premise setup

Can you try that way?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.