Hello,
I am trying to make a fresh install of sentry. All i did was git clone https://github.com/getsentry/onpremise.git
changing database setting and running ./install.sh
There is some kafka error:
connection to Kafka failed (attempt 0)
“Failed to get metadata: Local: Broker transport failure”
And then it ends up with:
django.db.utils.ProgrammingError: UndefinedTable(“ERREUR: la relation \xc2\xab south_migrationhistory \xc2\xbb n’existe pas\nLINE 1: SELECT 1 FROM south_migrationhistory LIMIT 1\n ^\n”,)
SQL: SELECT 1 FROM south_migrationhistory LIMIT 1
Here are the logs:
Checking minimum requirements…
Removing network onpremise_default
Network onpremise_default not found.
Removing network sentry_onpremise_default
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…
Some service image(s) must be built from source by running:
docker-compose build post-process-forwarder cron worker sentry-cleanup symbolicator-cleanup snuba-cleanup web ingest-consumer
latest: Pulling from getsentry/sentry
Digest: sha256:3c3dfe251ae04f0e1c8795d40e22bf76911bd12bad9b097183d6af33ff2272e1
Status: Image is up to date 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
—> Using cache
—> 035cfdc746e6
Step 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
—> Using cache
—> 7135d06f139b
Successfully built 7135d06f139b
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 post-process-forwarder
Building ingest-consumer
Building sentry-cleanup
Building symbolicator-cleanup
Building cron
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/*
—> Using cache
—> 5a0ed170dad0
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
—> Using cache
—> 89233325022e
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
—> Using cache
—> 078da3ad854f
Successfully built 078da3ad854f
Successfully tagged symbolicator-cleanup-onpremise-local:latest
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
Building symbolicator-cleanup … done
Building worker
—> 7135d06f139b
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron && rm -r /var/lib/apt/lists/*
—> Using cache
—> 67de6ef9be1e
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
—> Using cache
—> d8cfca480a43
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
—> Using cache
—> b580b81815d1
Successfully built b580b81815d1
Successfully tagged sentry-cleanup-onpremise-local:latest
Building sentry-cleanup … done
Building web
Step 1/4 : ARG SENTRY_IMAGEStep 1/4 : ARG SENTRY_IMAGE
Step 2/4 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
—> c09ef308d23b
Step 3/4 : COPY . /usr/src/sentry
Step 2/4 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
—> c09ef308d23b
Step 3/4 : COPY . /usr/src/sentry
—> Using cache
—> Using cache
—> 035cfdc746e6
—> 035cfdc746e6
Step 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fiStep 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
—> Using cache
—> Using cache
—> 7135d06f139b
—> 7135d06f139b
Successfully built 7135d06f139b
Successfully built 7135d06f139b
Step 1/4 : ARG SENTRY_IMAGE
Step 2/4 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
Successfully tagged sentry-onpremise-local:latest
Building ingest-consumer … done
Building snuba-cleanup
—> c09ef308d23b
Step 3/4 : COPY . /usr/src/sentry
Successfully tagged sentry-onpremise-local:latest
Building cron … done
—> Using cache
—> 035cfdc746e6
Step 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
—> Using cache
—> 7135d06f139b
Successfully built 7135d06f139b
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}
—> c09ef308d23b
Step 3/4 : COPY . /usr/src/sentry
—> Using cache
—> 035cfdc746e6
Step 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
—> Using cache
—> 7135d06f139b
Successfully built 7135d06f139b
Successfully tagged sentry-onpremise-local:latest
Building worker … done
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
—> 035cfdc746e6
Step 4/4 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
—> Using cache
—> 7135d06f139b
Successfully built 7135d06f139b
Successfully tagged sentry-onpremise-local:latest
Building web … done
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/*
—> Using cache
—> edd9e4829273
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
—> Using cache
—> a442b50ff8e2
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
—> Using cache
—> 5a0b0ffad38b
Successfully built 5a0b0ffad38b
Successfully tagged snuba-cleanup-onpremise-local:latest
Building snuba-cleanup … done
Docker images built.
Bootstrapping Snuba…
Creating network “sentry_onpremise_default” with the default driver
Creating sentry_onpremise_zookeeper_1 …
Creating sentry_onpremise_clickhouse_1 …
Creating sentry_onpremise_redis_1 …
Creating sentry_onpremise_zookeeper_1 … done
Creating sentry_onpremise_kafka_1 …
Creating sentry_onpremise_redis_1 … done
Creating sentry_onpremise_clickhouse_1 … done
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 09:58:03,346 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 09:58:05,350 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 09:58:06,437 Failed to create topic outcomes
Traceback (most recent call last):
File “/usr/src/snuba/snuba/cli/bootstrap.py”, line 91, 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 ‘outcomes’ already exists.”}
2020-04-25 09:58:06,444 Failed to create topic events
Traceback (most recent call last):
File “/usr/src/snuba/snuba/cli/bootstrap.py”, line 91, 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-25 09:58:06,445 Failed to create topic errors-replacements
Traceback (most recent call last):
File “/usr/src/snuba/snuba/cli/bootstrap.py”, line 91, 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-25 09:58:06,447 Failed to create topic cdc
Traceback (most recent call last):
File “/usr/src/snuba/snuba/cli/bootstrap.py”, line 91, 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 ‘cdc’ already exists.”}
2020-04-25 09:58:06,448 Failed to create topic ingest-sessions
Traceback (most recent call last):
File “/usr/src/snuba/snuba/cli/bootstrap.py”, line 91, 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-25 09:58:06,449 Failed to create topic event-replacements
Traceback (most recent call last):
File “/usr/src/snuba/snuba/cli/bootstrap.py”, line 91, 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-25 09:58:06,450 Failed to create topic snuba-commit-log
Traceback (most recent call last):
File “/usr/src/snuba/snuba/cli/bootstrap.py”, line 91, 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-25 09:58:06,489 Tables for dataset outcomes created.
2020-04-25 09:58:06,523 Tables for dataset events_migration created.
2020-04-25 09:58:06,546 Tables for dataset discover created.
2020-04-25 09:58:06,555 Tables for dataset groupassignee created.
2020-04-25 09:58:06,559 Tables for dataset outcomes_raw created.
2020-04-25 09:58:06,574 Tables for dataset transactions created.
2020-04-25 09:58:06,592 Tables for dataset sessions created.
2020-04-25 09:58:06,601 Tables for dataset groupedmessage created.
2020-04-25 09:58:06,635 Tables for dataset events created.
Starting sentry_onpremise_zookeeper_1 …
Starting sentry_onpremise_clickhouse_1 …
Starting sentry_onpremise_zookeeper_1 … done
Starting sentry_onpremise_clickhouse_1 … done
Starting sentry_onpremise_redis_1 …
Starting sentry_onpremise_redis_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 09:58:10,588 Migrating dataset transactions
2020-04-25 09:58:10,616 Migrating dataset outcomes
2020-04-25 09:58:10,626 Migrating dataset events
2020-04-25 09:58:10,656 Migrating dataset groupedmessage
2020-04-25 09:58:10,663 Migrating dataset groupassignee
2020-04-25 09:58:10,670 Migrating dataset outcomes_raw
2020-04-25 09:58:10,674 Migrating dataset events_migration
2020-04-25 09:58:10,697 Migrating dataset discover
2020-04-25 09:58:10,720 Migrating dataset sessions
Setting up database…
Starting sentry_onpremise_clickhouse_1 …
Starting sentry_onpremise_clickhouse_1 … done
Creating sentry_onpremise_postgres_1 …
Starting sentry_onpremise_redis_1 …
Creating sentry_onpremise_memcached_1 …
Starting sentry_onpremise_redis_1 … done
Starting sentry_onpremise_zookeeper_1 …
Creating sentry_onpremise_symbolicator_1 …
Starting sentry_onpremise_zookeeper_1 … done
Starting sentry_onpremise_kafka_1 …
Starting sentry_onpremise_kafka_1 … done
Creating sentry_onpremise_smtp_1 …
Creating sentry_onpremise_snuba-api_1 …
Creating sentry_onpremise_snuba-outcomes-consumer_1 …
Creating sentry_onpremise_snuba-replacer_1 …
Creating sentry_onpremise_snuba-consumer_1 …
Creating sentry_onpremise_postgres_1 … done
Creating sentry_onpremise_memcached_1 … done
Creating sentry_onpremise_symbolicator_1 … done
Creating sentry_onpremise_snuba-consumer_1 … done
Creating sentry_onpremise_snuba-api_1 … done
Creating sentry_onpremise_snuba-replacer_1 … done
Creating sentry_onpremise_smtp_1 … done
Creating sentry_onpremise_snuba-outcomes-consumer_1 … done
09:58:16 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
09:58:22 [INFO] sentry.plugins.github: apps-not-configured
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 121, in _upgrade
_migrate_from_south(verbosity)
File “/usr/local/lib/python2.7/site-packages/sentry/runner/commands/upgrade.py”, line 93, in _migrate_from_south
if not _has_south_history(connection):
File “/usr/local/lib/python2.7/site-packages/sentry/runner/commands/upgrade.py”, line 80, in _has_south_history
cursor.execute(“SELECT 1 FROM south_migrationhistory LIMIT 1”)
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 62, in execute
return self.cursor.execute(sql)
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 79, in execute
return self.cursor.execute(sql)
django.db.utils.ProgrammingError: UndefinedTable(“ERREUR: la relation \xc2\xab south_migrationhistory \xc2\xbb n’existe pas\nLINE 1: SELECT 1 FROM south_migrationhistory LIMIT 1\n ^\n”,)
SQL: SELECT 1 FROM south_migrationhistory LIMIT 1
Cleaning up…