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.83k stars 1.76k forks source link

relay::cli Permission denied (os error 13) /etc/relay/credentials.json #446

Closed kslr closed 4 years ago

kslr commented 4 years ago

Ubuntu 18.04.3 LTS Docker version 19.03.1, build 74b1e89

Checking minimum requirements...
Removing network onpremise_default
Network onpremise_default not found.
Removing network sentry_onpremise_default
Network sentry_onpremise_default not found.

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...

Some service image(s) must be built from source by running:
    docker-compose build post-process-forwarder cron worker web ingest-consumer symbolicator-cleanup snuba-cleanup sentry-cleanup
latest: Pulling from getsentry/sentry
8d691f585fa8: Pulling fs layer
3fd6980f9df6: Pulling fs layer
c4f890363b98: Pulling fs layer
b8cfb9853b0a: Pulling fs layer
f235248cf522: Pulling fs layer
66faa48e3ae9: Pulling fs layer
b1876d473656: Pulling fs layer
424dca760285: Pulling fs layer
cd721e9af9b4: Pulling fs layer
c2c6e238cafb: Pulling fs layer
4c8ac92dc998: Pulling fs layer
fa155f8a6a45: Pulling fs layer
9fa7f6f7b21d: Pulling fs layer
c2c6e238cafb: Waiting
4c8ac92dc998: Waiting
fa155f8a6a45: Waiting
9fa7f6f7b21d: Waiting
b8cfb9853b0a: Waiting
f235248cf522: Waiting
66faa48e3ae9: Waiting
b1876d473656: Waiting
424dca760285: Waiting
cd721e9af9b4: Waiting
3fd6980f9df6: Verifying Checksum
3fd6980f9df6: Download complete
b8cfb9853b0a: Verifying Checksum
b8cfb9853b0a: Download complete
c4f890363b98: Download complete
8d691f585fa8: Verifying Checksum
8d691f585fa8: Download complete
f235248cf522: Verifying Checksum
f235248cf522: Download complete
66faa48e3ae9: Verifying Checksum
66faa48e3ae9: Download complete
b1876d473656: Verifying Checksum
b1876d473656: Download complete
cd721e9af9b4: Verifying Checksum
cd721e9af9b4: Download complete
c2c6e238cafb: Verifying Checksum
c2c6e238cafb: Download complete
4c8ac92dc998: Verifying Checksum
4c8ac92dc998: Download complete
fa155f8a6a45: Verifying Checksum
fa155f8a6a45: Download complete
9fa7f6f7b21d: Verifying Checksum
9fa7f6f7b21d: Download complete
424dca760285: Verifying Checksum
424dca760285: Download complete
8d691f585fa8: Pull complete
3fd6980f9df6: Pull complete
c4f890363b98: Pull complete
b8cfb9853b0a: Pull complete
f235248cf522: Pull complete
66faa48e3ae9: Pull complete
b1876d473656: Pull complete
424dca760285: Pull complete
cd721e9af9b4: Pull complete
c2c6e238cafb: Pull complete
4c8ac92dc998: Pull complete
fa155f8a6a45: Pull complete
9fa7f6f7b21d: Pull complete
Digest: sha256:3c3dfe251ae04f0e1c8795d40e22bf76911bd12bad9b097183d6af33ff2272e1
Status: Downloaded newer image for getsentry/sentry:latest
docker.io/getsentry/sentry:latest

Building and tagging Docker images...

Building web
Step 1/4 : ARG SENTRY_IMAGE
Step 2/4 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
 ---> c09ef308d23b
Step 3/4 : COPY . /usr/src/sentry
 ---> 0893b9648a46
Step 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
 ---> Running in f23a4643ce14
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Removing intermediate container f23a4643ce14
 ---> a679e20b2744

Successfully built a679e20b2744
Successfully tagged sentry-onpremise-local:latest
smtp uses an image, skipping
memcached uses an image, skipping
redis uses an image, skipping
postgres uses an image, skipping
zookeeper uses an image, skipping
kafka uses an image, skipping
clickhouse uses an image, skipping
snuba-api uses an image, skipping
snuba-consumer uses an image, skipping
snuba-outcomes-consumer uses an image, skipping
snuba-replacer uses an image, skipping
symbolicator uses an image, skipping
relay uses an image, skipping
nginx uses an image, skipping
Building snuba-cleanup          ... 
Building symbolicator-cleanup   ... 
Building web                    ... 
Building cron                   ... 
Building worker                 ... 
Building ingest-consumer        ... 
Building post-process-forwarder ... 
Building sentry-cleanup         ... 
Building snuba-cleanup
Building symbolicator-cleanup
Building worker
Building web
Building ingest-consumer
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
 ---> e4db2eaa424c
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
 ---> b57896a79101
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
Step 1/4 : ARG SENTRY_IMAGE
Step 2/4 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
 ---> c09ef308d23b
Step 3/4 : COPY . /usr/src/sentry
Step 1/4 : ARG SENTRY_IMAGE
Step 2/4 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
 ---> c09ef308d23b
Step 3/4 : COPY . /usr/src/sentry
 ---> Using cache
 ---> Using cache
 ---> 0893b9648a46
Step 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
Step 1/4 : ARG SENTRY_IMAGE ---> Using cache
 ---> 0893b9648a46

 ---> a679e20b2744
Step 2/4 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
Step 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
Successfully built a679e20b2744

 ---> Using cache
 ---> a679e20b2744

Successfully built a679e20b2744
 ---> c09ef308d23b
Step 3/4 : COPY . /usr/src/sentry
Successfully tagged sentry-onpremise-local:latest
Successfully tagged sentry-onpremise-local:latest
Building worker                 ... done
 ---> Using cache
 ---> 0893b9648a46
Step 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
 ---> Using cache
Building post-process-forwarder
 ---> a679e20b2744

Successfully built a679e20b2744
Building ingest-consumer        ... done
Building cron
Successfully tagged sentry-onpremise-local:latest
Building web                    ... done
Building sentry-cleanup
 ---> Running in aaa51cf5bcfe
 ---> Running in 79c1e23bfe23
Step 1/4 : ARG SENTRY_IMAGE
Step 2/4 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
 ---> c09ef308d23b
Step 3/4 : COPY . /usr/src/sentry
 ---> Using cache
 ---> 0893b9648a46
Step 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
 ---> Using cache
 ---> a679e20b2744

Successfully built a679e20b2744
Successfully tagged sentry-onpremise-local:latest
Building post-process-forwarder ... done
Step 1/4 : ARG SENTRY_IMAGE
Step 2/4 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
 ---> a679e20b2744
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
 ---> c09ef308d23b
Step 3/4 : COPY . /usr/src/sentry
 ---> Using cache
 ---> 0893b9648a46
Step 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
 ---> Using cache
 ---> a679e20b2744

Successfully built a679e20b2744
Successfully tagged sentry-onpremise-local:latest
Building cron                   ... done
 ---> Running in 9e6dd71331e7
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://deb.debian.org/debian stretch InRelease
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:4 http://deb.debian.org/debian stretch Release [118 kB]
Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:5 http://deb.debian.org/debian stretch Release.gpg [2410 B]
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [523 kB]
Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [189 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [189 kB]
Get:7 http://deb.debian.org/debian stretch-updates/main amd64 Packages [27.9 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]
Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7083 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7380 B]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7380 B]
Fetched 7940 kB in 2s (3735 kB/s)
Reading package lists...Fetched 8339 kB in 2s (3720 kB/s)
Reading package lists...Fetched 8339 kB in 2s (3797 kB/s)
Reading package lists...
Reading package lists...
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...

Building dependency tree...
Suggested packages:
  anacron logrotate checksecurity
Recommended packages:
  exim4 | postfix | mail-transport-agent
Building dependency tree...The following NEW packages will be installed:
  cron
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 95.4 kB of archives.
After this operation, 257 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian stretch/main amd64 cron amd64 3.0pl1-128+deb9u1 [95.4 kB]

Reading state information...
debconf: delaying package configuration, since apt-utils is not installed

Reading state information...
Fetched 95.4 kB in 0s (7153 kB/s)
Selecting previously unselected package cron.
(Reading database ... 6684 files and directories currently installed.)
Preparing to unpack .../cron_3.0pl1-128+deb9u1_amd64.deb ...
Unpacking cron (3.0pl1-128+deb9u1) ...
Setting up cron (3.0pl1-128+deb9u1) ...
The following additional packages will be installed:
  sensible-utils
Suggested packages:
  anacron logrotate checksecurity
Recommended packages:
  default-mta | mail-transport-agent
Adding group `crontab' (GID 101) ...
The following NEW packages will be installed:
  cron sensible-utils
Done.
The following additional packages will be installed:
  lsb-base sensible-utils
Suggested packages:
  anacron logrotate checksecurity
Recommended packages:
  default-mta | mail-transport-agent
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 115 kB of archives.
After this operation, 333 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 sensible-utils all 0.0.12 [15.8 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 cron amd64 3.0pl1-134+deb10u1 [99.0 kB]
The following NEW packages will be installed:
  cron lsb-base sensible-utils
0 upgraded, 3 newly installed, 0 to remove and 12 not upgraded.
Need to get 143 kB of archives.
After this operation, 383 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 sensible-utils all 0.0.12 [15.8 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 lsb-base all 10.2019051400 [28.4 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 cron amd64 3.0pl1-134+deb10u1 [99.0 kB]
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
debconf: delaying package configuration, since apt-utils is not installed
Fetched 115 kB in 0s (4261 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package sensible-utils.
(Reading database ... 6849 files and directories currently installed.)
Preparing to unpack .../sensible-utils_0.0.12_all.deb ...
Unpacking sensible-utils (0.0.12) ...
Fetched 143 kB in 0s (9030 kB/s)
Selecting previously unselected package cron.
Preparing to unpack .../cron_3.0pl1-134+deb10u1_amd64.deb ...
Unpacking cron (3.0pl1-134+deb10u1) ...
Selecting previously unselected package sensible-utils.
(Reading database ... 11918 files and directories currently installed.)
Preparing to unpack .../sensible-utils_0.0.12_all.deb ...
Unpacking sensible-utils (0.0.12) ...
Setting up sensible-utils (0.0.12) ...
Setting up cron (3.0pl1-134+deb10u1) ...
Selecting previously unselected package lsb-base.
Preparing to unpack .../lsb-base_10.2019051400_all.deb ...
Unpacking lsb-base (10.2019051400) ...
Selecting previously unselected package cron.
Preparing to unpack .../cron_3.0pl1-134+deb10u1_amd64.deb ...
Unpacking cron (3.0pl1-134+deb10u1) ...
Adding group `crontab' (GID 101) ...
Done.
Setting up lsb-base (10.2019051400) ...
Setting up sensible-utils (0.0.12) ...
Setting up cron (3.0pl1-134+deb10u1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Adding group `crontab' (GID 101) ...
Done.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Removing intermediate container 79c1e23bfe23
 ---> 41fa87e5ce3b
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
 ---> 364eba96efd8
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
 ---> Running in 4562eda84eb8
Removing intermediate container 4562eda84eb8
 ---> 6bf0c6cd0898

Successfully built 6bf0c6cd0898
Successfully tagged symbolicator-cleanup-onpremise-local:latest
Building symbolicator-cleanup   ... done
Removing intermediate container aaa51cf5bcfe
 ---> 1117181c2377
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
Removing intermediate container 9e6dd71331e7
 ---> 339e9cb0ff2e
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
 ---> 6adddfc97adf
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
 ---> 5a4df879e54a
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
 ---> Running in d1d3eb547d9d
 ---> Running in 5b91ed6d988a
Removing intermediate container d1d3eb547d9d
 ---> 4757add4765d

Successfully built 4757add4765d
Successfully tagged snuba-cleanup-onpremise-local:latest
Building snuba-cleanup          ... done
Removing intermediate container 5b91ed6d988a
 ---> 8ce9f5d87558

Successfully built 8ce9f5d87558
Successfully tagged sentry-cleanup-onpremise-local:latest
Building sentry-cleanup         ... done

Docker images built.
Bootstrapping Snuba...
Creating network "sentry_onpremise_default" with the default driver
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
Creating sentry_onpremise_clickhouse_1 ... 
Creating sentry_onpremise_redis_1      ... 
Creating sentry_onpremise_zookeeper_1  ... 
Creating sentry_onpremise_clickhouse_1 ... done
Creating sentry_onpremise_redis_1      ... done
Creating sentry_onpremise_zookeeper_1  ... done
Creating sentry_onpremise_kafka_1      ... 
Creating sentry_onpremise_kafka_1      ... done
+ '[' b = - ']'
+ snuba bootstrap --help
+ set -- snuba bootstrap --force
+ set gosu snuba snuba bootstrap --force
+ exec gosu snuba snuba bootstrap --force
2020-04-25 12:03:15,373 Connection to Kafka failed (attempt 0)
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 55, in bootstrap
    client.list_topics(timeout=1)
cimpl.KafkaException: KafkaError{code=_TRANSPORT,val=-195,str="Failed to get metadata: Local: Broker transport failure"}
2020-04-25 12:03:17,377 Connection to Kafka failed (attempt 1)
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 55, in bootstrap
    client.list_topics(timeout=1)
cimpl.KafkaException: KafkaError{code=_TRANSPORT,val=-195,str="Failed to get metadata: Local: Broker transport failure"}
2020-04-25 12:03:18,727 Topic ingest-sessions created
2020-04-25 12:03:18,728 Topic cdc created
2020-04-25 12:03:18,728 Topic outcomes created
2020-04-25 12:03:18,728 Topic events created
2020-04-25 12:03:18,728 Topic errors-replacements created
2020-04-25 12:03:18,728 Topic event-replacements created
2020-04-25 12:03:18,729 Topic snuba-commit-log created
2020-04-25 12:03:18,780 Tables for dataset sessions created.
2020-04-25 12:03:18,784 Tables for dataset groupedmessage created.
2020-04-25 12:03:18,795 Tables for dataset outcomes created.
2020-04-25 12:03:18,812 Tables for dataset discover created.
2020-04-25 12:03:18,816 Tables for dataset groupassignee created.
2020-04-25 12:03:18,824 Tables for dataset events_migration created.
2020-04-25 12:03:18,826 Tables for dataset outcomes_raw created.
2020-04-25 12:03:18,829 Tables for dataset transactions created.
2020-04-25 12:03:18,835 Tables for dataset events created.
Starting sentry_onpremise_redis_1 ... 
Starting sentry_onpremise_clickhouse_1 ... 
Starting sentry_onpremise_zookeeper_1  ... 
Starting sentry_onpremise_redis_1      ... done
Starting sentry_onpremise_clickhouse_1 ... done
Starting sentry_onpremise_zookeeper_1  ... done
Starting sentry_onpremise_kafka_1      ... 
Starting sentry_onpremise_kafka_1      ... done
+ '[' m = - ']'
+ snuba migrate --help
+ set -- snuba migrate
+ set gosu snuba snuba migrate
+ exec gosu snuba snuba migrate
2020-04-25 12:03:25,788 Migrating dataset discover
2020-04-25 12:03:25,850 Migrating dataset sessions
2020-04-25 12:03:25,872 Migrating dataset transactions
2020-04-25 12:03:25,895 Migrating dataset groupassignee
2020-04-25 12:03:25,905 Migrating dataset events_migration
2020-04-25 12:03:25,939 Migrating dataset outcomes
2020-04-25 12:03:25,953 Migrating dataset outcomes_raw
2020-04-25 12:03:25,959 Migrating dataset groupedmessage
2020-04-25 12:03:25,970 Migrating dataset events

Setting up database...
Starting sentry_onpremise_zookeeper_1 ... 
Starting sentry_onpremise_zookeeper_1 ... done
Creating sentry_onpremise_symbolicator_1 ... 
Creating sentry_onpremise_smtp_1         ... 
Starting sentry_onpremise_clickhouse_1   ... 
Creating sentry_onpremise_postgres_1     ... 
Starting sentry_onpremise_clickhouse_1   ... done
Starting sentry_onpremise_redis_1        ... 
Starting sentry_onpremise_redis_1        ... done
Creating sentry_onpremise_memcached_1    ... 
Starting sentry_onpremise_kafka_1        ... 
Starting sentry_onpremise_kafka_1        ... done
Creating sentry_onpremise_snuba-consumer_1 ... 
Creating sentry_onpremise_snuba-api_1      ... 
Creating sentry_onpremise_snuba-outcomes-consumer_1 ... 
Creating sentry_onpremise_snuba-replacer_1          ... 
Creating sentry_onpremise_memcached_1               ... done
Creating sentry_onpremise_snuba-replacer_1          ... done
Creating sentry_onpremise_snuba-api_1               ... done
Creating sentry_onpremise_snuba-consumer_1          ... done
Creating sentry_onpremise_smtp_1                    ... done
Creating sentry_onpremise_symbolicator_1            ... done
Creating sentry_onpremise_snuba-outcomes-consumer_1 ... done
Creating sentry_onpremise_postgres_1                ... done
12:03:41 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
12:03:48 [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 sessions.0001_initial... OK
  Applying sites.0001_initial... OK
  Applying sites.0002_alter_domain_unique... OK
  Applying social_auth.0001_initial... OK
12:05:22 [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]: n

Run `sentry createuser` to do this later.

Creating missing DSNs
Correcting Group.num_comments counter
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
cbdbe7a5bc2a: Already exists
Digest: sha256:9a839e63dad54c3a6d1834e29692c8492d93f90c59c978c1ed79109ea4fb9a54
Status: Downloaded newer image for alpine:latest

Generating Relay credentials...
Starting sentry_onpremise_redis_1 ... 
Starting sentry_onpremise_zookeeper_1 ... 
Starting sentry_onpremise_redis_1     ... done
Starting sentry_onpremise_zookeeper_1 ... done
Starting sentry_onpremise_kafka_1     ... 
Starting sentry_onpremise_kafka_1     ... done
 INFO  relay_config::config > generating new relay credentials
 ERROR relay::cli           > could not write config file (file /etc/relay/credentials.json)
  caused by: Permission denied (os error 13)
Cleaning up...
root@docker-s-4vcpu-8gb-nyc3-01:~/onpremise# docker-compose --no-ansi run --rm --user $(id -u) relay --config /etc/relay credentials generate --overwrite
Starting sentry_onpremise_zookeeper_1 ... 
Starting sentry_onpremise_redis_1     ... 
Starting sentry_onpremise_redis_1     ... done
Starting sentry_onpremise_zookeeper_1 ... done
Starting sentry_onpremise_kafka_1     ... 
Starting sentry_onpremise_kafka_1     ... done
 INFO  relay_config::config > generating new relay credentials
 ERROR relay::cli           > could not write config file (file /etc/relay/credentials.json)
  caused by: Permission denied (os error 13)
switz commented 4 years ago

Running into this myself as well -- will update if I come across a solution

kslr commented 4 years ago

Fix

replace https://github.com/getsentry/onpremise/blob/master/install.sh#L181

$dcr --entrypoint \"/bin/bash\" relay -c "relay --config /etc/relay credentials generate --overwrite"
switz commented 4 years ago

Awesome, thank you!

hsyntnc commented 4 years ago

@kslr thanks, works like charm!

maytanthegeek commented 4 years ago

First-time Sentry user here. Thanks @kslr for helping everyone out.

BYK commented 4 years ago

Sorry about this, should be fixed by #450.