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

Install.sh crashing #428

Closed itsmichaelk closed 4 years ago

itsmichaelk commented 4 years ago

Hey there!

I tried to run install.sh, but sadly it doesn't work as expected.

docker-compose --version docker-compose version 1.25.0, build 0a186604

docker --version Docker version 18.06.1-ce, build e68fc7a215d7133c34aa18e3b72b4a21fd0c6136

cat /etc/os-release NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" VERSION_ID="2" PRETTY_NAME="Amazon Linux 2" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2" HOME_URL="https://amazonlinux.com/"

ERROR LOG

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.

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

Building and tagging Docker images...

Pulling smtp ...
Pulling memcached ...
Pulling redis ...
Pulling postgres ...
Pulling zookeeper ...
Pulling kafka ...
Pulling clickhouse ...
Pulling snuba-api ...
Pulling snuba-consumer ...
Pulling snuba-replacer ...
Pulling symbolicator ...
Pulling clickhouse ... pulling from yandex/clickhouse-se...
Pulling clickhouse ... digest: sha256:9cda4acf02b112f7c1...
Pulling clickhouse ... status: image is up to date for y...
Pulling clickhouse ... done
Pulling zookeeper ... pulling from confluentinc/cp-zook...
Pulling memcached ... pulling from library/memcached
Pulling zookeeper ... digest: sha256:c63871c17b038e1685...
Pulling zookeeper ... status: image is up to date for c...
Pulling zookeeper ... done
Pulling symbolicator ... pulling from getsentry/symbolicator
Pulling symbolicator ... digest: sha256:ed98e41c60fdcbe6a2...
Pulling symbolicator ... status: image is up to date for g...
Pulling symbolicator ... done
Pulling postgres ... pulling from library/postgres
Pulling memcached ... digest: sha256:6627e971255440a1bd...
Pulling memcached ... status: image is up to date for m...
Pulling memcached ... done
Pulling postgres ... digest: sha256:df815e77bcd2da9fa1...
Pulling postgres ... status: image is up to date for p...
Pulling postgres ... done
Pulling redis ... pulling from library/redis
Pulling snuba-api ... pulling from getsentry/snuba
Pulling snuba-api ... digest: sha256:1d40a5078cb414a10b...
Pulling snuba-api ... status: image is up to date for g...
Pulling snuba-api ... done
Pulling snuba-consumer ... pulling from getsentry/snuba
Pulling snuba-consumer ... digest: sha256:1d40a5078cb414a10b...
Pulling snuba-consumer ... status: image is up to date for g...
Pulling snuba-consumer ... done
Pulling redis ... digest: sha256:511275ddf4c4582e29...
Pulling redis ... status: image is up to date for r...
Pulling redis ... done
Pulling smtp ... pulling from tianon/exim4
Pulling smtp ... digest: sha256:44479186c8aa716f51...
Pulling smtp ... status: image is up to date for t...
Pulling smtp ... done
Pulling snuba-replacer ... pulling from getsentry/snuba
Pulling snuba-replacer ... digest: sha256:1d40a5078cb414a10b...
Pulling snuba-replacer ... status: image is up to date for g...
Pulling snuba-replacer ... done
Pulling kafka ... pulling from confluentinc/cp-kafka
Pulling kafka ... digest: sha256:c5ff41b494329e9dea...
Pulling kafka ... status: image is up to date for c...
Pulling kafka ... done
latest: Pulling from getsentry/sentry
Digest: sha256:4924814d79e4e59ef19476e442285403addb03086061124e7ce1692c5fb9a7f9
Status: Image is up to date for getsentry/sentry:latest
Building web
Step 1/11 : ARG SENTRY_IMAGE
Step 2/11 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
---> 6d99a25fcac1
Step 3/11 : WORKDIR /usr/src/sentry
---> Using cache
---> 8a0746d0d913
Step 4/11 : ENV PYTHONPATH /usr/src/sentry
---> Using cache
---> a687af01e51a
Step 5/11 : COPY . /usr/src/sentry
---> Using cache
---> aa59e1f7f600
Step 6/11 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi
---> Using cache
---> cd2b5f7decdb
Step 7/11 : RUN if [ -s setup.py ]; then pip install -e .; fi
---> Using cache
---> 7535b90372f0
Step 8/11 : RUN if [ -s sentry.conf.py ]; then cp sentry.conf.py $SENTRY_CONF/; fi && if [ -s config.yml ]; then cp config.yml $SENTRY_CONF/; fi
---> Using cache
---> ad7dd479729f
Step 9/11 : RUN apt-get update && apt-get install -y gcc make nano
---> Using cache
---> e234f90dd4c5
Step 10/11 : RUN apt-get update && apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev
---> Using cache
---> e87edfe527e6
Step 11/11 : RUN pip install sentry-ldap-auth
---> Using cache
---> 38ee4a1c10f6

Successfully built 38ee4a1c10f6
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-replacer uses an image, skipping
symbolicator uses an image, skipping
Building snuba-cleanup ...
Building symbolicator-cleanup ...
Building web ...
Building cron ...
Building worker ...
Building post-process-forwarder ...
Building sentry-cleanup ...
Building snuba-cleanup
Building web
Building cron
Building post-process-forwarder
Building sentry-cleanup
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
---> 77855b9746cc
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron && rm -r /var/lib/apt/lists/*
---> Using cache
---> 228388b112eb
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
---> Using cache
---> cca12fd15f25
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
---> Using cache
---> ce9d9448f9c2

Successfully built ce9d9448f9c2
Successfully tagged snuba-cleanup-onpremise-local:latest
Building snuba-cleanup ... done
Building worker
Step 1/11 : ARG SENTRY_IMAGE
Step 2/11 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
---> 6d99a25fcac1
Step 3/11 : WORKDIR /usr/src/sentry
Step 1/11 : ARG SENTRY_IMAGE
Step 2/11 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
---> 6d99a25fcac1
Step 3/11 : WORKDIR /usr/src/sentry
---> Using cache
---> 8a0746d0d913
Step 4/11 : ENV PYTHONPATH /usr/src/sentry
---> Using cache
---> a687af01e51a
Step 5/11 : COPY . /usr/src/sentry
---> Using cache
---> 8a0746d0d913
Step 4/11 : ENV PYTHONPATH /usr/src/sentry ---> Using cache

---> aa59e1f7f600
Step 6/11 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi
---> Using cache
---> Using cache
---> a687af01e51a
---> cd2b5f7decdb
Step 7/11 : RUN if [ -s setup.py ]; then pip install -e .; fiStep 5/11 : COPY . /usr/src/sentry

---> Using cache
---> aa59e1f7f600
Step 6/11 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi ---> Using cache

---> 7535b90372f0
Step 8/11 : RUN if [ -s sentry.conf.py ]; then cp sentry.conf.py $SENTRY_CONF/; fi && if [ -s config.yml ]; then cp config.yml $SENTRY_CONF/; fi
---> Using cache
---> cd2b5f7decdb
Step 7/11 : RUN if [ -s setup.py ]; then pip install -e .; fi
---> Using cache
---> Using cache
---> 7535b90372f0
---> ad7dd479729f
Step 8/11 : RUN if [ -s sentry.conf.py ]; then cp sentry.conf.py $SENTRY_CONF/; fi && if [ -s config.yml ]; then cp config.yml $SENTRY_CONF/; fi
Step 9/11 : RUN apt-get update && apt-get install -y gcc make nano
---> Using cache
---> ad7dd479729f
Step 9/11 : RUN apt-get update && apt-get install -y gcc make nano
---> Using cache
---> e234f90dd4c5
Step 10/11 : RUN apt-get update && apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev
---> Using cache
---> Using cache
---> e87edfe527e6
---> e234f90dd4c5
Step 11/11 : RUN pip install sentry-ldap-authStep 10/11 : RUN apt-get update && apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev

---> Using cache
---> e87edfe527e6
Step 11/11 : RUN pip install sentry-ldap-auth
---> Using cache
---> 38ee4a1c10f6

---> Using cache
Successfully built 38ee4a1c10f6
---> 38ee4a1c10f6

Successfully built 38ee4a1c10f6
Successfully tagged sentry-onpremise-local:latest
Step 1/11 : ARG SENTRY_IMAGE
Step 2/11 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
Building symbolicator-cleanup
Building web ... done
Successfully tagged sentry-onpremise-local:latest
Building cron ... done
---> 6d99a25fcac1
Step 3/11 : WORKDIR /usr/src/sentry
---> Using cache
---> 8a0746d0d913
Step 4/11 : ENV PYTHONPATH /usr/src/sentry
---> Using cache
---> a687af01e51a
Step 5/11 : COPY . /usr/src/sentry
---> Using cache
---> aa59e1f7f600
Step 6/11 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi
---> Using cache
---> cd2b5f7decdb
Step 7/11 : RUN if [ -s setup.py ]; then pip install -e .; fi
---> Using cache
---> 7535b90372f0
Step 8/11 : RUN if [ -s sentry.conf.py ]; then cp sentry.conf.py $SENTRY_CONF/; fi && if [ -s config.yml ]; then cp config.yml $SENTRY_CONF/; fi
---> Using cache
---> ad7dd479729f
Step 9/11 : RUN apt-get update && apt-get install -y gcc make nano
---> Using cache
---> e234f90dd4c5
Step 10/11 : RUN apt-get update && apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev
---> Using cache
---> e87edfe527e6
Step 11/11 : RUN pip install sentry-ldap-auth
---> Using cache
---> 38ee4a1c10f6

Successfully built 38ee4a1c10f6
Successfully tagged sentry-onpremise-local:latest
Building post-process-forwarder ... done
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
---> 38ee4a1c10f6
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron && rm -r /var/lib/apt/lists/*
---> Using cache
---> 5bd097da096c
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
---> Using cache
---> a886534f6e6c
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
---> Using cache
---> e55f6ba9dab4

Successfully built e55f6ba9dab4
Successfully tagged sentry-cleanup-onpremise-local:latest
Building sentry-cleanup ... done
Step 1/11 : ARG SENTRY_IMAGE
Step 2/11 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
---> 6d99a25fcac1
Step 3/11 : WORKDIR /usr/src/sentry
---> Using cache
---> 8a0746d0d913
Step 4/11 : ENV PYTHONPATH /usr/src/sentry
---> Using cache
---> a687af01e51a
Step 5/11 : COPY . /usr/src/sentry
---> Using cache
---> aa59e1f7f600
Step 6/11 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi
---> Using cache
---> cd2b5f7decdb
Step 7/11 : RUN if [ -s setup.py ]; then pip install -e .; fi
---> Using cache
---> 7535b90372f0
Step 8/11 : RUN if [ -s sentry.conf.py ]; then cp sentry.conf.py $SENTRY_CONF/; fi && if [ -s config.yml ]; then cp config.yml $SENTRY_CONF/; fi
---> Using cache
---> ad7dd479729f
Step 9/11 : RUN apt-get update && apt-get install -y gcc make nano
---> Using cache
---> e234f90dd4c5
Step 10/11 : RUN apt-get update && apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev
---> Using cache
---> e87edfe527e6
Step 11/11 : RUN pip install sentry-ldap-auth
---> Using cache
---> 38ee4a1c10f6

Successfully built 38ee4a1c10f6
Successfully tagged sentry-onpremise-local:latest
Building worker ... done
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
---> 147384c921c9
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron && rm -r /var/lib/apt/lists/*
---> Using cache
---> 3b5d49f60f32
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
---> Using cache
---> 5cd5cf5d0a4f
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
---> Using cache
---> 5d9d00df65ba

Successfully built 5d9d00df65ba
Successfully tagged symbolicator-cleanup-onpremise-local:latest
Building symbolicator-cleanup ... done

Docker images built.
Bootstrapping Snuba...
Creating network "sentry_onpremise_default" with the 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-03 10:58:14,213 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-03 10:58:16,216 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-03 10:58:17,302 Failed to create topic cdc
Traceback (most recent call last):
File "/usr/src/snuba/snuba/cli/bootstrap.py", line 89, in bootstrap
future.result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 435, in result
return self.__get_result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'cdc' already exists."}
2020-04-03 10:58:17,302 Failed to create topic events
Traceback (most recent call last):
File "/usr/src/snuba/snuba/cli/bootstrap.py", line 89, in bootstrap
future.result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
return self.__get_result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'events' already exists."}
2020-04-03 10:58:17,303 Failed to create topic event-replacements
Traceback (most recent call last):
File "/usr/src/snuba/snuba/cli/bootstrap.py", line 89, in bootstrap
future.result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
return self.__get_result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'event-replacements' already exists."}
2020-04-03 10:58:17,303 Failed to create topic snuba-commit-log
Traceback (most recent call last):
File "/usr/src/snuba/snuba/cli/bootstrap.py", line 89, in bootstrap
future.result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
return self.__get_result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'snuba-commit-log' already exists."}
2020-04-03 10:58:17,303 Failed to create topic outcomes
Traceback (most recent call last):
File "/usr/src/snuba/snuba/cli/bootstrap.py", line 89, in bootstrap
future.result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
return self.__get_result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'outcomes' already exists."}
2020-04-03 10:58:17,303 Failed to create topic ingest-sessions
Traceback (most recent call last):
File "/usr/src/snuba/snuba/cli/bootstrap.py", line 89, in bootstrap
future.result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
return self.__get_result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'ingest-sessions' already exists."}
2020-04-03 10:58:17,304 Failed to create topic errors-replacements
Traceback (most recent call last):
File "/usr/src/snuba/snuba/cli/bootstrap.py", line 89, in bootstrap
future.result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
return self.__get_result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'errors-replacements' already exists."}
2020-04-03 10:58:17,323 Tables for dataset groupassignee created.
2020-04-03 10:58:17,346 Tables for dataset events created.
2020-04-03 10:58:17,348 Column 'size' exists in local ClickHouse but not in schema!
2020-04-03 10:58:17,348 Tables for dataset outcomes_raw created.
2020-04-03 10:58:17,364 Tables for dataset discover created.
2020-04-03 10:58:17,366 Column 'size' exists in local ClickHouse but not in schema!
2020-04-03 10:58:17,369 Column 'size' exists in local ClickHouse but not in schema!
2020-04-03 10:58:17,371 Tables for dataset outcomes created.
2020-04-03 10:58:17,380 Tables for dataset sessions created.
2020-04-03 10:58:17,388 Tables for dataset transactions created.
2020-04-03 10:58:17,393 Tables for dataset groupedmessage created.
2020-04-03 10:58:17,409 Tables for dataset events_migration created.
Starting sentry_onpremise_clickhouse_1 ...
Starting sentry_onpremise_redis_1 ...
Starting sentry_onpremise_clickhouse_1 ... done
Starting sentry_onpremise_redis_1 ... done
Starting sentry_onpremise_zookeeper_1 ...
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-03 10:58:21,223 Migrating dataset groupedmessage
2020-04-03 10:58:21,240 Migrating dataset transactions
2020-04-03 10:58:21,251 Migrating dataset events
2020-04-03 10:58:21,272 Migrating dataset groupassignee
2020-04-03 10:58:21,277 Migrating dataset outcomes
2020-04-03 10:58:21,280 Column 'size' exists in local ClickHouse but not in schema!
2020-04-03 10:58:21,283 Column 'size' exists in local ClickHouse but not in schema!
2020-04-03 10:58:21,285 Migrating dataset sessions
2020-04-03 10:58:21,294 Migrating dataset events_migration
2020-04-03 10:58:21,311 Migrating dataset discover
2020-04-03 10:58:21,327 Migrating dataset outcomes_raw
2020-04-03 10:58:21,330 Column 'size' exists in local ClickHouse but not in schema!
Setting up database...
Creating sentry_onpremise_smtp_1 ...
Starting sentry_onpremise_redis_1 ...
Starting sentry_onpremise_zookeeper_1 ...
Starting sentry_onpremise_clickhouse_1 ...
Starting sentry_onpremise_redis_1 ... done
Starting sentry_onpremise_zookeeper_1 ... done
Starting sentry_onpremise_clickhouse_1 ... done
Creating sentry_onpremise_memcached_1 ...
Creating sentry_onpremise_symbolicator_1 ...
Creating sentry_onpremise_postgres_1 ...
Starting sentry_onpremise_kafka_1 ...
Starting sentry_onpremise_kafka_1 ... done
Creating sentry_onpremise_snuba-api_1 ...
Creating sentry_onpremise_snuba-consumer_1 ...
Creating sentry_onpremise_snuba-replacer_1 ...
Creating sentry_onpremise_smtp_1 ... done
Creating sentry_onpremise_memcached_1 ... done
Creating sentry_onpremise_postgres_1 ... done
Creating sentry_onpremise_snuba-api_1 ... done
Creating sentry_onpremise_snuba-replacer_1 ... done
Creating sentry_onpremise_snuba-consumer_1 ... done
Creating sentry_onpremise_symbolicator_1 ... done
10:58:29 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
10:58:36 [INFO] sentry.plugins.github: apps-not-configured
�[36;1mOperations to perform:�[0m
�[1m Apply all migrations: �[0madmin, auth, contenttypes, jira_ac, nodestore, sentry, sessions, sites, social_auth
�[36;1mRunning migrations:�[0m
Applying sentry.0025_organizationaccessrequest_requester...Traceback (most recent call last):
File "/usr/local/bin/sentry", line 8, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/sentry/runner/init.py", line 166, in main
cli(prog_name=get_prog(), obj={}, max_content_width=100)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/decorators.py", line 30, in inner
return ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/commands/upgrade.py", line 168, in upgrade
_upgrade(not noinput, traceback, verbosity, not no_repair)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/commands/upgrade.py", line 130, in _upgrade
ignore_ghost_migrations=True,
File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py", line 131, in call_command
return command.execute(*args, **defaults)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 204, in handle
fake_initial=fake_initial,
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python2.7/site-packages/sentry/new_migrations/monkey/executor.py", line 26, in apply_migration
state, migration, fake=fake, fake_initial=fake_initial
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/migration.py", line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/operations/fields.py", line 88, in database_forwards
field,
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 445, in add_field
self.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 136, in execute
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/sentry_sdk/integrations/django/init.py", line 469, in execute
return real_execute(self, sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 81, in inner
raise_the_exception(self.db, e)
File "/usr/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 79, in inner
return func(self, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 22, in inner
return func(self, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 99, in inner
six.reraise(exc_info[0], exc_info0, exc_info[2])
File "/usr/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 95, in inner
return func(self, sql, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 78, in execute
return self.cursor.execute(sql, clean_bad_params(params))
django.db.utils.ProgrammingError: DuplicateColumn('column "requester_id" of relation "sentry_organizationaccessrequest" already exists\n',)
SQL: ALTER TABLE "sentry_organizationaccessrequest" ADD COLUMN "requester_id" integer NULL
Cleaning up...
theaayushanand commented 4 years ago

same issue. did you find any resolution ? according to logs its something to do with kafka

itsmichaelk commented 4 years ago

Not yet .. hopefully someone knows what's causing this.

BYK commented 4 years ago

Thanks for the report, we are investigating this.

BYK commented 4 years ago

@itsmichaelk @theaayushanand is this the first time you are running the install script or were there other tries? We couldn't identify any place where this column would be added earlier.

If this migration is being run twice though, it would cause the issue. If that's the case, we can manually mark it as run without executing the code and then continue from there.

BYK commented 4 years ago

Closing due to lack of response. Will reopen if there is a follow up :)

itsmichaelk commented 4 years ago

@itsmichaelk @theaayushanand is this the first time you are running the install script or were there other tries? We couldn't identify any place where this column would be added earlier.

If this migration is being run twice though, it would cause the issue. If that's the case, we can manually mark it as run without executing the code and then continue from there.

Hello BYK,

sorry .. this topic got totally lost in my mind. I think it wasn't the first try. The first try didn't work somehow (we fixed the error) and then this log above happened.

BYK commented 4 years ago

I think it wasn't the first try. The first try didn't work somehow (we fixed the error) and then this log above happened.

I think the db upgrade/init run silently died and your database migrations were cut in the middle. If you can reproduce this, we may look into it (probably would need to increase the minimum memory check) otherwise I'd call it a fluke on your system.