I follow the instruction carefully, and had a second try and got the same issue
Mac OS Mojave 10.14.3
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/sentry/wsgi.py", line 21, in <module>
configure()
File "/usr/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 125, in configure
configure(ctx, py, yaml, skip_service_validation)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/settings.py", line 156, in configure
skip_service_validation=skip_service_validation
File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 274, in initialize_app
apply_legacy_settings(settings)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 510, in apply_legacy_settings
"`system.secret-key` MUST be set. Use 'sentry config generate-secret-key' to get one."
sentry.runner.importer.ConfigurationError: `system.secret-key` MUST be set. Use 'sentry config generate-secret-key' to get one.
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. GAME OVER ***
OOPS ! failed loading app in worker 1 (pid 19)
Sat Apr 27 00:44:31 2019 - need-app requested, destroying the instance...
OOPS ! failed loading app in worker 2 (pid 20)
Sat Apr 27 00:44:31 2019 - need-app requested, destroying the instance...
OOPS ! failed loading app in worker 3 (pid 21)
Sat Apr 27 00:44:31 2019 - need-app requested, destroying the instance...
goodbye to uWSGI.
m2
sorry, i ignored config.yml
same as me, @hiwjcn how do you solve this issue?
I follow the instruction, and add generated secret key value to .env as SENTRY_SECRET_KEY.
Traceback:
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/wsgi.py", line 21, in <module>
web_1 | configure()
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 125, in configure
web_1 | configure(ctx, py, yaml, skip_service_validation)
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/settings.py", line 156, in configure
web_1 | skip_service_validation=skip_service_validation
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 274, in initialize_app
web_1 | apply_legacy_settings(settings)
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 510, in apply_legacy_settings
web_1 | "`system.secret-key` MUST be set. Use 'sentry config generate-secret-key' to get one."
web_1 | sentry.runner.importer.ConfigurationError: `system.secret-key` MUST be set. Use 'sentry config generate-secret-key' to get one.
web_1 | unable to load app 0 (mountpoint='') (callable not found or import error)
web_1 | *** no app loaded. GAME OVER ***
web_1 | SIGINT/SIGQUIT received...killing workers...
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/wsgi.py", line 21, in <module>
web_1 | configure()
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 125, in configure
web_1 | configure(ctx, py, yaml, skip_service_validation)
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/settings.py", line 156, in configure
web_1 | skip_service_validation=skip_service_validation
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 274, in initialize_app
web_1 | apply_legacy_settings(settings)
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 510, in apply_legacy_settings
web_1 | "`system.secret-key` MUST be set. Use 'sentry config generate-secret-key' to get one."
web_1 | sentry.runner.importer.ConfigurationError: `system.secret-key` MUST be set. Use 'sentry config generate-secret-key' to get one.
web_1 | unable to load app 0 (mountpoint='') (callable not found or import error)
web_1 | *** no app loaded. GAME OVER ***
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/wsgi.py", line 21, in <module>
web_1 | configure()
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 125, in configure
web_1 | configure(ctx, py, yaml, skip_service_validation)
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/settings.py", line 156, in configure
web_1 | skip_service_validation=skip_service_validation
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 274, in initialize_app
web_1 | apply_legacy_settings(settings)
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 510, in apply_legacy_settings
web_1 | "`system.secret-key` MUST be set. Use 'sentry config generate-secret-key' to get one."
web_1 | sentry.runner.importer.ConfigurationError: `system.secret-key` MUST be set. Use 'sentry config generate-secret-key' to get one.
web_1 | unable to load app 0 (mountpoint='') (callable not found or import error)
web_1 | *** no app loaded. GAME OVER ***
web_1 | OOPS ! failed loading app in worker 3 (pid 22)
web_1 | Sun Apr 28 06:01:56 2019 - need-app requested, destroying the instance...
web_1 | OOPS ! failed loading app in worker 1 (pid 20)
web_1 | Sun Apr 28 06:01:57 2019 - need-app requested, destroying the instance...
web_1 | OOPS ! failed loading app in worker 2 (pid 21)
web_1 | Sun Apr 28 06:01:57 2019 - need-app requested, destroying the instance...
web_1 | goodbye to uWSGI.
web_1 | 06:02:02 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
same problem
Is this happening after https://github.com/getsentry/onpremise/pull/167 by any chance?
I just followed README.
docker volume create --name=sentry-data && docker volume create --name=sentry-postgres - Make our local database and sentry volumes Docker volumes have to be created manually, as they are declared as external to be more durable.
cp -n .env.example .env - create env config file
docker-compose build - Build and tag the Docker services
docker-compose run --rm web config generate-secret-key - Generate a secret key. Add it to .env as SENTRY_SECRET_KEY.
docker-compose run --rm web upgrade - Build the database. Use the interactive prompts to create a user account.
docker-compose up -d - Lift all services (detached/background mode).
Access your instance at localhost:9000!
And it still said there's a secret_key problem.
Is this happening after #167 by any chance?
I confirm this issue is related to 4 last commit.
There is no problem until in this commit.
@omidraha I paste the secret key into config.yml and this issue fixed.
but this operation were not be present in the guide section in readme file
@omidraha I paste the secret key into config.yml and this issue fixed.
but this operation were not be present in the guide section in readme file
I did, as value of this line, but that did not solve.
Please reopen this issue for others. (and unsubscribe your self if you don't want to follow)
@omidraha I paste the secret key into config.yml and this issue fixed.
but this operation were not be present in the guide section in readme fileI did, as value of this line, but that did not solve.
Please reopen this issue for others. (and unsubscribe your self if you don't want to follow)
change config.yml and docker-compose build again, then docker-compose up -d seems ok.
I鈥檒l look into this today and try to reproduce and fix.
@mattrobenolt I'm having the same issue, but following a parallel (?) line of instructions located at: https://docs.sentry.io/server/installation/docker/
Here are a few notes for starting from scratch on a EC2 instance to reproduce the error:
t2.large
Upgrades:
$ sudo yum update -y
$ sudo yum install git -y
$ sudo yum install docker -y
$ sudo service docker start
$ git clone https://github.com/getsentry/onpremise.git
$ cd onpremise
$ sudo make build
md5-a7f8d31217819978f810ddfd851aeb11
$ sudo docker run --detach --name sentry-redis redis:3.2-alpine
$ sudo docker run --detach --name sentry-postgres --env POSTGRES_PASSWORD=secret --env POSTGRES_USER=sentry postgres:9.5
md5-6794d7a4bd6d8691f21aedc1f33e572b
$ sudo docker run --rm sentry-onpremise --help
md5-a7f8d31217819978f810ddfd851aeb11
$ sudo docker run --rm sentry-onpremise config generate-secret-key
$ export SENTRY_SECRET_KEY=<returned_secret_from_above>
md5-a7f8d31217819978f810ddfd851aeb11
$ sudo docker run --link sentry-redis:redis --link sentry-postgres:postgres --env SENTRY_SECRET_KEY=${SENTRY_SECRET_KEY} --rm -it sentry-onpremise upgrade
<Enter in configure username/password>
md5-a7f8d31217819978f810ddfd851aeb11
$ sudo docker run --link sentry-redis:redis --link sentry-postgres:postgres --env SENTRY_SECRET_KEY=${SENTRY_SECRET_KEY} --name sentry-web-01 --publish 9000:9000 sentry-onpremise run web
Error:
Tue Apr 30 04:40:22 2019 - need-app requested, destroying the instance...
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/sentry/wsgi.py", line 21, in <module>
configure()
File "/usr/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 125, in configure
configure(ctx, py, yaml, skip_service_validation)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/settings.py", line 156, in configure
skip_service_validation=skip_service_validation
File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 274, in initialize_app
apply_legacy_settings(settings)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 510, in apply_legacy_settings
"`system.secret-key` MUST be set. Use 'sentry config generate-secret-key' to get one."
sentry.runner.importer.ConfigurationError: `system.secret-key` MUST be set. Use 'sentry config generate-secret-key' to get one.
Any idea what might be the issue?
@mattrobenolt is on it: https://github.com/getsentry/onpremise/pull/178#issuecomment-488644887
@omidraha I paste the secret key into config.yml and this issue fixed.
but this operation were not be present in the guide section in readme fileI did, as value of this line, but that did not solve.
Please reopen this issue for others. (and unsubscribe your self if you don't want to follow)change config.yml and
docker-compose buildagain, thendocker-compose up -dseems ok.
This fixed the issue.
@omidraha I paste the secret key into config.yml and this issue fixed.
but this operation were not be present in the guide section in readme fileI did, as value of this line, but that did not solve.
Please reopen this issue for others. (and unsubscribe your self if you don't want to follow)change config.yml and
docker-compose buildagain, thendocker-compose up -dseems ok.This fixed the issue.
This is not a fix, it is a workaround.
Here are changes I made for debugging:
dmugtasimov@dmugtasimov-Latitude-E5550 ~/gitrep/ngineered-studio/dolphin-sentry $ git diff
diff --git a/docker-compose.yml b/docker-compose.yml
index 39adce7..d8a695b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -9,7 +9,7 @@
version: '3.4'
x-defaults: &defaults
- restart: unless-stopped
+# restart: unless-stopped
image: dolphin-sentry:current
depends_on:
- redis
diff --git a/main/sentry.conf.py b/main/sentry.conf.py
index 0a0fde1..c6aeaac 100644
--- a/main/sentry.conf.py
+++ b/main/sentry.conf.py
@@ -338,6 +338,9 @@ if 'SENTRY_RUNNING_UWSGI' not in os.environ and len(secret_key) < 32:
# Grab the easy configuration first - these are all fixed
# key=value with no logic behind them
bind_env_config()
+import os
+print 'ENVIRON', os.getpid(), repr(os.environ)
+print 'OPTS', os.getpid(), repr(SENTRY_OPTIONS)
# If you specify a MAILGUN_API_KEY, you definitely want EMAIL_REPLIES
if SENTRY_OPTIONS.get('mail.mailgun-api-key'):
Log:
ENVIRON 15 {'PYTHONIOENCODING': 'UTF-8', 'SENTRY_SECRET_KEY': '!y42)p1#bm+!@btq_&*+v9^ssne@x-4n2llo(8j*e+b_8q7o#x', 'SENTRY_EMAIL_PORT': '587', 'HOME': '/home/sentry', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'LANG': 'C.UTF-8', 'affinity:container': '=b7f99bec5681fe82d61870fa64c3ffc7cd9e21ad3babb5d83ca640e50e887a6d', 'PYTHON_VERSION': '2.7.16', 'SHLVL': '0', 'PYTHON_PIP_VERSION': '19.1', 'SENTRY_EMAIL_USE_TLS': '1', 'DJANGO_SETTINGS_MODULE': 'sentry_config', 'SENTRY_EMAIL_HOST': 'smtp.sendgrid.net', 'SENTRY_CONF': u'/etc/sentry', 'SENTRY_VERSION': '9.1.1', 'GPG_KEY': 'C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF', 'PYTHONPATH': '/usr/src/sentry', 'SENTRY_EMAIL_PASSWORD': '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', 'SENTRY_SERVER_EMAIL': '[email protected]', 'SENTRY_POSTGRES_HOST': 'postgres', 'SENTRY_REDIS_HOST': 'redis', 'PIP_DISABLE_PIP_VERSION_CHECK': 'on', 'HOSTNAME': 'd1952e92f16e', 'PWD': '/usr/src/sentry', 'PIP_NO_CACHE_DIR': 'off', 'SENTRY_FILESTORE_DIR': '/var/lib/sentry/files', 'SENTRY_MEMCACHED_HOST': 'memcached', 'SENTRY_EMAIL_USER': 'apikey'}
OPTS 15 {'redis.clusters': {'default': {'hosts': {0: {'host': 'redis', 'password': '', 'db': '0', 'port': '6379'}}}}, 'mail.username': 'apikey', 'mail.port': 587, 'mail.use-tls': True, 'filestore.backend': 'filesystem', 'mail.password': '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', 'filestore.options': {'location': '/var/lib/sentry/files'}, 'system.secret-key': '!y42)p1#bm+!@btq_&*+v9^ssne@x-4n2llo(8j*e+b_8q7o#x', 'mail.from': '[email protected]', 'mail.host': 'smtp.sendgrid.net'}
17:17:42 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
17:17:47 [INFO] sentry.plugins.github: apps-not-configured
*** Starting uWSGI 2.0.18 (64bit) on [Fri May 3 17:17:47 2019] ***
compiled with version: 6.3.0 20170516 on 25 April 2019 01:46:28
os: Linux-4.4.0-104-generic #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017
nodename: d1952e92f16e
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /usr/src/sentry
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, Mar 27 2019, 09:57:44) [GCC 6.3.0 20170516]
Set PythonHome to /usr/local
Python main interpreter initialized at 0x5587f98fdf50
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 1924480 bytes (1879 KB) for 12 cores
*** Operational MODE: preforking+threaded ***
spawned uWSGI master process (pid: 15)
spawned uWSGI worker 1 (pid: 20, cores: 4)
spawned uWSGI worker 2 (pid: 21, cores: 4)
spawned uWSGI worker 3 (pid: 22, cores: 4)
ENVIRON 20 {'UWSGI_THREADS': '4', 'PYTHONIOENCODING': 'UTF-8', 'UWSGI_HTTP_SOCKET': '0.0.0.0:9000', 'UWSGI_HTTP_TIMEOUT': '30', 'SENTRY_EMAIL_PORT': '587', 'UWSGI_THUNDER_LOCK': 'true', 'SENTRY_SKIP_BACKEND_VALIDATION': '1', 'RUST_BACKTRACE': '1', 'UWSGI_VACUUM': 'true', 'HOME': '/home/sentry', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'UWSGI_WORKERS': '3', 'UWSGI_PROCNAME_PREFIX_SPACED': '[Sentry]', 'LANG': 'C.UTF-8', 'affinity:container': '=b7f99bec5681fe82d61870fa64c3ffc7cd9e21ad3babb5d83ca640e50e887a6d', 'TZ': 'UTC', 'PYTHON_VERSION': '2.7.16', 'UWSGI_VIRTUALENV': '/usr/local', 'SHLVL': '0', 'UWSGI_SINGLE_INTERPRETER': 'true', 'PYTHON_PIP_VERSION': '19.1', 'UWSGI_DISABLE_LOGGING': 'false', 'UWSGI_MODULE': 'sentry.wsgi:application', 'UWSGI_PROTOCOL': 'http', 'UWSGI_LOG_X_FORWARDED_FOR': 'false', 'SENTRY_EMAIL_USE_TLS': '1', 'SENTRY_RUNNING_UWSGI': '1', 'UWSGI_LAZY_APPS': 'true', 'DJANGO_SETTINGS_MODULE': 'sentry_config', 'SENTRY_EMAIL_HOST': 'smtp.sendgrid.net', 'SENTRY_CONF': '/etc/sentry', 'SENTRY_VERSION': '9.1.1', 'GPG_KEY': 'C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF', 'UWSGI_ORIGINAL_PROC_NAME': 'uwsgi', 'UWSGI_GID': '999', 'PYTHONPATH': '/usr/src/sentry', 'UWSGI_LIMIT_POST': '20971520', 'UWSGI_LOG_FORMAT': '%(addr) - %(user) [%(ltime)] "%(method) %(uri) %(proto)" %(status) %(size) "%(referer)" "%(uagent)"', 'UWSGI_NEED_APP': 'true', 'UWSGI_UID': '999', 'UWSGI_IGNORE_SIGPIPE': 'true', 'UWSGI_MASTER': 'true', 'SENTRY_EMAIL_PASSWORD': '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', 'SENTRY_SERVER_EMAIL': '[email protected]', 'UWSGI_RELOAD_ON_RSS': '600', 'UWSGI_BUFFER_SIZE': '32768', 'UWSGI_POST_BUFFERING': '65536', 'UWSGI_AUTO_PROCNAME': 'true', 'UWSGI_ENABLE_THREADS': 'true', 'UWSGI_DISABLE_WRITE_EXCEPTION': 'true', 'UWSGI_MEMORY_REPORT': 'true', 'PIP_DISABLE_PIP_VERSION_CHECK': 'on', 'HOSTNAME': 'd1952e92f16e', 'UWSGI_RELOADS': '0', 'PWD': '/usr/src/sentry', 'UWSGI_IGNORE_WRITE_ERRORS': 'true', 'PIP_NO_CACHE_DIR': 'off', 'UWSGI_DIE_ON_TERM': 'true', 'SENTRY_EMAIL_USER': 'apikey'}
OPTS 20 {'mail.use-tls': True, 'mail.username': 'apikey', 'mail.port': 587, 'redis.clusters': {'default': {'hosts': {0: {'host': 'redis', 'password': '', 'db': '0', 'port': '6379'}}}}, 'filestore.backend': 'filesystem', 'mail.password': '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', 'filestore.options': {'location': '/var/lib/sentry/files'}, 'mail.from': '[email protected]', 'mail.host': 'smtp.sendgrid.net'}
ENVIRON 21 {'UWSGI_THREADS': '4', 'PYTHONIOENCODING': 'UTF-8', 'UWSGI_HTTP_SOCKET': '0.0.0.0:9000', 'UWSGI_HTTP_TIMEOUT': '30', 'SENTRY_EMAIL_PORT': '587', 'UWSGI_THUNDER_LOCK': 'true', 'SENTRY_SKIP_BACKEND_VALIDATION': '1', 'RUST_BACKTRACE': '1', 'UWSGI_VACUUM': 'true', 'HOME': '/home/sentry', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'UWSGI_WORKERS': '3', 'UWSGI_PROCNAME_PREFIX_SPACED': '[Sentry]', 'LANG': 'C.UTF-8', 'affinity:container': '=b7f99bec5681fe82d61870fa64c3ffc7cd9e21ad3babb5d83ca640e50e887a6d', 'TZ': 'UTC', 'PYTHON_VERSION': '2.7.16', 'UWSGI_VIRTUALENV': '/usr/local', 'SHLVL': '0', 'UWSGI_SINGLE_INTERPRETER': 'true', 'PYTHON_PIP_VERSION': '19.1', 'UWSGI_DISABLE_LOGGING': 'false', 'UWSGI_MODULE': 'sentry.wsgi:application', 'UWSGI_PROTOCOL': 'http', 'UWSGI_LOG_X_FORWARDED_FOR': 'false', 'SENTRY_EMAIL_USE_TLS': '1', 'SENTRY_RUNNING_UWSGI': '1', 'UWSGI_LAZY_APPS': 'true', 'DJANGO_SETTINGS_MODULE': 'sentry_config', 'SENTRY_EMAIL_HOST': 'smtp.sendgrid.net', 'SENTRY_CONF': '/etc/sentry', 'SENTRY_VERSION': '9.1.1', 'GPG_KEY': 'C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF', 'UWSGI_ORIGINAL_PROC_NAME': 'uwsgi', 'UWSGI_GID': '999', 'PYTHONPATH': '/usr/src/sentry', 'UWSGI_LIMIT_POST': '20971520', 'UWSGI_LOG_FORMAT': '%(addr) - %(user) [%(ltime)] "%(method) %(uri) %(proto)" %(status) %(size) "%(referer)" "%(uagent)"', 'UWSGI_NEED_APP': 'true', 'UWSGI_UID': '999', 'UWSGI_IGNORE_SIGPIPE': 'true', 'UWSGI_MASTER': 'true', 'SENTRY_EMAIL_PASSWORD': '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', 'SENTRY_SERVER_EMAIL': '[email protected]', 'UWSGI_RELOAD_ON_RSS': '600', 'UWSGI_BUFFER_SIZE': '32768', 'UWSGI_POST_BUFFERING': '65536', 'UWSGI_AUTO_PROCNAME': 'true', 'UWSGI_ENABLE_THREADS': 'true', 'UWSGI_DISABLE_WRITE_EXCEPTION': 'true', 'UWSGI_MEMORY_REPORT': 'true', 'PIP_DISABLE_PIP_VERSION_CHECK': 'on', 'HOSTNAME': 'd1952e92f16e', 'UWSGI_RELOADS': '0', 'PWD': '/usr/src/sentry', 'UWSGI_IGNORE_WRITE_ERRORS': 'true', 'PIP_NO_CACHE_DIR': 'off', 'UWSGI_DIE_ON_TERM': 'true', 'SENTRY_EMAIL_USER': 'apikey'}
OPTS 21 {'mail.use-tls': True, 'mail.username': 'apikey', 'mail.port': 587, 'redis.clusters': {'default': {'hosts': {0: {'host': 'redis', 'password': '', 'db': '0', 'port': '6379'}}}}, 'filestore.backend': 'filesystem', 'mail.password': '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', 'filestore.options': {'location': '/var/lib/sentry/files'}, 'mail.from': '[email protected]', 'mail.host': 'smtp.sendgrid.net'}
ENVIRON 22 {'UWSGI_THREADS': '4', 'PYTHONIOENCODING': 'UTF-8', 'UWSGI_HTTP_SOCKET': '0.0.0.0:9000', 'UWSGI_HTTP_TIMEOUT': '30', 'SENTRY_EMAIL_PORT': '587', 'UWSGI_THUNDER_LOCK': 'true', 'SENTRY_SKIP_BACKEND_VALIDATION': '1', 'RUST_BACKTRACE': '1', 'UWSGI_VACUUM': 'true', 'HOME': '/home/sentry', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'UWSGI_WORKERS': '3', 'UWSGI_PROCNAME_PREFIX_SPACED': '[Sentry]', 'LANG': 'C.UTF-8', 'affinity:container': '=b7f99bec5681fe82d61870fa64c3ffc7cd9e21ad3babb5d83ca640e50e887a6d', 'TZ': 'UTC', 'PYTHON_VERSION': '2.7.16', 'UWSGI_VIRTUALENV': '/usr/local', 'SHLVL': '0', 'UWSGI_SINGLE_INTERPRETER': 'true', 'PYTHON_PIP_VERSION': '19.1', 'UWSGI_DISABLE_LOGGING': 'false', 'UWSGI_MODULE': 'sentry.wsgi:application', 'UWSGI_PROTOCOL': 'http', 'UWSGI_LOG_X_FORWARDED_FOR': 'false', 'SENTRY_EMAIL_USE_TLS': '1', 'SENTRY_RUNNING_UWSGI': '1', 'UWSGI_LAZY_APPS': 'true', 'DJANGO_SETTINGS_MODULE': 'sentry_config', 'SENTRY_EMAIL_HOST': 'smtp.sendgrid.net', 'SENTRY_CONF': '/etc/sentry', 'SENTRY_VERSION': '9.1.1', 'GPG_KEY': 'C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF', 'UWSGI_ORIGINAL_PROC_NAME': 'uwsgi', 'UWSGI_GID': '999', 'PYTHONPATH': '/usr/src/sentry', 'UWSGI_LIMIT_POST': '20971520', 'UWSGI_LOG_FORMAT': '%(addr) - %(user) [%(ltime)] "%(method) %(uri) %(proto)" %(status) %(size) "%(referer)" "%(uagent)"', 'UWSGI_NEED_APP': 'true', 'UWSGI_UID': '999', 'UWSGI_IGNORE_SIGPIPE': 'true', 'UWSGI_MASTER': 'true', 'SENTRY_EMAIL_PASSWORD': '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', 'SENTRY_SERVER_EMAIL': '[email protected]', 'UWSGI_RELOAD_ON_RSS': '600', 'UWSGI_BUFFER_SIZE': '32768', 'UWSGI_POST_BUFFERING': '65536', 'UWSGI_AUTO_PROCNAME': 'true', 'UWSGI_ENABLE_THREADS': 'true', 'UWSGI_DISABLE_WRITE_EXCEPTION': 'true', 'UWSGI_MEMORY_REPORT': 'true', 'PIP_DISABLE_PIP_VERSION_CHECK': 'on', 'HOSTNAME': 'd1952e92f16e', 'UWSGI_RELOADS': '0', 'PWD': '/usr/src/sentry', 'UWSGI_IGNORE_WRITE_ERRORS': 'true', 'PIP_NO_CACHE_DIR': 'off', 'UWSGI_DIE_ON_TERM': 'true', 'SENTRY_EMAIL_USER': 'apikey'}
OPTS 22 {'mail.use-tls': True, 'mail.username': 'apikey', 'mail.port': 587, 'redis.clusters': {'default': {'hosts': {0: {'host': 'redis', 'password': '', 'db': '0', 'port': '6379'}}}}, 'filestore.backend': 'filesystem', 'mail.password': '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', 'filestore.options': {'location': '/var/lib/sentry/files'}, 'mail.from': '[email protected]', 'mail.host': 'smtp.sendgrid.net'}
You may see that SENTRY_SECRET_KEY works well for main uWSGI process, but then it get removed from environment variables for uWSGI worker processes (note PIDs are different in last 3 entries).
I suggest to use different variable name SENTRY_SECRET_KEY_ as workaround:
dmugtasimov@dmugtasimov-Latitude-E5550 ~/gitrep/ngineered-studio/dolphin-sentry $ git diff
diff --git a/main/sentry.conf.py b/main/sentry.conf.py
index 0a0fde1..32536ad 100644
--- a/main/sentry.conf.py
+++ b/main/sentry.conf.py
@@ -283,7 +283,7 @@ ENV_CONFIG_MAPPING = {
'SENTRY_SERVER_EMAIL': 'mail.from',
'SENTRY_ENABLE_EMAIL_REPLIES': 'mail.enable-replies',
'SENTRY_SMTP_HOSTNAME': 'mail.reply-hostname',
- 'SENTRY_SECRET_KEY': 'system.secret-key',
+ 'SENTRY_SECRET_KEY_': 'system.secret-key',
I just upgraded my installation and fall into the same issue :(
I just upgraded my installation and fall into the same issue :(
Some experience developers say: do not upgrade just to have a latest version, have a good reason for upgrade instead. You can you my workaround above.
(That's not prod) I've upgraded because I was unable to bulk delete issues.
172.18.0.1 - - [03/May/2019:16:07:12 +0000] "GET /api/0/projects/geokrety/geokrety-legacy/issues/?sort=date&shortIdLookup=1&environment=kumy&limit=25&statsPeriod=24h&query=is%3Aunresolved&cursor=1556897291000:0:1 HTTP/1.1" 200 803 "https://sentry.kumy.org/geokrety/geokrety-legacy/?environment=kumy" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0"
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/sentry/api/base.py", line 190, in dispatch
response = handler(request, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sentry/api/endpoints/organization_group_index.py", line 292, in delete
search_fn,
File "/usr/local/lib/python2.7/site-packages/sentry/api/helpers/group_index.py", line 414, in delete_groups
'paginator_options': {'max_limit': 1000},
File "/usr/local/lib/python2.7/site-packages/sentry/api/endpoints/organization_group_index.py", line 40, in _search
result = search.query(**query_kwargs)
File "/usr/local/lib/python2.7/site-packages/sentry/search/django/backend.py", line 404, in query
paginator_options, search_filters, **parameters)
File "/usr/local/lib/python2.7/site-packages/sentry/search/snuba/backend.py", line 302, in _query
search_filters=search_filters,
File "/usr/local/lib/python2.7/site-packages/sentry/search/snuba/backend.py", line 466, in snuba_search
sample=1, # Don't use clickhouse sampling, even when in turbo mode.
File "/usr/local/lib/python2.7/site-packages/sentry/utils/snuba.py", line 477, in raw_query
raise SnubaError(err)
SnubaError: HTTPConnectionPool(host='localhost', port=1218): Max retries exceeded with url: /query (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8066e09690>: Failed to establish a new connection: [Errno 111] Connection refused',))
However, renaming SENTRY_SECRET_KEY to SENTRY_SECRET_KEY_, then rebuild the image didn't fixed the issue for me. Am I using the wrong workaround?
You should also provide SENTRY_SECRET_KEY_ in the environment. So there are two places for change in that sentry.conf.py and in your .env file (or however else you provide env vars for your container)
:man_facepalming:
@dmugtasimov thanks
@omidraha I paste the secret key into config.yml and this issue fixed.
but this operation were not be present in the guide section in readme fileI did, as value of this line, but that did not solve.
Please reopen this issue for others. (and unsubscribe your self if you don't want to follow)
@omidraha I use this method and it fixed. try to paste the key to where the value 'changme': system.secret-key: 'changme'
docker-compose down and then docker-compose up -d
Someone was able to complete the installation entirely of Sentry following this error? I didn't succeed yesterday and I'm stuck... Thanks.
It started happening to me as well after upgrading (on-build docker tag) 馃槥
@MaicolBen you should not be using the on-build tags if you are using a recent version of this repo. We have moved away from them a _very_ long time ago.
Please file a new issue if you are still having trouble after using a recent version.
Yeah, that worked, thanks!
Most helpful comment
@omidraha I use this method and it fixed. try to paste the key to where the value 'changme': system.secret-key: 'changme'
docker-compose down and then docker-compose up -d