getsentry / self-hosted

Sentry, feature-complete and packaged up for low-volume deployments and proofs-of-concept
https://develop.sentry.dev/self-hosted/
Other
7.95k stars 1.78k forks source link

DB::Exception: Table default.sentry_local doesn't exist.. #521

Closed mokedeng closed 4 years ago

mokedeng commented 4 years ago

The above logs are based on Ubuntu 16.04.1, Details are as follows:

$ uname -a
Linux szdev-PC 4.15.0-88-generic #88~16.04.1-Ubuntu SMP Wed Feb 12 04:19:15 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ docker -v
Docker version 18.09.7, build 2d0083d
$ docker-compose -v
docker-compose version 1.24.0, build 0aa59064

The installation process is as follows:

$ ./install.sh
Checking minimum requirements...
docker-compose version 1.24.0, build 0aa59064
docker-compose version 1.24.0, build 0aa59064

Creating volumes for persistent storage...
Created sentry-data.
Created sentry-postgres.
Created sentry-redis.
Created sentry-zookeeper.
Created sentry-kafka.
Created sentry-clickhouse.
Created sentry-symbolicator.

Creating sentry/sentry.conf.py...
Creating sentry/config.yml...
Creating sentry/requirements.txt...

Generating secret key...
Secret key written to sentry/config.yml

Fetching and updating Docker images...

docker-compose version 1.24.0, build 0aa59064
latest: Pulling from getsentry/sentry
Digest: sha256:9458435f20a198c1a0953c1252c227b8ca26e7928d9bac3e6e9ce06715ea4c64
Status: Image is up to date for getsentry/sentry:latest

Building and tagging Docker images...

docker-compose version 1.24.0, build 0aa59064
docker-compose version 1.24.0, build 0aa59064

Docker images built.
./install.sh: 第 177 行: [: docker-compose version 1.24.0, build 0aa59064: 需要整数表达式
Bootstrapping and migrating Snuba...
docker-compose version 1.24.0, build 0aa59064

Setting up database...
docker-compose version 1.24.0, build 0aa59064
Migrating file storage...
docker-compose version 1.24.0, build 0aa59064

Generating Relay credentials...
Relay credentials written to relay/credentials.json
FAIL: Cannot read credentials back from relay/credentials.json.
      Please ensure this file is readable and contains valid credentials.

$ docker-compose run --rm --no-deps -v $(pwd)/relay/config.yml:/tmp/config.yml relay --config /tmp credentials generate --stdout
Creating volume "sentry_onpremise_sentry-secrets" with default driver
Creating volume "sentry_onpremise_sentry-smtp" with default driver
Creating volume "sentry_onpremise_sentry-zookeeper-log" with default driver
Creating volume "sentry_onpremise_sentry-kafka-log" with default driver
Creating volume "sentry_onpremise_sentry-smtp-log" with default driver
Creating volume "sentry_onpremise_sentry-clickhouse-log" with default driver
{"secret_key":"2ofhSDo8YR4E8MbVDIx_HOl7y8WcVSuLUnCxDszAKQg","public_key":"CJjhNxmLHYjIHED_SEMTltQPMhlu3foPPehh7LDDnVs","id":"e2c7173c-0134-4bd1-a27c-ded95eadc211"}

$ ./install.sh
Checking minimum requirements...
docker-compose version 1.24.0, build 0aa59064
docker-compose version 1.24.0, build 0aa59064

Creating volumes for persistent storage...
Created sentry-data.
Created sentry-postgres.
Created sentry-redis.
Created sentry-zookeeper.
Created sentry-kafka.
Created sentry-clickhouse.
Created sentry-symbolicator.

sentry/sentry.conf.py already exists, skipped creation.
sentry/config.yml already exists, skipped creation.
sentry/requirements.txt already exists, skipped creation.

Fetching and updating Docker images...

docker-compose version 1.24.0, build 0aa59064
latest: Pulling from getsentry/sentry
Digest: sha256:9458435f20a198c1a0953c1252c227b8ca26e7928d9bac3e6e9ce06715ea4c64
Status: Image is up to date for getsentry/sentry:latest

Building and tagging Docker images...

docker-compose version 1.24.0, build 0aa59064
docker-compose version 1.24.0, build 0aa59064

Docker images built.
./install.sh: 第 177 行: [: docker-compose version 1.24.0, build 0aa59064: 需要整数表达式
Bootstrapping and migrating Snuba...
docker-compose version 1.24.0, build 0aa59064

Setting up database...
docker-compose version 1.24.0, build 0aa59064
Migrating file storage...
docker-compose version 1.24.0, build 0aa59064
Relay public key written to sentry/sentry.conf.py

Cleaning up...

----------------
You're all done! Run the following command to get Sentry running:

  docker-compose up -d

$ docker-compose up -d
Creating sentry_onpremise_symbolicator-cleanup_1 ... done
Creating sentry_onpremise_zookeeper_1            ... done
Creating sentry_onpremise_memcached_1            ... done
Creating sentry_onpremise_smtp_1                 ... done
Creating sentry_onpremise_symbolicator_1         ... done
Creating sentry_onpremise_postgres_1             ... done
Creating sentry_onpremise_redis_1                ... done
Creating sentry_onpremise_clickhouse_1           ... done
Creating sentry_onpremise_kafka_1                ... done
Creating sentry_onpremise_snuba-api_1               ... done
Creating sentry_onpremise_snuba-cleanup_1           ... done
Creating sentry_onpremise_snuba-replacer_1          ... done
Creating sentry_onpremise_relay_1                   ... done
Creating sentry_onpremise_snuba-consumer_1          ... done
Creating sentry_onpremise_snuba-outcomes-consumer_1 ... done
Creating sentry_onpremise_web_1                     ... done
Creating sentry_onpremise_ingest-consumer_1         ... done
Creating sentry_onpremise_post-process-forwarder_1  ... done
Creating sentry_onpremise_sentry-cleanup_1          ... done
Creating sentry_onpremise_worker_1                  ... done
Creating sentry_onpremise_cron_1                    ... done
Creating sentry_onpremise_nginx_1                   ... done

$ docker ps -a |grep sentry
e8290bed9fef        nginx:1.16                                              "nginx -g 'daemon of…"   7 minutes ago       Up 7 minutes                            0.0.0.0:9000->80/tcp                sentry_onpremise_nginx_1
f661e5b33014        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   7 minutes ago       Up Less than a second                   9000/tcp                            sentry_onpremise_worker_1
1e6fe70488c1        sentry-cleanup-onpremise-local                          "/entrypoint.sh '0 0…"   7 minutes ago       Up 7 minutes                            9000/tcp                            sentry_onpremise_sentry-cleanup_1
6590bdae7ec0        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   7 minutes ago       Restarting (1) 5 seconds ago                                                sentry_onpremise_web_1
f6b962a8834b        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   7 minutes ago       Restarting (1) Less than a second ago                                       sentry_onpremise_cron_1
131b65a83587        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   7 minutes ago       Restarting (1) 1 second ago                                                 sentry_onpremise_ingest-consumer_1
d7e918e5da9d        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   7 minutes ago       Restarting (1) 6 seconds ago                                                sentry_onpremise_post-process-forwarder_1
91e8f1082b09        getsentry/snuba:latest                                  "./docker_entrypoint…"   7 minutes ago       Up 7 minutes                            1218/tcp                            sentry_onpremise_snuba-outcomes-consumer_1
4ce8ab3910b9        getsentry/snuba:latest                                  "./docker_entrypoint…"   7 minutes ago       Up 7 minutes                            1218/tcp                            sentry_onpremise_snuba-replacer_1
c8e28840d751        getsentry/relay:latest                                  "/bin/bash /docker-e…"   7 minutes ago       Restarting (1) 35 seconds ago                                               sentry_onpremise_relay_1
899f28b30b69        getsentry/snuba:latest                                  "./docker_entrypoint…"   7 minutes ago       Up 7 minutes                            1218/tcp                            sentry_onpremise_snuba-api_1
64529430d1bd        snuba-cleanup-onpremise-local                           "/entrypoint.sh '*/5…"   7 minutes ago       Up 7 minutes                            1218/tcp                            sentry_onpremise_snuba-cleanup_1
8f429689c64f        getsentry/snuba:latest                                  "./docker_entrypoint…"   7 minutes ago       Up 7 minutes                            1218/tcp                            sentry_onpremise_snuba-consumer_1
fc108045672d        confluentinc/cp-kafka:5.5.0                             "/etc/confluent/dock…"   7 minutes ago       Up 3 minutes                            9092/tcp                            sentry_onpremise_kafka_1
2fc5f562fe8e        redis:5.0-alpine                                        "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes                            6379/tcp                            sentry_onpremise_redis_1
3376e6bb3601        yandex/clickhouse-server:19.17                          "/entrypoint.sh"         7 minutes ago       Up 7 minutes                            8123/tcp, 9000/tcp, 9009/tcp        sentry_onpremise_clickhouse_1
eed5f91e4fbf        postgres:9.6                                            "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes                            5432/tcp                            sentry_onpremise_postgres_1
726ec4230e82        memcached:1.5-alpine                                    "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes                            11211/tcp                           sentry_onpremise_memcached_1
6d48eb09c78a        confluentinc/cp-zookeeper:5.5.0                         "/etc/confluent/dock…"   7 minutes ago       Up 7 minutes                            2181/tcp, 2888/tcp, 3888/tcp        sentry_onpremise_zookeeper_1
b4335fb60ddc        symbolicator-cleanup-onpremise-local                    "/entrypoint.sh '55 …"   7 minutes ago       Up 7 minutes                            3021/tcp                            sentry_onpremise_symbolicator-cleanup_1
ef8e1f190ebf        tianon/exim4                                            "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes                            25/tcp                              sentry_onpremise_smtp_1
841650c27d71        getsentry/symbolicator:latest                           "/bin/bash /docker-e…"   7 minutes ago       Up 7 minutes                            3021/tcp                            sentry_onpremise_symbolicator_1

$ docker ps -a |grep Restarting
f661e5b33014        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   9 minutes ago       Restarting (1) 42 seconds ago                                       sentry_onpremise_worker_1
6590bdae7ec0        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   9 minutes ago       Restarting (1) 39 seconds ago                                       sentry_onpremise_web_1
f6b962a8834b        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   9 minutes ago       Restarting (1) 44 seconds ago                                       sentry_onpremise_cron_1
131b65a83587        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   9 minutes ago       Restarting (1) 45 seconds ago                                       sentry_onpremise_ingest-consumer_1
d7e918e5da9d        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   9 minutes ago       Restarting (1) 41 seconds ago                                       sentry_onpremise_post-process-forwarder_1
c8e28840d751        getsentry/relay:latest                                  "/bin/bash /docker-e…"   9 minutes ago       Restarting (1) 52 seconds ago                                       sentry_onpremise_relay_1

$ docker logs sentry_onpremise_web_1
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'

$ chmod 777 -R relay sentry
$ docker-compose restart
Restarting sentry_onpremise_nginx_1                   ... done
Restarting sentry_onpremise_worker_1                  ... done
Restarting sentry_onpremise_sentry-cleanup_1          ... done
Restarting sentry_onpremise_web_1                     ... done
Restarting sentry_onpremise_cron_1                    ... done
Restarting sentry_onpremise_ingest-consumer_1         ... done
Restarting sentry_onpremise_post-process-forwarder_1  ... done
Restarting sentry_onpremise_snuba-outcomes-consumer_1 ... done
Restarting sentry_onpremise_snuba-replacer_1          ... done
Restarting sentry_onpremise_relay_1                   ... done
Restarting sentry_onpremise_snuba-api_1               ... done
Restarting sentry_onpremise_snuba-cleanup_1           ... done
Restarting sentry_onpremise_snuba-consumer_1          ... done
Restarting sentry_onpremise_kafka_1                   ... done
Restarting sentry_onpremise_redis_1                   ... done
Restarting sentry_onpremise_clickhouse_1              ... done
Restarting sentry_onpremise_postgres_1                ... done
Restarting sentry_onpremise_memcached_1               ... done
Restarting sentry_onpremise_zookeeper_1               ... done
Restarting sentry_onpremise_symbolicator-cleanup_1    ... done
Restarting sentry_onpremise_smtp_1                    ... done
Restarting sentry_onpremise_symbolicator_1            ... done

$ docker ps -a |grep sentry
e8290bed9fef        nginx:1.16                                              "nginx -g 'daemon of…"   14 minutes ago      Up About a minute   0.0.0.0:9000->80/tcp                sentry_onpremise_nginx_1
f661e5b33014        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   14 minutes ago      Up About a minute   9000/tcp                            sentry_onpremise_worker_1
1e6fe70488c1        sentry-cleanup-onpremise-local                          "/entrypoint.sh '0 0…"   14 minutes ago      Up About a minute   9000/tcp                            sentry_onpremise_sentry-cleanup_1
6590bdae7ec0        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   14 minutes ago      Up About a minute   9000/tcp                            sentry_onpremise_web_1
f6b962a8834b        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   14 minutes ago      Up About a minute   9000/tcp                            sentry_onpremise_cron_1
131b65a83587        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   14 minutes ago      Up About a minute   9000/tcp                            sentry_onpremise_ingest-consumer_1
d7e918e5da9d        sentry-onpremise-local                                  "/bin/sh -c 'exec /d…"   14 minutes ago      Up About a minute   9000/tcp                            sentry_onpremise_post-process-forwarder_1
91e8f1082b09        getsentry/snuba:latest                                  "./docker_entrypoint…"   14 minutes ago      Up About a minute   1218/tcp                            sentry_onpremise_snuba-outcomes-consumer_1
4ce8ab3910b9        getsentry/snuba:latest                                  "./docker_entrypoint…"   14 minutes ago      Up About a minute   1218/tcp                            sentry_onpremise_snuba-replacer_1
c8e28840d751        getsentry/relay:latest                                  "/bin/bash /docker-e…"   14 minutes ago      Up About a minute   3000/tcp                            sentry_onpremise_relay_1
899f28b30b69        getsentry/snuba:latest                                  "./docker_entrypoint…"   14 minutes ago      Up About a minute   1218/tcp                            sentry_onpremise_snuba-api_1
64529430d1bd        snuba-cleanup-onpremise-local                           "/entrypoint.sh '*/5…"   14 minutes ago      Up About a minute   1218/tcp                            sentry_onpremise_snuba-cleanup_1
8f429689c64f        getsentry/snuba:latest                                  "./docker_entrypoint…"   14 minutes ago      Up About a minute   1218/tcp                            sentry_onpremise_snuba-consumer_1
fc108045672d        confluentinc/cp-kafka:5.5.0                             "/etc/confluent/dock…"   14 minutes ago      Up 58 seconds       9092/tcp                            sentry_onpremise_kafka_1
2fc5f562fe8e        redis:5.0-alpine                                        "docker-entrypoint.s…"   15 minutes ago      Up About a minute   6379/tcp                            sentry_onpremise_redis_1
3376e6bb3601        yandex/clickhouse-server:19.17                          "/entrypoint.sh"         15 minutes ago      Up About a minute   8123/tcp, 9000/tcp, 9009/tcp        sentry_onpremise_clickhouse_1
eed5f91e4fbf        postgres:9.6                                            "docker-entrypoint.s…"   15 minutes ago      Up About a minute   5432/tcp                            sentry_onpremise_postgres_1
726ec4230e82        memcached:1.5-alpine                                    "docker-entrypoint.s…"   15 minutes ago      Up About a minute   11211/tcp                           sentry_onpremise_memcached_1
6d48eb09c78a        confluentinc/cp-zookeeper:5.5.0                         "/etc/confluent/dock…"   15 minutes ago      Up About a minute   2181/tcp, 2888/tcp, 3888/tcp        sentry_onpremise_zookeeper_1
b4335fb60ddc        symbolicator-cleanup-onpremise-local                    "/entrypoint.sh '55 …"   15 minutes ago      Up About a minute   3021/tcp                            sentry_onpremise_symbolicator-cleanup_1
ef8e1f190ebf        tianon/exim4                                            "docker-entrypoint.s…"   15 minutes ago      Up About a minute   25/tcp                              sentry_onpremise_smtp_1
841650c27d71        getsentry/symbolicator:latest                           "/bin/bash /docker-e…"   15 minutes ago      Up About a minute   3021/tcp                            sentry_onpremise_symbolicator_1

when I open 'http://10.7.226.102:9000/auth/login/' it report errors '502 Bad Gateway nginx' So I did the following

$ docker exec -it sentry_onpremise_web_1 /bin/bash
root@6590bdae7ec0:/# sentry --version
sentry, version 10.1.0.dev0 (b7df514f7477)
root@6590bdae7ec0:/# sentry upgrade
06:16:52 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
06:16:56 [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.0001_initial... OK
  Applying contenttypes.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0001_initial... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying jira_ac.0001_initial... OK
  Applying nodestore.0001_initial... OK
  Applying sentry.0002_912_to_recent... OK
  Applying sentry.0003_auto_20191022_0122... OK
  Applying sentry.0004_bitfieldtestmodel_blankjsonfieldtestmodel_callabledefaultmodel_jsonfieldtestmodel_jsonfieldwithdefau... OK
  Applying sentry.0005_fix_content_types... OK
  Applying sentry.0006_sentryapp_date_published... OK
  Applying sentry.0007_auto_20191029_0131... OK
  Applying sentry.0008_auto_20191030_0016... OK
  Applying sentry.0009_auto_20191101_1608... OK
  Applying sentry.0010_auto_20191104_1641... OK
  Applying sentry.0011_remove_pagerdutyservice_service_id_from_state... OK
  Applying sentry.0012_remove_pagerdutyservice_service_id... OK
  Applying sentry.0013_auto_20191111_1829... OK
  Applying sentry.0014_delete_sentryappwebhookerror... OK
  Applying sentry.0015_delete_sentryappwebhookerror_db... OK
  Applying sentry.0016_delete_alert_rule_deprecated_fields... OK
  Applying sentry.0017_incident_aggregation... OK
  Applying sentry.0018_discoversavedquery_version... OK
  Applying sentry.0019_auto_20191114_2040... OK
  Applying sentry.0020_auto_20191125_1420... OK
  Applying sentry.0021_auto_20191203_1803... OK
  Applying sentry.0021_auto_20191202_1716... OK
  Applying sentry.0022_merge... OK
  Applying sentry.0023_hide_environment_none_20191126... OK
  Applying sentry.0024_auto_20191230_2052...Nothing to do, skipping migration.

 OK
  Applying sentry.0025_organizationaccessrequest_requester... OK
  Applying sentry.0026_delete_event... OK
  Applying sentry.0027_exporteddata... OK
  Applying sentry.0028_user_reports... OK
  Applying sentry.0029_discover_query_upgrade... OK
  Applying sentry.0030_auto_20200201_0039... OK
  Applying sentry.0031_delete_alert_rules_and_incidents... OK
  Applying sentry.0032_delete_alert_email... OK
  Applying sentry.0033_auto_20200210_2137... OK
  Applying sentry.0034_auto_20200210_2311... OK
  Applying sentry.0035_auto_20200127_1711... OK
  Applying sentry.0036_auto_20200213_0106... OK
  Applying sentry.0037_auto_20200213_0140... OK
  Applying sentry.0038_auto_20200213_1904... OK
  Applying sentry.0039_delete_incidentsuspectcommit... OK
  Applying sentry.0040_remove_incidentsuspectcommittable... OK
  Applying sentry.0041_incidenttrigger_date_modified... OK
  Applying sentry.0042_auto_20200214_1607... OK
  Applying sentry.0043_auto_20200218_1903... OK
  Applying sentry.0044_auto_20200219_0018... OK
  Applying sentry.0045_remove_incidentactivity_event_stats_snapshot... OK
  Applying sentry.0046_auto_20200221_1735... OK
  Applying sentry.0047_auto_20200224_2319... OK
  Applying sentry.0048_auto_20200302_1825... OK
  Applying sentry.0049_auto_20200304_0254... OK
  Applying sentry.0050_auto_20200306_2346... OK
  Applying sentry.0051_fix_auditlog_pickled_data... OK
  Applying sentry.0052_organizationonboardingtask_completion_seen... OK
  Applying sentry.0053_migrate_alert_task_onboarding... OK
  Applying sentry.0054_create_key_transaction... OK
  Applying sentry.0055_query_subscription_status... OK
  Applying sentry.0056_remove_old_functions... OK
  Applying sentry.0057_remove_unused_project_flag... OK
  Applying sentry.0058_project_issue_alerts_targeting... OK
  Applying sentry.0059_add_new_sentry_app_features... OK
  Applying sentry.0060_add_file_eventattachment_index... OK
  Applying sentry.0061_alertrule_partial_index... OK
  Applying sentry.0062_key_transactions_unique_with_owner... OK
  Applying sentry.0063_drop_alertrule_constraint... OK
  Applying sentry.0064_project_has_transactions... OK
  Applying sentry.0065_add_incident_status_method... OK
  Applying sentry.0066_alertrule_manager... OK
  Applying sentry.0067_migrate_rules_alert_targeting... OK
  Applying sentry.0068_project_default_flags... OK
  Applying sentry.0069_remove_tracked_superusers... OK
  Applying sentry.0070_incident_snapshot_support... OK
  Applying sentry.0071_add_default_fields_model_subclass... OK
  Applying sentry.0072_alert_rules_query_changes... OK
  Applying sentry.0073_migrate_alert_query_model... OK
  Applying sentry.0074_add_metric_alert_feature... OK
  Applying sentry.0075_metric_alerts_fix_releases... OK
  Applying sentry.0076_alert_rules_disable_constraints... OK
  Applying sentry.0077_alert_query_col_drop_state... OK
  Applying sentry.0078_incident_field_updates... OK
  Applying sentry.0079_incidents_remove_query_field_state... OK
  Applying sentry.0080_alert_rules_drop_unused_tables_cols... OK
  Applying sentry.0081_add_integraiton_upgrade_audit_log... OK
  Applying sentry.0082_alert_rules_threshold_float... OK
  Applying sessions.0001_initial... OK
  Applying sites.0001_initial... OK
  Applying sites.0002_alter_domain_unique... OK
  Applying social_auth.0001_initial... OK
06:18:30 [WARNING] sentry: Cannot initiate onboarding for organization (1) due to missing owners
Created internal Sentry project (slug=internal, id=1)

Would you like to create a user account now? [Y/n]: y
Email: denyan7373@163.com
Password:
Repeat for confirmation:
User created: denyan7373@163.com
Added to organization: sentry
Creating missing DSNs
Correcting Group.num_comments counter
root@6590bdae7ec0:/#exit

when I open 'http://10.7.226.102:9000/organizations/sentry/projects/',it report errors Unable to fetch all project stats when I open 'http://10.7.226.102:9000/organizations/sentry/discover/queries/',it report errors Internal Error

So I did the following

$ docker logs sentry_onpremise_web_1
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
!! Configuration error: IOError: [Errno 13] Unable to load configuration file (Permission denied): u'/etc/sentry/sentry.conf.py'
06:09:42 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
06:09:47 [INFO] sentry.plugins.github: apps-not-configured
*** Starting uWSGI 2.0.18 (64bit) on [Mon Jun  1 06:09:47 2020] ***
compiled with version: 8.3.0 on 24 May 2020 22:34:17
os: Linux-4.15.0-88-generic #88~16.04.1-Ubuntu SMP Wed Feb 12 04:19:15 UTC 2020
nodename: 6590bdae7ec0
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: enabled
uwsgi socket 0 bound to TCP address 0.0.0.0:9000 fd 3
Python version: 2.7.16 (default, Oct 17 2019, 07:39:30)  [GCC 8.3.0]
Set PythonHome to /usr/local
Python main interpreter initialized at 0x55a62864c980
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
setting request body buffering size to 65536 bytes
mapped 1087040 bytes (1061 KB) for 6 cores
*** Operational MODE: preforking+threaded ***
spawned uWSGI master process (pid: 17)
spawned uWSGI worker 1 (pid: 21, cores: 2)
spawned uWSGI worker 2 (pid: 22, cores: 2)
spawned uWSGI worker 3 (pid: 23, cores: 2)
06:09:48 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
06:09:49 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
06:09:49 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
06:09:53 [INFO] sentry.plugins.github: apps-not-configured
06:09:53 [INFO] sentry.plugins.github: apps-not-configured
06:09:53 [INFO] sentry.plugins.github: apps-not-configured
WSGI app 0 (mountpoint='') ready in 6 seconds on interpreter 0x55a62864c980 pid: 22 (default app)
WSGI app 0 (mountpoint='') ready in 6 seconds on interpreter 0x55a62864c980 pid: 21 (default app)
WSGI app 0 (mountpoint='') ready in 7 seconds on interpreter 0x55a62864c980 pid: 23 (default app)
SIGINT/SIGQUIT received...killing workers...
worker 1 buried after 1 seconds
worker 2 buried after 1 seconds
worker 3 buried after 1 seconds
goodbye to uWSGI.
06:10:47 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
06:11:02 [INFO] sentry.plugins.github: apps-not-configured
*** Starting uWSGI 2.0.18 (64bit) on [Mon Jun  1 06:11:03 2020] ***
compiled with version: 8.3.0 on 24 May 2020 22:34:17
os: Linux-4.15.0-88-generic #88~16.04.1-Ubuntu SMP Wed Feb 12 04:19:15 UTC 2020
nodename: 6590bdae7ec0
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: enabled
uwsgi socket 0 bound to TCP address 0.0.0.0:9000 fd 3
Python version: 2.7.16 (default, Oct 17 2019, 07:39:30)  [GCC 8.3.0]
Set PythonHome to /usr/local
Python main interpreter initialized at 0x55b8b4b6a980
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
setting request body buffering size to 65536 bytes
mapped 1087040 bytes (1061 KB) for 6 cores
*** Operational MODE: preforking+threaded ***
spawned uWSGI master process (pid: 17)
spawned uWSGI worker 1 (pid: 21, cores: 2)
spawned uWSGI worker 2 (pid: 22, cores: 2)
spawned uWSGI worker 3 (pid: 23, cores: 2)
06:11:05 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
06:11:06 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
06:11:06 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
06:11:11 [INFO] sentry.plugins.github: apps-not-configured
WSGI app 0 (mountpoint='') ready in 9 seconds on interpreter 0x55b8b4b6a980 pid: 23 (default app)
06:11:12 [INFO] sentry.plugins.github: apps-not-configured
06:11:12 [INFO] sentry.plugins.github: apps-not-configured
WSGI app 0 (mountpoint='') ready in 9 seconds on interpreter 0x55b8b4b6a980 pid: 22 (default app)
WSGI app 0 (mountpoint='') ready in 9 seconds on interpreter 0x55b8b4b6a980 pid: 21 (default app)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/web/frontend/base.py", line 227, in dispatch
    return self.handle(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/django/utils/decorators.py", line 185, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/web/frontend/auth_login.py", line 223, in handle
    return super(AuthLoginView, self).handle(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/web/frontend/base.py", line 240, in handle
    return super(BaseView, self).dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/web/frontend/auth_login.py", line 241, in get
    org = Organization.get_default()
  File "/usr/local/lib/python2.7/site-packages/sentry/models/organization.py", line 156, in get_default
    return cls.objects.filter(status=OrganizationStatus.ACTIVE)[0]
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 289, in __getitem__
    return list(qs)[0]
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 250, in __iter__
    self._fetch_all()
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 1121, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
  File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
    raise original_exception
ProgrammingError: UndefinedTable('relation "sentry_organization" does not exist\nLINE 1: ...default_role", "sentry_organization"."flags" FROM "sentry_or...\n                                                             ^\n',)
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"."status" = %s LIMIT 1
06:13:38 [ERROR] django.request: Internal Server Error: /auth/login/ (status_code=500 request=<WSGIRequest: GET u'/auth/login/'>)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/integrations/excepthook.py", line 59, in sentry_sdk_excepthook
    hub.capture_event(event, hint=hint)
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/hub.py", line 323, in capture_event
    rv = client.capture_event(event, hint, scope)
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/client.py", line 323, in capture_event
    event_opt = self._prepare_event(event, hint, scope)
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/client.py", line 157, in _prepare_event
    event_ = scope.apply_to_event(event, hint)
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/scope.py", line 57, in wrapper
    return fn(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/scope.py", line 328, in apply_to_event
    return _drop(event, event_processor, "event processor")
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/scope.py", line 283, in _drop
    logger.info("%s (%s) dropped event (%s)", ty, cause, event)
  File "/usr/local/lib/python2.7/logging/__init__.py", line 1174, in info
    self._log(INFO, msg, args, **kwargs)
  File "/usr/local/lib/python2.7/logging/__init__.py", line 1293, in _log
    self.handle(record)
  File "/usr/local/lib/python2.7/logging/__init__.py", line 1303, in handle
    self.callHandlers(record)
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/integrations/logging.py", line 83, in sentry_patched_callhandlers
    return old_callhandlers(self, record)
  File "/usr/local/lib/python2.7/logging/__init__.py", line 1343, in callHandlers
    hdlr.handle(record)
  File "/usr/local/lib/python2.7/logging/__init__.py", line 766, in handle
    self.emit(record)
  File "/usr/local/lib/python2.7/site-packages/sentry/logging/handlers.py", line 98, in emit
    logger.log(**kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/../structlog/stdlib.py", line 102, in log
    return self._proxy_to_logger(_LEVEL_TO_NAME[level], event, *args, **kw)
  File "/usr/local/lib/python2.7/site-packages/sentry/../structlog/stdlib.py", line 119, in _proxy_to_logger
    **event_kw)
  File "/usr/local/lib/python2.7/site-packages/sentry/../structlog/_base.py", line 176, in _proxy_to_logger
    args, kw = self._process_event(method_name, event, event_kw)
  File "/usr/local/lib/python2.7/site-packages/sentry/../structlog/_base.py", line 136, in _process_event
    event_dict = proc(self._logger, method_name, event_dict)
  File "/usr/local/lib/python2.7/site-packages/sentry/../structlog/stdlib.py", line 275, in __call__
    event_dict['event'] = event_dict['event'] % args
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 226, in __repr__
    data = list(self[:REPR_OUTPUT_SIZE + 1])
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 250, in __iter__
    self._fetch_all()
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 1121, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
  File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
    raise original_exception
ProgrammingError: UndefinedTable('relation "sentry_projectkey" does not exist\nLINE 1: ...te_limit_window", "sentry_projectkey"."data" FROM "sentry_pr...\n                                                             ^\n',)
SQL: SELECT "sentry_projectkey"."id", "sentry_projectkey"."project_id", "sentry_projectkey"."label", "sentry_projectkey"."public_key", "sentry_projectkey"."secret_key", "sentry_projectkey"."roles", "sentry_projectkey"."status", "sentry_projectkey"."date_added", "sentry_projectkey"."rate_limit_count", "sentry_projectkey"."rate_limit_window", "sentry_projectkey"."data" FROM "sentry_projectkey" WHERE ("sentry_projectkey"."project_id" = %s AND "sentry_projectkey"."roles" = (("sentry_projectkey"."roles" | %s))) LIMIT 1
06:13:38 [ERROR] sentry_sdk.errors: Internal error in sentry_sdk
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/sentry/wsgi.py", line 36, in __call__
    response = super(FileWrapperWSGIHandler, self).__call__(environ, start_response)
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/integrations/django/__init__.py", line 118, in sentry_patched_wsgi_handler
    return SentryWsgiMiddleware(bound_old_app)(environ, start_response)
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/integrations/wsgi.py", line 127, in __call__
    reraise(*_capture_exception(hub))
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/integrations/wsgi.py", line 124, in __call__
    partial(_sentry_start_response, start_response, span),
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 157, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python2.7/site-packages/sentry_sdk/integrations/django/__init__.py", line 152, in sentry_patched_get_response
    return old_get_response(self, request)
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 124, in get_response
    response = self._middleware_chain(request)
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 43, in inner
    response = response_for_exception(request, exc)
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 93, in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 143, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/usr/local/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/web/frontend/error_500.py", line 38, in dispatch
    return render_to_response("sentry/500.html", status=500, context=context, request=request)
  File "/usr/local/lib/python2.7/site-packages/sentry/web/helpers.py", line 97, in render_to_response
    response = HttpResponse(render_to_string(template, context, request))
  File "/usr/local/lib/python2.7/site-packages/sentry/web/helpers.py", line 93, in render_to_string
    return loader.render_to_string(template, context=context, request=request)
  File "/usr/local/lib/python2.7/site-packages/django/template/loader.py", line 68, in render_to_string
    return template.render(context, request)
  File "/usr/local/lib/python2.7/site-packages/django/template/backends/django.py", line 66, in render
    return self.template.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 207, in render
    return self._render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 199, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 177, in render
    return compiled_parent._render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 199, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 177, in render
    return compiled_parent._render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 199, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/library.py", line 203, in render
    output = self.func(*resolved_args, **resolved_kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/templatetags/sentry_react.py", line 13, in get_react_config
    context = get_client_config(context.get("request", None))
  File "/usr/local/lib/python2.7/site-packages/sentry/web/client_config.py", line 144, in get_client_config
    public_dsn = _get_public_dsn()
  File "/usr/local/lib/python2.7/site-packages/sentry/web/client_config.py", line 90, in _get_public_dsn
    key = _get_project_key(project_id)
  File "/usr/local/lib/python2.7/site-packages/sentry/web/client_config.py", line 76, in _get_project_key
    )[0]
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 289, in __getitem__
    return list(qs)[0]
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 250, in __iter__
    self._fetch_all()
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 1121, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
  File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
    raise original_exception
django.db.utils.ProgrammingError: UndefinedTable('relation "sentry_projectkey" does not exist\nLINE 1: ...te_limit_window", "sentry_projectkey"."data" FROM "sentry_pr...\n                                                             ^\n',)
SQL: SELECT "sentry_projectkey"."id", "sentry_projectkey"."project_id", "sentry_projectkey"."label", "sentry_projectkey"."public_key", "sentry_projectkey"."secret_key", "sentry_projectkey"."roles", "sentry_projectkey"."status", "sentry_projectkey"."date_added", "sentry_projectkey"."rate_limit_count", "sentry_projectkey"."rate_limit_window", "sentry_projectkey"."data" FROM "sentry_projectkey" WHERE ("sentry_projectkey"."project_id" = %s AND "sentry_projectkey"."roles" = (("sentry_projectkey"."roles" | %s))) LIMIT 1
06:21:49 [INFO] sentry.superuser: superuser.logged-in (user_id=1 ip_address=u'10.137.170.163')
06:21:49 [INFO] sentry.auth: user.auth.success (username=u'denyan7373@163.com' organization_id=1L ip_address=u'10.137.170.163')
06:21:49 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/auth/login/' method=u'GET' ip_address=u'10.137.170.163')
06:21:49 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/organizations/sentry/issues/' method=u'GET' ip_address=u'10.137.170.163')
06:21:50 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/internal/health/' method=u'GET' ip_address=u'10.137.170.163')
06:21:50 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/?member=1' method=u'GET' ip_address=u'10.137.170.163')
06:21:50 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/assistant/?v2' method=u'GET' ip_address=u'10.137.170.163')
06:21:50 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/internal/options/?query=is:required' method=u'GET' ip_address=u'10.137.170.163')
06:21:50 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/internal/options/?query=is:required' method=u'GET' ip_address=u'10.137.170.163')
06:24:12 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/internal/options/?query=is:required' method=u'PUT' ip_address=u'10.137.170.163')
06:24:12 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/?detailed=0' method=u'GET' ip_address=u'10.137.170.163')
06:24:12 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/teams/' method=u'GET' ip_address=u'10.137.170.163')
06:24:12 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/projects/?all_projects=1' method=u'GET' ip_address=u'10.137.170.163')
/usr/local/lib/python2.7/site-packages/sentry/models/project.py:179: DeprecationWarning: Project.callsign is deprecated. Use Group.get_short_id() instead.
  "Project.callsign is deprecated. Use Group.get_short_id() instead.", DeprecationWarning
06:24:12 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/projects/?per_page=50' method=u'GET' ip_address=u'10.137.170.163')
06:24:12 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/broadcasts/' method=u'GET' ip_address=u'10.137.170.163')
06:24:13 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/searches/?use_org_level=1' method=u'GET' ip_address=u'10.137.170.163')
06:24:13 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/users/' method=u'GET' ip_address=u'10.137.170.163')
06:24:13 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/tags/?statsPeriod=14d&use_cache=1' method=u'GET' ip_address=u'10.137.170.163')
06:24:13 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/issues/?limit=25&query=is%3Aunresolved&shortIdLookup=1&statsPeriod=14d' method=u'GET' ip_address=u'10.137.170.163')
06:24:13 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/processingissues/' method=u'GET' ip_address=u'10.137.170.163')
06:24:13 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/recent-searches/?query=&type=0&limit=3' method=u'GET' ip_address=u'10.137.170.163')
06:24:13 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/projects/?per_page=1' method=u'GET' ip_address=u'10.137.170.163')
06:24:13 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/sent-first-event/?is_member=true' method=u'GET' ip_address=u'10.137.170.163')
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/sentry/api/base.py", line 90, in handle_exception
    response = super(Endpoint, self).handle_exception(exc)
  File "/usr/local/lib/python2.7/site-packages/rest_framework/views.py", line 449, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python2.7/site-packages/sentry/api/base.py", line 207, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/api/endpoints/organization_tags.py", line 22, in get
    use_cache=request.GET.get("use_cache", "0") == "1",
  File "/usr/local/lib/python2.7/site-packages/sentry/utils/services.py", line 105, in <lambda>
    context[key] = (lambda f: lambda *a, **k: getattr(self, f)(*a, **k))(key)
  File "/usr/local/lib/python2.7/site-packages/sentry/tagstore/snuba/backend.py", line 342, in get_tag_keys_for_projects
    **optimize_kwargs
  File "/usr/local/lib/python2.7/site-packages/sentry/tagstore/snuba/backend.py", line 258, in __get_tag_keys_for_projects
    **kwargs
  File "/usr/local/lib/python2.7/site-packages/sentry/utils/snuba.py", line 656, in query
    **kwargs
  File "/usr/local/lib/python2.7/site-packages/sentry/utils/snuba.py", line 549, in raw_query
    return bulk_raw_query([snuba_params], referrer=referrer)[0]
  File "/usr/local/lib/python2.7/site-packages/sentry/utils/snuba.py", line 613, in bulk_raw_query
    error["message"]
QueryExecutionError: [60] DB::Exception: Table default.sentry_local doesn't exist.. Stack trace:

0. 0x564001aa6e90 StackTrace::StackTrace() /usr/bin/clickhouse
1. 0x564001aa6c65 DB::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) /usr/bin/clickhouse
2. 0x564004e06241 DB::Context::getTableImpl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, DB::Exception*) const /usr/bin/clickhouse
3. 0x564004e06431 DB::Context::getTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const /usr/bin/clickhouse
4. 0x564004e76581 DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr<DB::IAST> const&, DB::Context const&, std::shared_ptr<DB::IBlockInputStream> const&, std::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) /usr/bin/clickhouse
5. 0x564004e766c7 DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) /usr/bin/clickhouse
6. 0x564004e9a9db DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) /usr/bin/clickhouse
7. 0x564004e52988 DB::InterpreterFactory::get(std::shared_ptr<DB::IAST>&, DB::Context&, DB::QueryProcessingStage::Enum) /usr/bin/clickhouse
8. 0x564004f9cc1a ? /usr/bin/clickhouse
9. 0x564004f9e09e DB::executeQuery(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, bool) /usr/bin/clickhouse
10. 0x564001b30514 DB::TCPHandler::runImpl() /usr/bin/clickhouse
11. 0x564001b30f5b DB::TCPHandler::run() /usr/bin/clickhouse
12. 0x564005a54df0 Poco::Net::TCPServerConnection::start() /usr/bin/clickhouse
13. 0x564005a5550d Poco::Net::TCPServerDispatcher::run() /usr/bin/clickhouse
14. 0x56400712b6b1 Poco::PooledThread::run() /usr/bin/clickhouse
15. 0x56400712945c Poco::ThreadImpl::runnableEntry(void*) /usr/bin/clickhouse
16. 0x56400789f5c0 ? /usr/bin/clickhouse
17. 0x7fdc747ec6db start_thread /lib/x86_64-linux-gnu/libpthread-2.27.so
18. 0x7fdc7410988f __clone /lib/x86_64-linux-gnu/libc-2.27.so

06:24:15 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/assistant/' method=u'PUT' ip_address=u'10.137.170.163')
06:24:16 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/user-teams/' method=u'GET' ip_address=u'10.137.170.163')
06:24:16 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/teams/sentry/sentry/members/' method=u'GET' ip_address=u'10.137.170.163')
06:24:16 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://10.7.226.102/api/0/organizations/sentry/projects/?statsPeriod=24h&query=id%3A1' method=u'GET' ip_address=u'10.137.170.163')
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/sentry/api/base.py", line 90, in handle_exception
    response = super(Endpoint, self).handle_exception(exc)
  File "/usr/local/lib/python2.7/site-packages/rest_framework/views.py", line 449, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python2.7/site-packages/sentry/api/base.py", line 207, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/api/endpoints/organization_projects.py", line 125, in get
    paginator_cls=OffsetPaginator,
  File "/usr/local/lib/python2.7/site-packages/sentry/api/base.py", line 285, in paginate
    results = on_results(cursor_result.results)
  File "/usr/local/lib/python2.7/site-packages/sentry/api/endpoints/organization_projects.py", line 118, in serialize_on_result
    return serialize(result, request.user, serializer)
  File "/usr/local/lib/python2.7/site-packages/sentry/api/serializers/base.py", line 41, in serialize
    **kwargs
  File "/usr/local/lib/python2.7/site-packages/sentry/api/serializers/models/project.py", line 293, in get_attrs
    attrs = super(ProjectSummarySerializer, self).get_attrs(item_list, user)
  File "/usr/local/lib/python2.7/site-packages/sentry/api/serializers/models/project.py", line 257, in get_attrs
    attrs = super(ProjectWithTeamSerializer, self).get_attrs(item_list, user)
  File "/usr/local/lib/python2.7/site-packages/sentry/api/serializers/models/project.py", line 143, in get_attrs
    environment_ids=self.environment_id and [self.environment_id],
  File "/usr/local/lib/python2.7/site-packages/sentry/utils/services.py", line 105, in <lambda>
    context[key] = (lambda f: lambda *a, **k: getattr(self, f)(*a, **k))(key)
  File "/usr/local/lib/python2.7/site-packages/sentry/tsdb/redissnuba.py", line 89, in method
    return getattr(self.backends[backend], key)(*a, **kw)
  File "/usr/local/lib/python2.7/site-packages/sentry/tsdb/snuba.py", line 356, in get_range
    group_on_time=True,
  File "/usr/local/lib/python2.7/site-packages/sentry/tsdb/snuba.py", line 284, in get_data
    is_grouprelease=(model == TSDBModel.frequent_releases_by_group),
  File "/usr/local/lib/python2.7/site-packages/sentry/utils/snuba.py", line 656, in query
    **kwargs
  File "/usr/local/lib/python2.7/site-packages/sentry/utils/snuba.py", line 549, in raw_query
    return bulk_raw_query([snuba_params], referrer=referrer)[0]
  File "/usr/local/lib/python2.7/site-packages/sentry/utils/snuba.py", line 613, in bulk_raw_query
    error["message"]
QueryExecutionError: [60] DB::Exception: Table default.sentry_local doesn't exist.. Stack trace:

0. 0x564001aa6e90 StackTrace::StackTrace() /usr/bin/clickhouse
1. 0x564001aa6c65 DB::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) /usr/bin/clickhouse
2. 0x564004e06241 DB::Context::getTableImpl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, DB::Exception*) const /usr/bin/clickhouse
3. 0x564004e06431 DB::Context::getTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const /usr/bin/clickhouse
4. 0x564004e76581 DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr<DB::IAST> const&, DB::Context const&, std::shared_ptr<DB::IBlockInputStream> const&, std::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) /usr/bin/clickhouse
5. 0x564004e766c7 DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) /usr/bin/clickhouse
6. 0x564004e9a9db DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) /usr/bin/clickhouse
7. 0x564004e52988 DB::InterpreterFactory::get(std::shared_ptr<DB::IAST>&, DB::Context&, DB::QueryProcessingStage::Enum) /usr/bin/clickhouse
8. 0x564004f9cc1a ? /usr/bin/clickhouse
9. 0x564004f9e09e DB::executeQuery(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, bool) /usr/bin/clickhouse
10. 0x564001b30514 DB::TCPHandler::runImpl() /usr/bin/clickhouse
11. 0x564001b30f5b DB::TCPHandler::run() /usr/bin/clickhouse
12. 0x564005a54df0 Poco::Net::TCPServerConnection::start() /usr/bin/clickhouse
13. 0x564005a5550d Poco::Net::TCPServerDispatcher::run() /usr/bin/clickhouse
14. 0x56400712b6b1 Poco::PooledThread::run() /usr/bin/clickhouse
15. 0x56400712945c Poco::ThreadImpl::runnableEntry(void*) /usr/bin/clickhouse
16. 0x56400789f5c0 ? /usr/bin/clickhouse
17. 0x7fdc747ec6db start_thread /lib/x86_64-linux-gnu/libpthread-2.27.so
18. 0x7fdc7410988f __clone /lib/x86_64-linux-gnu/libc-2.27.so

I guess it's caused by DB::Exception: Table default.sentry_local doesn't exist.. But I don't know how to deal with it Can you give me some advice? Thx.

BYK commented 4 years ago

Your install log is riddled with errors. What system are you running this on?

mokedeng commented 4 years ago

The above logs are based on Ubuntu 16.04.1, Details are as follows:

$ uname -a
Linux szdev-PC 4.15.0-88-generic #88~16.04.1-Ubuntu SMP Wed Feb 12 04:19:15 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ docker -v
Docker version 18.09.7, build 2d0083d
$ docker-compose -v
docker-compose version 1.24.0, build 0aa59064

I'm trying to install it on another CentOS server, The error log is almost the same

[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
[root@localhost ~]# docker -v
Docker version 19.03.9, build 9d988398e7
[root@localhost ~]# docker-compose -v
docker-compose version 1.26.0-rc4, build d279b7a8
BYK commented 4 years ago

./install.sh: 第 177 行: [: docker-compose version 1.24.0, build 0aa59064: 需要整数表达式

This error indicates (based on the translation I got) an issue with getting the results of docker-compose run commands. Your output is also riddled with docker-compose version 1.24.0, build 0aa59064 messages, indicating something is weird with your docker-compose. These messages should not appear and they are likely interfering with some of the checks we do on the docker-compose run outputs.

FAIL: Cannot read credentials back from relay/credentials.json.

This indicates your relay/credentials.json file is not readable by the current user, pointing to permission or ownership issues. I'd check these.

The output of $ docker logs sentry_onpremise_web_1 also indicates some permission/ownership issues. If you fix those, you should be good to go.

mokedeng commented 4 years ago

According to the guidance of the Forum https://forum.sentry.io/t/sentry-10-error-after-updating-docker-images/8880/5, After I run docker-compose run --rm snuba-api migrate , All the previous problems seem to have been solved,But I don't know why it works?

BYK commented 4 years ago

I think it is mostly a coincidence as the installation script failed at various points, including this step (a crucial step for things to work). But I'd guess some other change you have made fixed the main permission issues and other checks.

Closing as this is resolved and there's no action we can take on our side.