getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
39.17k stars 4.2k forks source link

new install failed to create initial project #2928

Closed tsabi closed 8 years ago

tsabi commented 8 years ago

Hi, i just installed sentry (via pip install command), and it failed to create initial database items. It throws error "[ERROR] Internal project (id=1) does not exist" or "[ERROR] Unable to fetch ProjectKey for internal project". Both tables are empty.

Please help how can i create these records! Thanks in advance!

dcramer commented 8 years ago

You should consider recreating the db and identify why it failed. Otherwise you will have to reconfigure the default project.

tsabi commented 8 years ago

Hi!

Because this is a fresh install no problem to drop the database. So please find below the full output.

I needed to run custom sql codes to correct the errors (the first corrects the first error, etc.):

ALTER TABLE "sentry_authprovider" ALTER COLUMN "config" TYPE jsonb USING config::jsonb, ALTER COLUMN "config" DROP NOT NULL, ALTER COLUMN "config" DROP DEFAULT;

ALTER TABLE "sentry_authidentity" ALTER COLUMN "data" TYPE jsonb USING data::jsonb, ALTER COLUMN "data" DROP NOT NULL, ALTER COLUMN "data" DROP DEFAULT;

ALTER TABLE "sentry_file" ALTER COLUMN "storage_options" TYPE jsonb USING storage_options::jsonb, ALTER COLUMN "storage_options" DROP NOT NULL, ALTER COLUMN "storage_options" DROP DEFAULT;
root@c16:/opt/sentry# SENTRY_CONF=/opt/sentry/etc /opt/sentry/bin/sentry upgrade
Syncing...
Creating tables ...
Creating table django_admin_log
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table south_migrationhistory
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.admin
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.messages
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.staticfiles
 > captcha
 > crispy_forms
 > debug_toolbar
 > raven.contrib.django.raven_compat
 > rest_framework
 > sentry.plugins.sentry_interface_types
 > sentry.plugins.sentry_mail
 > sentry.plugins.sentry_urls
 > sentry.plugins.sentry_useragents
 > sentry.plugins.sentry_webhooks
 > south
 > sudo

Not synced (use migrations):
 - sentry
 - sentry.nodestore
 - sentry.search
 - social_auth
(use ./manage.py migrate to migrate these)
Running migrations for sentry:
 - Migrating forwards to 0240_fill_onboarding_option.
 > sentry:0001_initial
 > sentry:0002_auto__del_field_groupedmessage_url__chg_field_groupedmessage_view__chg
 > sentry:0003_auto__add_field_message_group__del_field_groupedmessage_server_name
 > sentry:0004_auto__add_filtervalue__add_unique_filtervalue_key_value
 > sentry:0005_auto
 > sentry:0006_auto
 > sentry:0007_auto__add_field_message_site
 > sentry:0008_auto__chg_field_message_view__add_field_groupedmessage_data__chg_field
 > sentry:0009_auto__add_field_message_message_id
 > sentry:0010_auto__add_messageindex__add_unique_messageindex_column_value_object_id
 > sentry:0011_auto__add_field_groupedmessage_score
 > sentry:0012_auto
 > sentry:0013_auto__add_messagecountbyminute__add_unique_messagecountbyminute_group_
 > sentry:0014_auto
 > sentry:0014_auto__add_project__add_projectmember__add_unique_projectmember_project
 > sentry:0015_auto__add_field_message_project__add_field_messagecountbyminute_projec
 > sentry:0016_auto__add_field_projectmember_is_superuser
 > sentry:0017_auto__add_field_projectmember_api_key
 > sentry:0018_auto__chg_field_project_owner
 > sentry:0019_auto__del_field_projectmember_api_key__add_field_projectmember_public_
 > sentry:0020_auto__add_projectdomain__add_unique_projectdomain_project_domain
 > sentry:0021_auto__del_message__del_groupedmessage__del_unique_groupedmessage_proje
 > sentry:0022_auto__del_field_group_class_name__del_field_group_traceback__del_field
 > sentry:0023_auto__add_field_event_time_spent
 > sentry:0024_auto__add_field_group_time_spent_total__add_field_group_time_spent_cou
 > sentry:0025_auto__add_field_messagecountbyminute_time_spent_total__add_field_messa
 > sentry:0026_auto__add_field_project_status
 > sentry:0027_auto__chg_field_event_server_name
 > sentry:0028_auto__add_projectoptions__add_unique_projectoptions_project_key_value
 > sentry:0029_auto__del_field_projectmember_is_superuser__del_field_projectmember_pe
 > sentry:0030_auto__add_view__chg_field_event_group
 > sentry:0031_auto__add_field_view_verbose_name__add_field_view_verbose_name_plural_
 > sentry:0032_auto__add_eventmeta
 > sentry:0033_auto__add_option__add_unique_option_key_value
 > sentry:0034_auto__add_groupbookmark__add_unique_groupbookmark_project_user_group
 > sentry:0034_auto__add_unique_option_key__del_unique_option_value_key__del_unique_g
 > sentry:0036_auto__chg_field_option_value__chg_field_projectoption_value
 > sentry:0037_auto__add_unique_option_key__del_unique_option_value_key__del_unique_g
 > sentry:0038_auto__add_searchtoken__add_unique_searchtoken_document_field_token__ad
 > sentry:0039_auto__add_field_searchdocument_status
 > sentry:0040_auto__del_unique_event_event_id__add_unique_event_project_event_id
 > sentry:0041_auto__add_field_messagefiltervalue_last_seen__add_field_messagefilterv
 > sentry:0042_auto__add_projectcountbyminute__add_unique_projectcountbyminute_projec
 > sentry:0043_auto__chg_field_option_value__chg_field_projectoption_value
 > sentry:0044_auto__add_field_projectmember_is_active
 > sentry:0045_auto__add_pendingprojectmember__add_unique_pendingprojectmember_projec
 > sentry:0046_auto__add_teammember__add_unique_teammember_team_user__add_team__add_p
 > sentry:0047_migrate_project_slugs
 > sentry:0048_migrate_project_keys
 > sentry:0049_create_default_project_keys
 > sentry:0050_remove_project_keys_from_members
 > sentry:0051_auto__del_pendingprojectmember__del_unique_pendingprojectmember_projec
 > sentry:0052_migrate_project_members
 > sentry:0053_auto__del_projectmember__del_unique_projectmember_project_user
 > sentry:0054_fix_project_keys
 > sentry:0055_auto__del_projectdomain__del_unique_projectdomain_project_domain
 > sentry:0056_auto__add_field_group_resolved_at
 > sentry:0057_auto__add_field_group_active_at
 > sentry:0058_auto__add_useroption__add_unique_useroption_user_project_key
 > sentry:0059_auto__add_filterkey__add_unique_filterkey_project_key
 > sentry:0060_fill_filter_key
 > sentry:0061_auto__add_field_group_group_id__add_field_group_is_public
 > sentry:0062_correct_del_index_sentry_groupedmessage_logger__view__checksum
 > sentry:0063_auto
 > sentry:0064_index_checksum
 > sentry:0065_create_default_project_key
 > sentry:0066_auto__del_view
 > sentry:0067_auto__add_field_group_platform__add_field_event_platform
 > sentry:0068_auto__add_field_projectkey_user_added__add_field_projectkey_date_added
 > sentry:0069_auto__add_lostpasswordhash
 > sentry:0070_projectoption_key_length
 > sentry:0071_auto__add_field_group_users_seen
 > sentry:0072_auto__add_affecteduserbygroup__add_unique_affecteduserbygroup_project_
 > sentry:0073_auto__add_field_project_platform
 > sentry:0074_correct_filtervalue_index
 > sentry:0075_add_groupbookmark_index
 > sentry:0076_add_groupmeta_index
 > sentry:0077_auto__add_trackeduser__add_unique_trackeduser_project_ident
 > sentry:0078_auto__add_field_affecteduserbygroup_tuser
 > sentry:0079_auto__del_unique_affecteduserbygroup_project_ident_group__add_unique_a
 > sentry:0080_auto__chg_field_affecteduserbygroup_ident
 > sentry:0081_fill_trackeduser
 > sentry:0082_auto__add_activity__add_field_group_num_comments__add_field_event_num_
 > sentry:0083_migrate_dupe_groups
 > sentry:0084_auto__del_unique_group_project_checksum_logger_culprit__add_unique_gro
 > sentry:0085_auto__del_unique_project_slug__add_unique_project_slug_team
 > sentry:0086_auto__add_field_team_date_added
 > sentry:0087_auto__del_messagefiltervalue__del_unique_messagefiltervalue_project_ke
 > sentry:0088_auto__del_messagecountbyminute__del_unique_messagecountbyminute_projec
 > sentry:0089_auto__add_accessgroup__add_unique_accessgroup_team_name
 > sentry:0090_auto__add_grouptagkey__add_unique_grouptagkey_project_group_key__add_f
 > sentry:0091_auto__add_alert
 > sentry:0092_auto__add_alertrelatedgroup__add_unique_alertrelatedgroup_group_alert
 > sentry:0093_auto__add_field_alert_status
 > sentry:0094_auto__add_eventmapping__add_unique_eventmapping_project_event_id
 > sentry:0095_rebase
 > sentry:0096_auto__add_field_tagvalue_data
 > sentry:0097_auto__del_affecteduserbygroup__del_unique_affecteduserbygroup_project_
 > sentry:0098_auto__add_user__chg_field_team_owner__chg_field_activity_user__chg_fie
 > sentry:0099_auto__del_field_teammember_is_active
 > sentry:0100_auto__add_field_tagkey_label
 > sentry:0101_ensure_teams
 > sentry:0102_ensure_slugs
 > sentry:0103_ensure_non_empty_slugs
 > sentry:0104_auto__add_groupseen__add_unique_groupseen_group_user
 > sentry:0105_auto__chg_field_projectcountbyminute_time_spent_total__chg_field_group
 > sentry:0106_auto__del_searchtoken__del_unique_searchtoken_document_field_token__de
 > sentry:0107_expand_user
 > sentry:0108_fix_user
 > sentry:0109_index_filtervalue_times_seen
 > sentry:0110_index_filtervalue_last_seen
 > sentry:0111_index_filtervalue_first_seen
 > sentry:0112_auto__chg_field_option_value__chg_field_useroption_value__chg_field_pr
 > sentry:0113_auto__add_field_team_status
 > sentry:0114_auto__add_field_projectkey_roles
 > sentry:0115_auto__del_projectcountbyminute__del_unique_projectcountbyminute_projec
 > sentry:0116_auto__del_field_event_server_name__del_field_event_culprit__del_field_
 > sentry:0117_auto__add_rule
 > sentry:0118_create_default_rules
 > sentry:0119_auto__add_field_projectkey_label
 > sentry:0120_auto__add_grouprulestatus
 > sentry:0121_auto__add_unique_grouprulestatus_rule_group
 > sentry:0122_add_event_group_id_datetime_index
 > sentry:0123_auto__add_groupassignee__add_index_event_group_datetime
 > sentry:0124_auto__add_grouphash__add_unique_grouphash_project_hash
 > sentry:0125_auto__add_field_user_is_managed
 > sentry:0126_auto__add_field_option_last_updated
 > sentry:0127_auto__add_release__add_unique_release_project_version
 > sentry:0128_auto__add_broadcast
 > sentry:0129_auto__chg_field_release_id__chg_field_pendingteammember_id__chg_field_
 > sentry:0130_auto__del_field_project_owner
 > sentry:0131_auto__add_organizationmember__add_unique_organizationmember_organizati
 > sentry:0132_add_default_orgs
 > sentry:0133_add_org_members
 > sentry:0134_auto__chg_field_team_organization
 > sentry:0135_auto__chg_field_project_team
 > sentry:0136_auto__add_field_organizationmember_email__chg_field_organizationmember
 > sentry:0137_auto__add_field_organizationmember_has_global_access
 > sentry:0138_migrate_team_members
 > sentry:0139_auto__add_auditlogentry
 > sentry:0140_auto__add_field_organization_slug
 > sentry:0141_fill_org_slugs
 > sentry:0142_auto__add_field_project_organization__add_unique_project_organization_
 > sentry:0143_fill_project_orgs
 > sentry:0144_auto__chg_field_project_organization
 > sentry:0145_auto__chg_field_organization_slug
 > sentry:0146_auto__add_field_auditlogentry_ip_address
 > sentry:0147_auto__del_unique_team_slug__add_unique_team_organization_slug
 > sentry:0148_auto__add_helppage
 > sentry:0149_auto__chg_field_groupseen_project__chg_field_groupseen_user__chg_field
 > sentry:0150_fix_broken_rules
 > sentry:0151_auto__add_file
 > sentry:0152_auto__add_field_file_checksum__chg_field_file_name__add_unique_file_na
 > sentry:0153_auto__add_field_grouprulestatus_last_active
 > sentry:0154_auto__add_field_tagkey_status
 > sentry:0155_auto__add_field_projectkey_status
 > sentry:0156_auto__add_apikey
 > sentry:0157_auto__add_authidentity__add_unique_authidentity_auth_provider_ident__a
 > sentry:0158_auto__add_unique_authidentity_auth_provider_user
 > sentry:0159_auto__add_field_authidentity_last_verified__add_field_organizationmemb
 > sentry:0160_auto__add_field_authprovider_default_global_access
 > sentry:0161_auto__chg_field_authprovider_config
FATAL ERROR - The following SQL query failed: ALTER TABLE "sentry_authprovider" ALTER COLUMN "config" TYPE jsonb, ALTER COLUMN "config" DROP NOT NULL, ALTER COLUMN "config" DROP DEFAULT;
The error was: column "config" cannot be cast automatically to type jsonb
HINT:  You might need to specify "USING config::jsonb".

SQL: ALTER TABLE "sentry_authprovider" ALTER COLUMN "config" TYPE jsonb, ALTER COLUMN "config" DROP NOT NULL, ALTER COLUMN "config" DROP DEFAULT;
Error in migration: sentry:0161_auto__chg_field_authprovider_config
[ERROR] Failed processing signal create_default_projects
Traceback (most recent call last):
  File "/opt/sentry/lib/python2.7/site-packages/sentry/receivers/core.py", line 31, in wrapped
    return func(*args, **kwargs)
  File "/opt/sentry/lib/python2.7/site-packages/sentry/receivers/core.py", line 46, in create_default_projects
    verbosity=verbosity,
  File "/opt/sentry/lib/python2.7/site-packages/sentry/receivers/core.py", line 70, in create_default_project
    'name': 'Sentry',
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/manager.py", line 154, in get_or_create
    return self.get_queryset().get_or_create(**kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 376, in get_or_create
    return self.get(**lookup), False
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 304, in get
    num = len(clone)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 77, in __len__
    self._fetch_all()
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 857, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    raise_the_exception(self.db, e)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 73, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 21, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
    six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 88, in inner
    return func(self, sql, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 44, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: column sentry_organization.default_role does not exist
LINE 1: ...on"."status", "sentry_organization"."date_added", "sentry_or...
                                                             ^

SQL: SELECT "sentry_organization"."id", "sentry_organization"."name", "sentry_organization"."slug", "sentry_organization"."status", "sentry_organization"."date_added", "sentry_organization"."default_role", "sentry_organization"."flags" FROM "sentry_organization" WHERE "sentry_organization"."slug" = %s
[ERROR] Unable to fetch internal project
Traceback (most recent call last):
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/utils/raven.py", line 59, in send
    project = Project.objects.get_from_cache(id=settings.SENTRY_PROJECT)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/models/manager.py", line 259, in get_from_cache
    result = self.get(**kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/manager.py", line 151, in get
    return self.get_queryset().get(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 304, in get
    num = len(clone)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 77, in __len__
    self._fetch_all()
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 857, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    raise_the_exception(self.db, e)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 73, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 21, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
    six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 88, in inner
    return func(self, sql, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 44, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: column sentry_project.first_event does not exist
LINE 1: ...project"."date_added", "sentry_project"."status", "sentry_pr...
                                                             ^

SQL: SELECT "sentry_project"."id", "sentry_project"."slug", "sentry_project"."name", "sentry_project"."organization_id", "sentry_project"."team_id", "sentry_project"."public", "sentry_project"."date_added", "sentry_project"."status", "sentry_project"."first_event" FROM "sentry_project" WHERE "sentry_project"."id" = %s

Would you like to create a user account now? [Y/n]: n

Run `sentry createuser` to do this later.

[ERROR] Unable to fetch internal project
Traceback (most recent call last):
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/utils/raven.py", line 59, in send
    project = Project.objects.get_from_cache(id=settings.SENTRY_PROJECT)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/models/manager.py", line 259, in get_from_cache
    result = self.get(**kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/manager.py", line 151, in get
    return self.get_queryset().get(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 304, in get
    num = len(clone)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 77, in __len__
    self._fetch_all()
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 857, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    raise_the_exception(self.db, e)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 73, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 21, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
    six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 88, in inner
    return func(self, sql, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 44, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: column sentry_project.first_event does not exist
LINE 1: ...project"."date_added", "sentry_project"."status", "sentry_pr...
                                                             ^

SQL: SELECT "sentry_project"."id", "sentry_project"."slug", "sentry_project"."name", "sentry_project"."organization_id", "sentry_project"."team_id", "sentry_project"."public", "sentry_project"."date_added", "sentry_project"."status", "sentry_project"."first_event" FROM "sentry_project" WHERE "sentry_project"."id" = %s
[ERROR] Unable to fetch internal project
Traceback (most recent call last):
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/utils/raven.py", line 59, in send
    project = Project.objects.get_from_cache(id=settings.SENTRY_PROJECT)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/models/manager.py", line 259, in get_from_cache
    result = self.get(**kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/manager.py", line 151, in get
    return self.get_queryset().get(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 304, in get
    num = len(clone)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 77, in __len__
    self._fetch_all()
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 857, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    raise_the_exception(self.db, e)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 73, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 21, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
    six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 88, in inner
    return func(self, sql, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 44, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: column sentry_project.first_event does not exist
LINE 1: ...project"."date_added", "sentry_project"."status", "sentry_pr...
                                                             ^

SQL: SELECT "sentry_project"."id", "sentry_project"."slug", "sentry_project"."name", "sentry_project"."organization_id", "sentry_project"."team_id", "sentry_project"."public", "sentry_project"."date_added", "sentry_project"."status", "sentry_project"."first_event" FROM "sentry_project" WHERE "sentry_project"."id" = %s
Traceback (most recent call last):
  File "/opt/sentry/bin/sentry", line 11, in <module>
    sys.exit(main())
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 147, in main
    cli(prog_name=get_prog(), obj={}, max_content_width=100)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/runner/decorators.py", line 26, in inner
    return ctx.invoke(f, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/runner/commands/upgrade.py", line 37, in upgrade
    verbosity=verbosity,
  File "/opt/sentry/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 159, in call_command
    return klass.execute(*args, **defaults)
  File "/opt/sentry/local/lib/python2.7/site-packages/raven/contrib/django/management/__init__.py", line 41, in new_execute
    return original_func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/management/commands/migrate.py", line 111, in handle
    ignore_ghosts = ignore_ghosts,
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/__init__.py", line 220, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 256, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 331, in migrate_many
    result = self.migrate(migration, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 133, in migrate
    result = self.run(migration, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 114, in run
    return self.run_migration(migration, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 84, in run_migration
    migration_function()
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 60, in <lambda>
    return (lambda: direction(orm))
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/migrations/0161_auto__chg_field_authprovider_config.py", line 13, in forwards
    db.alter_column('sentry_authprovider', 'config', self.gf('jsonfield.fields.JSONField')())
  File "/opt/sentry/local/lib/python2.7/site-packages/south/db/generic.py", line 47, in _cache_clear
    return func(self, table, *args, **opts)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/db/generic.py", line 535, in alter_column
    flatten(values),
  File "/opt/sentry/local/lib/python2.7/site-packages/south/db/generic.py", line 282, in execute
    cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    raise_the_exception(self.db, e)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 73, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 21, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
    six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 88, in inner
    return func(self, sql, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 44, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: column "config" cannot be cast automatically to type jsonb
HINT:  You might need to specify "USING config::jsonb".

SQL: ALTER TABLE "sentry_authprovider" ALTER COLUMN "config" TYPE jsonb, ALTER COLUMN "config" DROP NOT NULL, ALTER COLUMN "config" DROP DEFAULT;
root@c16:/opt/sentry# SENTRY_CONF=/opt/sentry/etc /opt/sentry/bin/sentry upgrade
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.admin
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.messages
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.staticfiles
 > captcha
 > crispy_forms
 > debug_toolbar
 > raven.contrib.django.raven_compat
 > rest_framework
 > sentry.plugins.sentry_interface_types
 > sentry.plugins.sentry_mail
 > sentry.plugins.sentry_urls
 > sentry.plugins.sentry_useragents
 > sentry.plugins.sentry_webhooks
 > south
 > sudo

Not synced (use migrations):
 - sentry
 - sentry.nodestore
 - sentry.search
 - social_auth
(use ./manage.py migrate to migrate these)
Running migrations for sentry:
 - Migrating forwards to 0240_fill_onboarding_option.
 > sentry:0161_auto__chg_field_authprovider_config
 > sentry:0162_auto__chg_field_authidentity_data
FATAL ERROR - The following SQL query failed: ALTER TABLE "sentry_authidentity" ALTER COLUMN "data" TYPE jsonb, ALTER COLUMN "data" DROP NOT NULL, ALTER COLUMN "data" DROP DEFAULT;
The error was: column "data" cannot be cast automatically to type jsonb
HINT:  You might need to specify "USING data::jsonb".

SQL: ALTER TABLE "sentry_authidentity" ALTER COLUMN "data" TYPE jsonb, ALTER COLUMN "data" DROP NOT NULL, ALTER COLUMN "data" DROP DEFAULT;
Error in migration: sentry:0162_auto__chg_field_authidentity_data
[ERROR] Unable to fetch internal project
Traceback (most recent call last):
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/utils/raven.py", line 59, in send
    project = Project.objects.get_from_cache(id=settings.SENTRY_PROJECT)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/models/manager.py", line 259, in get_from_cache
    result = self.get(**kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/manager.py", line 151, in get
    return self.get_queryset().get(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 304, in get
    num = len(clone)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 77, in __len__
    self._fetch_all()
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 857, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    raise_the_exception(self.db, e)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 73, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 21, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
    six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 88, in inner
    return func(self, sql, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 44, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: column sentry_project.first_event does not exist
LINE 1: ...project"."date_added", "sentry_project"."status", "sentry_pr...
                                                             ^

SQL: SELECT "sentry_project"."id", "sentry_project"."slug", "sentry_project"."name", "sentry_project"."organization_id", "sentry_project"."team_id", "sentry_project"."public", "sentry_project"."date_added", "sentry_project"."status", "sentry_project"."first_event" FROM "sentry_project" WHERE "sentry_project"."id" = %s
[ERROR] Unable to fetch internal project
Traceback (most recent call last):
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/utils/raven.py", line 59, in send
    project = Project.objects.get_from_cache(id=settings.SENTRY_PROJECT)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/models/manager.py", line 259, in get_from_cache
    result = self.get(**kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/manager.py", line 151, in get
    return self.get_queryset().get(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 304, in get
    num = len(clone)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 77, in __len__
    self._fetch_all()
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 857, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    raise_the_exception(self.db, e)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 73, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 21, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
    six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 88, in inner
    return func(self, sql, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 44, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: column sentry_project.first_event does not exist
LINE 1: ...project"."date_added", "sentry_project"."status", "sentry_pr...
                                                             ^

SQL: SELECT "sentry_project"."id", "sentry_project"."slug", "sentry_project"."name", "sentry_project"."organization_id", "sentry_project"."team_id", "sentry_project"."public", "sentry_project"."date_added", "sentry_project"."status", "sentry_project"."first_event" FROM "sentry_project" WHERE "sentry_project"."id" = %s
Traceback (most recent call last):
  File "/opt/sentry/bin/sentry", line 11, in <module>
    sys.exit(main())
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 147, in main
    cli(prog_name=get_prog(), obj={}, max_content_width=100)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/runner/decorators.py", line 26, in inner
    return ctx.invoke(f, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/runner/commands/upgrade.py", line 37, in upgrade
    verbosity=verbosity,
  File "/opt/sentry/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 159, in call_command
    return klass.execute(*args, **defaults)
  File "/opt/sentry/local/lib/python2.7/site-packages/raven/contrib/django/management/__init__.py", line 41, in new_execute
    return original_func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/management/commands/migrate.py", line 111, in handle
    ignore_ghosts = ignore_ghosts,
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/__init__.py", line 220, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 256, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 331, in migrate_many
    result = self.migrate(migration, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 133, in migrate
    result = self.run(migration, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 114, in run
    return self.run_migration(migration, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 84, in run_migration
    migration_function()
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 60, in <lambda>
    return (lambda: direction(orm))
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/migrations/0162_auto__chg_field_authidentity_data.py", line 13, in forwards
    db.alter_column('sentry_authidentity', 'data', self.gf('jsonfield.fields.JSONField')())
  File "/opt/sentry/local/lib/python2.7/site-packages/south/db/generic.py", line 47, in _cache_clear
    return func(self, table, *args, **opts)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/db/generic.py", line 535, in alter_column
    flatten(values),
  File "/opt/sentry/local/lib/python2.7/site-packages/south/db/generic.py", line 282, in execute
    cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    raise_the_exception(self.db, e)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 73, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 21, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
    six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 88, in inner
    return func(self, sql, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 44, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: column "data" cannot be cast automatically to type jsonb
HINT:  You might need to specify "USING data::jsonb".

SQL: ALTER TABLE "sentry_authidentity" ALTER COLUMN "data" TYPE jsonb, ALTER COLUMN "data" DROP NOT NULL, ALTER COLUMN "data" DROP DEFAULT;
root@c16:/opt/sentry# SENTRY_CONF=/opt/sentry/etc /opt/sentry/bin/sentry upgrade
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.admin
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.messages
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.staticfiles
 > captcha
 > crispy_forms
 > debug_toolbar
 > raven.contrib.django.raven_compat
 > rest_framework
 > sentry.plugins.sentry_interface_types
 > sentry.plugins.sentry_mail
 > sentry.plugins.sentry_urls
 > sentry.plugins.sentry_useragents
 > sentry.plugins.sentry_webhooks
 > south
 > sudo

Not synced (use migrations):
 - sentry
 - sentry.nodestore
 - sentry.search
 - social_auth
(use ./manage.py migrate to migrate these)
Running migrations for sentry:
 - Migrating forwards to 0240_fill_onboarding_option.
 > sentry:0162_auto__chg_field_authidentity_data
 > sentry:0163_auto__add_field_authidentity_last_synced
 > sentry:0164_auto__add_releasefile__add_unique_releasefile_release_ident__add_field
FATAL ERROR - The following SQL query failed: ALTER TABLE "sentry_file" ALTER COLUMN "storage_options" TYPE jsonb, ALTER COLUMN "storage_options" DROP NOT NULL, ALTER COLUMN "storage_options" DROP DEFAULT;
The error was: column "storage_options" cannot be cast automatically to type jsonb
HINT:  You might need to specify "USING storage_options::jsonb".

SQL: ALTER TABLE "sentry_file" ALTER COLUMN "storage_options" TYPE jsonb, ALTER COLUMN "storage_options" DROP NOT NULL, ALTER COLUMN "storage_options" DROP DEFAULT;
Error in migration: sentry:0164_auto__add_releasefile__add_unique_releasefile_release_ident__add_field
[ERROR] Unable to fetch internal project
Traceback (most recent call last):
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/utils/raven.py", line 59, in send
    project = Project.objects.get_from_cache(id=settings.SENTRY_PROJECT)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/models/manager.py", line 259, in get_from_cache
    result = self.get(**kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/manager.py", line 151, in get
    return self.get_queryset().get(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 304, in get
    num = len(clone)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 77, in __len__
    self._fetch_all()
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 857, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    raise_the_exception(self.db, e)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 73, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 21, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
    six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 88, in inner
    return func(self, sql, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 44, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: column sentry_project.first_event does not exist
LINE 1: ...project"."date_added", "sentry_project"."status", "sentry_pr...
                                                             ^

SQL: SELECT "sentry_project"."id", "sentry_project"."slug", "sentry_project"."name", "sentry_project"."organization_id", "sentry_project"."team_id", "sentry_project"."public", "sentry_project"."date_added", "sentry_project"."status", "sentry_project"."first_event" FROM "sentry_project" WHERE "sentry_project"."id" = %s
[ERROR] Unable to fetch internal project
Traceback (most recent call last):
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/utils/raven.py", line 59, in send
    project = Project.objects.get_from_cache(id=settings.SENTRY_PROJECT)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/models/manager.py", line 259, in get_from_cache
    result = self.get(**kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/manager.py", line 151, in get
    return self.get_queryset().get(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 304, in get
    num = len(clone)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 77, in __len__
    self._fetch_all()
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 857, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    raise_the_exception(self.db, e)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 73, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 21, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
    six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 88, in inner
    return func(self, sql, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 44, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: column sentry_project.first_event does not exist
LINE 1: ...project"."date_added", "sentry_project"."status", "sentry_pr...
                                                             ^

SQL: SELECT "sentry_project"."id", "sentry_project"."slug", "sentry_project"."name", "sentry_project"."organization_id", "sentry_project"."team_id", "sentry_project"."public", "sentry_project"."date_added", "sentry_project"."status", "sentry_project"."first_event" FROM "sentry_project" WHERE "sentry_project"."id" = %s
Traceback (most recent call last):
  File "/opt/sentry/bin/sentry", line 11, in <module>
    sys.exit(main())
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 147, in main
    cli(prog_name=get_prog(), obj={}, max_content_width=100)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/runner/decorators.py", line 26, in inner
    return ctx.invoke(f, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/runner/commands/upgrade.py", line 37, in upgrade
    verbosity=verbosity,
  File "/opt/sentry/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 159, in call_command
    return klass.execute(*args, **defaults)
  File "/opt/sentry/local/lib/python2.7/site-packages/raven/contrib/django/management/__init__.py", line 41, in new_execute
    return original_func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/management/commands/migrate.py", line 111, in handle
    ignore_ghosts = ignore_ghosts,
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/__init__.py", line 220, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 256, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 331, in migrate_many
    result = self.migrate(migration, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 133, in migrate
    result = self.run(migration, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 114, in run
    return self.run_migration(migration, database)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 84, in run_migration
    migration_function()
  File "/opt/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 60, in <lambda>
    return (lambda: direction(orm))
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/migrations/0164_auto__add_releasefile__add_unique_releasefile_release_ident__add_field.py", line 32, in forwards
    db.alter_column('sentry_file', 'storage_options', self.gf('jsonfield.fields.JSONField')())
  File "/opt/sentry/local/lib/python2.7/site-packages/south/db/generic.py", line 47, in _cache_clear
    return func(self, table, *args, **opts)
  File "/opt/sentry/local/lib/python2.7/site-packages/south/db/generic.py", line 535, in alter_column
    flatten(values),
  File "/opt/sentry/local/lib/python2.7/site-packages/south/db/generic.py", line 282, in execute
    cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/sentry/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    raise_the_exception(self.db, e)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 73, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 21, in inner
    return func(self, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
    six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 88, in inner
    return func(self, sql, *args, **kwargs)
  File "/opt/sentry/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 44, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: column "storage_options" cannot be cast automatically to type jsonb
HINT:  You might need to specify "USING storage_options::jsonb".

SQL: ALTER TABLE "sentry_file" ALTER COLUMN "storage_options" TYPE jsonb, ALTER COLUMN "storage_options" DROP NOT NULL, ALTER COLUMN "storage_options" DROP DEFAULT;
root@c16:/opt/sentry# SENTRY_CONF=/opt/sentry/etc /opt/sentry/bin/sentry upgrade
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.admin
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.messages
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.staticfiles
 > captcha
 > crispy_forms
 > debug_toolbar
 > raven.contrib.django.raven_compat
 > rest_framework
 > sentry.plugins.sentry_interface_types
 > sentry.plugins.sentry_mail
 > sentry.plugins.sentry_urls
 > sentry.plugins.sentry_useragents
 > sentry.plugins.sentry_webhooks
 > south
 > sudo

Not synced (use migrations):
 - sentry
 - sentry.nodestore
 - sentry.search
 - social_auth
(use ./manage.py migrate to migrate these)
Running migrations for sentry:
 - Migrating forwards to 0240_fill_onboarding_option.
 > sentry:0164_auto__add_releasefile__add_unique_releasefile_release_ident__add_field
 > sentry:0165_auto__del_unique_file_name_checksum
 > sentry:0166_auto__chg_field_user_id__add_field_apikey_allowed_origins
 > sentry:0167_auto__add_field_authprovider_flags
 > sentry:0168_unfill_projectkey_user
 > sentry:0169_auto__del_field_projectkey_user
 > sentry:0170_auto__add_organizationmemberteam__add_unique_organizationmemberteam_te
 > sentry:0171_auto__chg_field_team_owner
 > sentry:0172_auto__del_field_team_owner
 > sentry:0173_auto__del_teammember__del_unique_teammember_team_user
 > sentry:0174_auto__del_field_projectkey_user_added
 > sentry:0175_auto__del_pendingteammember__del_unique_pendingteammember_team_email
 > sentry:0176_auto__add_field_organizationmember_counter__add_unique_organizationmem
 > sentry:0177_fill_member_counters
 > sentry:0178_auto__del_unique_organizationmember_organization_counter
 > sentry:0179_auto__add_field_release_date_released
 > sentry:0180_auto__add_field_release_environment__add_field_release_ref__add_field_
 > sentry:0181_auto__del_field_release_environment__del_unique_release_project_versio
 > sentry:0182_auto__add_field_auditlogentry_actor_label__add_field_auditlogentry_act
 > sentry:0183_auto__del_index_grouphash_hash
 > sentry:0184_auto__del_field_group_checksum__del_unique_group_project_checksum__del
 > sentry:0185_auto__add_savedsearch__add_unique_savedsearch_project_name
 > sentry:0186_auto__add_field_group_first_release
 > sentry:0187_auto__add_index_group_project_first_release
 > sentry:0188_auto__add_userreport
 > sentry:0189_auto__add_index_userreport_project_event_id
 > sentry:0190_auto__add_field_release_new_groups
 > sentry:0191_auto__del_alert__del_alertrelatedgroup__del_unique_alertrelatedgroup_g
 > sentry:0192_add_model_groupemailthread
 > sentry:0193_auto__del_unique_groupemailthread_msgid__add_unique_groupemailthread_e
 > sentry:0194_auto__del_field_project_platform
 > sentry:0195_auto__chg_field_organization_owner
 > sentry:0196_auto__del_field_organization_owner
 > sentry:0197_auto__del_accessgroup__del_unique_accessgroup_team_name
 > sentry:0198_auto__add_field_release_primary_owner
 > sentry:0199_auto__add_field_project_first_event
 > sentry:0200_backfill_first_event
 > sentry:0201_auto__add_eventuser__add_unique_eventuser_project_ident__add_index_eve
 > sentry:0202_auto__add_field_eventuser_hash__add_unique_eventuser_project_hash
 > sentry:0203_auto__chg_field_eventuser_username__chg_field_eventuser_ident
 > sentry:0204_backfill_team_membership
 > sentry:0205_auto__add_field_organizationmember_role
 > sentry:0206_backfill_member_role
 > sentry:0207_auto__add_field_organization_default_role
 > sentry:0208_backfill_default_role
 > sentry:0209_auto__add_broadcastseen__add_unique_broadcastseen_broadcast_user
 > sentry:0210_auto__del_field_broadcast_badge
 > sentry:0211_auto__add_field_broadcast_title
 > sentry:0212_auto__add_fileblob__add_field_file_blob
 > sentry:0212_auto__add_organizationoption__add_unique_organizationoption_organizati
 > sentry:0213_migrate_file_blobs
Saved 0.00GB (on 0.00GB) with removal of 0 duplicate files
 > sentry:0214_auto__add_field_broadcast_upstream_id
 > sentry:0215_auto__add_field_broadcast_date_expires
 > sentry:0216_auto__add_groupsnooze
 > sentry:0217_auto__add_groupresolution
 > sentry:0218_auto__add_field_groupresolution_status
 > sentry:0219_auto__add_field_groupbookmark_date_added
 > sentry:0220_auto__del_field_fileblob_storage_options__del_field_fileblob_storage__
 > sentry:0221_auto__chg_field_user_first_name
 > sentry:0222_auto__del_field_user_last_name__del_field_user_first_name__add_field_u
 > sentry:0223_delete_old_sentry_docs_options
 > sentry:0224_auto__add_index_userreport_project_date_added
 > sentry:0225_auto__add_fileblobindex__add_unique_fileblobindex_file_blob_offset
 > sentry:0226_backfill_file_size
 > sentry:0227_auto__del_field_activity_event
 > sentry:0228_auto__del_field_event_num_comments
 > sentry:0229_drop_event_constraints
 > sentry:0230_auto__del_field_eventmapping_group__del_field_eventmapping_project__ad
 > sentry:0231_auto__add_field_savedsearch_is_default
 > sentry:0232_default_savedsearch
 > sentry:0233_add_new_savedsearch
 > sentry:0234_auto__add_savedsearchuserdefault__add_unique_savedsearchuserdefault_pr
 > sentry:0235_auto__add_projectbookmark__add_unique_projectbookmark_project_id_user_
 > sentry:0236_auto__add_organizationonboardingtask__add_unique_organizationonboardin
 > sentry:0237_auto__add_eventtag__add_unique_eventtag_event_id_key_id_value_id
 > sentry:0238_fill_org_onboarding_tasks
 > sentry:0239_auto__add_projectdsymfile__add_unique_projectdsymfile_project_uuid__ad
 > sentry:0240_fill_onboarding_option
 - Loading initial data for sentry.
Installed 0 object(s) from 0 fixture(s)
Running migrations for nodestore:
 - Migrating forwards to 0001_initial.
 > nodestore:0001_initial
 - Loading initial data for nodestore.
Installed 0 object(s) from 0 fixture(s)
Running migrations for search:
 - Migrating forwards to 0002_auto__del_searchtoken__del_unique_searchtoken_document_field_token__de.
 > search:0001_initial
 > search:0002_auto__del_searchtoken__del_unique_searchtoken_document_field_token__de
 - Loading initial data for search.
Installed 0 object(s) from 0 fixture(s)
Running migrations for social_auth:
 - Migrating forwards to 0002_auto__add_unique_nonce_timestamp_salt_server_url__add_unique_associati.
 > social_auth:0001_initial
 > social_auth:0002_auto__add_unique_nonce_timestamp_salt_server_url__add_unique_associati
 - Loading initial data for social_auth.
Installed 0 object(s) from 0 fixture(s)
Forcing documentation sync
syncing documentation (platform index)
  syncing documentation for node._self integration
  syncing documentation for node.koa integration
  syncing documentation for node.express integration
  syncing documentation for node.connect integration
  syncing documentation for java._self integration
  syncing documentation for java.log4j2 integration
  syncing documentation for java.logback integration
  syncing documentation for java.log4j integration
  syncing documentation for java.appengine integration
  syncing documentation for python._self integration
  syncing documentation for python.pyramid integration
  syncing documentation for python.rq integration
  syncing documentation for python.flask integration
  syncing documentation for python.django integration
  syncing documentation for python.celery integration
  syncing documentation for python.tornado integration
  syncing documentation for python.bottle integration
  syncing documentation for python.pylons integration
  syncing documentation for javascript._self integration
  syncing documentation for javascript.react integration
  syncing documentation for javascript.backbone integration
  syncing documentation for javascript.ember integration
  syncing documentation for javascript.angular integration
  syncing documentation for objc._self integration
  syncing documentation for csharp._self integration
  syncing documentation for go._self integration
  syncing documentation for go.http integration
  syncing documentation for php.laravel integration
  syncing documentation for php._self integration
  syncing documentation for php.monolog integration
  syncing documentation for php.symfony2 integration
  syncing documentation for ruby._self integration
  syncing documentation for ruby.rack integration
  syncing documentation for ruby.rails integration
Creating missing project keys
Correcting Group.num_comments counter
tsabi commented 8 years ago

Please look at bug #1648. But my problem is, after i fixed that issues by hand, it still didn't created the starter records.

dcramer commented 8 years ago

I'm not sure why you're making the fields jsonb as they should be text

optimum-web commented 8 years ago

I can confirm I have the same problem on fresh install c] out: return real_execute(self, sql, params) [demo.loc] out: File "/home/sentry/envsentry/local/lib/python2.7/site-packages/Django-1.6.11-py2.7.egg/django/db/backends/util.py", line 53, in execute [demo.loc] out: return self.cursor.execute(sql, params) [demo.loc] out: File "/home/sentry/envsentry/local/lib/python2.7/site-packages/Django-1.6.11-py2.7.egg/django/db/utils.py", line 99, in exit [demo.loc] out: six.reraise(dj_exc_type, dj_exc_value, traceback) [demo.loc] out: File "/home/sentry/envsentry/local/lib/python2.7/site-packages/Django-1.6.11-py2.7.egg/django/db/backends/util.py", line 53, in execute [demo.loc] out: return self.cursor.execute(sql, params) [demo.loc] out: ProgrammingError: column sentry_organization.default_role does not exist [demo.loc] out: LINE 1: ...on"."status", "sentry_organization"."date_added", "sentry_or...

additionaly can not create super user

File "/home/sentry/envsentry/local/lib/python2.7/site-packages/Django-1.6.11-py2.7.egg/django/db/backends/util.py", line 53, in execute return self.cursor.execute(sql, params) django.db.utils.IntegrityError: null value in column "last_name" violates not-null constraint DETAIL: Failing row contains (pbkdf2_sha256$12000$Q1xKf5w1JCsJ$BU3Eu8yibDT3Fh2OsWlGONTAwCCAT5w..., 2016-05-13 15:38:45.690614+00, 3, admin@demo.loc, , null, admin@demo.loc, t, t, t, 2016-05-13 15:38:45.690678+00, f).

ubuntu 14.04 upgraded psql (PostgreSQL) 9.3.12

dcramer commented 8 years ago

@optimum-web you cannot run any commands if the db is not migrated correctly. You should run migrate again, and if you're still seeing issues, please paste the full log.

optimum-web commented 8 years ago

Thanks @dcramer for quick reply, here is the next attempt response

(envsentry)sentry@sentry:~$ psql --version psql (PostgreSQL) 9.3.12 (envsentry)sentry@sentry:~$ sentry --config=/etc/sentry/settings.py upgrade Syncing... Creating tables ... Installing custom SQL ... Installing indexes ... Installed 0 object(s) from 0 fixture(s)

Synced:

django.contrib.admin django.contrib.auth django.contrib.contenttypes django.contrib.messages django.contrib.sessions django.contrib.sites django.contrib.staticfiles captcha crispy_forms debug_toolbar raven.contrib.django.raven_compat rest_framework sentry.plugins.sentry_interface_types sentry.plugins.sentry_mail sentry.plugins.sentry_urls sentry.plugins.sentry_useragents sentry.plugins.sentry_webhooks south sudo

Not synced (use migrations):

mattrobenolt commented 8 years ago

To step in here, it looks like this is the side effect of other issues.

It seems that your redis is misconfigured as well, for one. And issues like this ted to cascade down into other issues:

Traceback (most recent call last):
  File "/home/sentry/envsentry/src/sentry/src/sentry/utils/raven.py", line 78, in send
    project = Project.objects.get_from_cache(id=settings.SENTRY_PROJECT)
  File "/home/sentry/envsentry/src/sentry/src/sentry/db/models/manager.py", line 257, in get_from_cache
    retval = cache.get(cache_key, version=self.cache_version)
  File "/home/sentry/envsentry/local/lib/python2.7/site-packages/redis_cache/backends/base.py", line 32, in wrapped
    return method(self, client, key, args, *kwargs)
  File "/home/sentry/envsentry/local/lib/python2.7/site-packages/redis_cache/backends/base.py", line 255, in get
    value = client.get(key)
  File "/home/sentry/envsentry/local/lib/python2.7/site-packages/redis/client.py", line 880, in get
    return self.execute_command('GET', name)
  File "/home/sentry/envsentry/local/lib/python2.7/site-packages/redis/client.py", line 570, in execute_command
    connection = pool.get_connection(command_name, options)
  File "/home/sentry/envsentry/local/lib/python2.7/site-packages/redis/connection.py", line 897, in get_connection
    connection = self.make_connection()
  File "/home/sentry/envsentry/local/lib/python2.7/site-packages/redis/connection.py", line 906, in make_connection
    return self.connection_class(self.connection_kwargs)
  File "/home/sentry/envsentry/local/lib/python2.7/site-packages/redis/connection.py", line 399, in init
    self.port = int(port)
TypeError: int() argument must be a string or a number, not 'NoneType'

So I'm not sure how you're configuring redis, but it looks like you're setting it's port number to None.

optimum-web commented 8 years ago

Hi @mattrobenolt ,
Probably you are right but I see not issue in settings file, I attach it here:

<snipped>

mattrobenolt commented 8 years ago

I'm not entirely sure what to tell you, but you shouldn't drop this information into public channels as well. There were passwords included. I've removed code.

optimum-web commented 8 years ago

No problem . it's generated automatically and is not used anywhere.

mattrobenolt commented 8 years ago

It looks like you're using a different library from what's bundled and what we document for caching. It seems that you're using https://github.com/sebleier/django-redis-cache and it's erroring inside this library. So my only guess is that you've misconfigured this.

optimum-web commented 8 years ago

True , I think I installed it because I had an error with django-redis and redis libs

  File "/home/sentry/envsentry/local/lib/python2.7/site-packages/Django-1.6.11-py2.7.egg/django/core/cache/__init__.py", line 130, in get_cache
    "Could not find backend '%s': %s" % (backend, e))
django.core.cache.backends.base.InvalidCacheBackendError: Could not find backend 'redis_cache.cache.RedisCache': Error importing module redis_cache.cache: "No module named redis_cache.cache"
(envsentry)se

Thanks, I think you can close the issue.

optimum-web commented 8 years ago

Yes! I changed CACHES structure to this :

'default': {
            'BACKEND': 'django_redis.cache.RedisCache',
            'LOCATION': '%(host)s:%(port)s',
            'OPTIONS': {
                'PASSWORD': '%(pass)s',
                'PICKLE_VERSION': -1,  # default
                'PARSER_CLASS': 'redis.connection.HiredisParser',
                'CLIENT_CLASS': 'django_redis.client.DefaultClient',
            },
        },

and upgrade worked fine ! Thank you !