Git Product home page Git Product logo

self-hosted's Introduction

Self-Hosted Sentry nightly

Official bootstrap for running your own Sentry with Docker.

Requirements

  • Docker 19.03.6+
  • Compose 2.0.1+
  • 4 CPU Cores
  • 16 GB RAM
  • 20 GB Free Disk Space

Setup

Installation

To get started with all the defaults, simply clone the repo and run ./install.sh in your local check-out. Please also read the section below about monitoring. Sentry uses Python 3 by default since December 4th, 2020 and Sentry 21.1.0 is the last version to support Python 2.

During the install, a prompt will ask if you want to create a user account. If you require that the install goes on without creating a user, run ./install.sh --skip-user-creation.

Thinking of not managing this yourself? Check out the SaaS migration docs or contact us for help.

Please visit our documentation for everything else.

Customize DotEnv (.env) file

Environment specific configurations can be done in the .env.custom file. It will be located in the root directory of the Sentry installation, and if it exists then .env will be ignored entirely.

By default, there exists no .env.custom file. In this case, you can manually add this file by copying the .env file to a new .env.custom file and adjust your settings in the .env.custom file.

Please keep in mind to check the .env file for changes, when you perform an upgrade of Sentry, so that you can adjust your .env.custom accordingly, if required, as .env is ignored entirely if .env.custom is present.

Enhance Sentry image

To install plugins and their dependencies or make other modifications to the Sentry base image, copy sentry/enhance-image.example.sh to sentry/enhance-image.sh and add necessary steps there. For example, you can use apt-get to install dependencies and use pip to install plugins.

After making modifications to sentry/enhance-image.sh, run ./install.sh again to apply them.

Tips & Tricks

Event Retention

Sentry comes with a cleanup cron job that prunes events older than 90 days by default. If you want to change that, you can change the SENTRY_EVENT_RETENTION_DAYS environment variable in .env or simply override it in your environment. If you do not want the cleanup cron, you can remove the sentry-cleanup service from the docker-compose.ymlfile.

Installing a specific SHA

If you want to install a specific release of Sentry, use the tags/releases on this repo.

We continuously push the Docker image for each commit made into Sentry, and other services such as Snuba or Symbolicator to our Docker Hub and tag the latest version on master as :nightly. This is also usually what we have on sentry.io and what the install script uses. You can use a custom Sentry image, such as a modified version that you have built on your own, or simply a specific commit hash by setting the SENTRY_IMAGE environment variable to that image name before running ./install.sh:

SENTRY_IMAGE=getsentry/sentry:83b1380 ./install.sh

Note that this may not work for all commit SHAs as this repository evolves with Sentry and its satellite projects. It is highly recommended to check out a version of this repository that is close to the timestamp of the Sentry commit you are installing.

Using Linux

If you are using Linux and you need to use sudo when running ./install.sh, make sure to place the environment variable after sudo:

sudo SENTRY_IMAGE=us.gcr.io/sentryio/sentry:83b1380 ./install.sh

Where you replace 83b1380 with the sha you want to use.

Self-Hosted Monitoring

We'd love to catch errors in self-hosted so you don't run into them, and so we can fix them faster! When you run ./install.sh, you will be prompted to select whether to opt in or out of our monitoring. If you opt into our monitoring, we will send information to our own self-hosted Sentry instance for development and debugging purposes. We may collect:

  • OS username
  • IP address
  • install log
  • runtime errors in Sentry
  • performance data

Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy.

Starting with the 22.10.0 release in October, we will require those running the Sentry installer to choose to opt in or out. If you are running the installer under automation, you may want to set REPORT_SELF_HOSTED_ISSUES or pass --(no-)report-self-hosted-issues to the installer accordingly.

self-hosted's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

self-hosted's Issues

How to update configuration?

I'm having trouble updating the configuration, here's what I've tried:

  • Added SENTRY_FEATURES['auth:register'] = False to sentry.conf.py
  • make build
  • docker-compose run --rm web upgrade
  • docker-compose restart

Sentry reloads but I still see the registration option. Had a look at getsentry/sentry#2663 but can't see anything that helps.

Make script fails if Registry with Port is used

When using a docker repository like described in:

https://docs.docker.com/registry/deploying/
e.g:

docker run -d -p 5000:5000 --restart=always --name registry
-v pwd/certs:/certs
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key
registry:2

and than using:

REPOSITORY="registry.example:5000/sentry" make build push

the makefile exits with

Makefile:11: *** target pattern contains no '%'. Stop.

sentry.runner.importer.ConfigurationError: TypeError: unsupported operand type(s) for -: 'module' and 'str'

When i'm trying to run
sudo docker-compose run --rm web upgrade

I'm getting

Traceback (most recent call last):
File "/usr/local/bin/sentry", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/sentry/runner/init.py", line 158, 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 35, in inner
configure()
File "/usr/local/lib/python2.7/site-packages/sentry/runner/init.py", line 121, in configure
configure(ctx, py, yaml, skip_backend_validation)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/settings.py", line 153, in configure
}, skip_backend_validation=skip_backend_validation)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 241, in initialize_app
bootstrap_options(settings, config['options'])
File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 116, in bootstrap_options
from sentry.options import load_defaults
File "/usr/local/lib/python2.7/site-packages/sentry/options/init.py", line 10, in
from .store import OptionsStore
File "/usr/local/lib/python2.7/site-packages/sentry/options/store.py", line 19, in
from sentry.db.models.query import create_or_update
File "/usr/local/lib/python2.7/site-packages/sentry/db/models/init.py", line 11, in
from .base import * # NOQA
File "/usr/local/lib/python2.7/site-packages/sentry/db/models/base.py", line 14, in
from django.db import models
File "/usr/local/lib/python2.7/site-packages/django/db/models/init.py", line 5, in
from django.db.models.query import Q
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 17, in
from django.db.models.deletion import Collector
File "/usr/local/lib/python2.7/site-packages/django/db/models/deletion.py", line 4, in
from django.db.models import signals, sql
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/init.py", line 4, in
from django.db.models.sql.subqueries import *
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/subqueries.py", line 12, in
from django.db.models.sql.query import Query
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 22, in
from django.db.models.sql import aggregates as base_aggregates_module
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/aggregates.py", line 9, in
ordinal_aggregate_field = IntegerField()
File "/usr/local/lib/python2.7/site-packages/django/db/models/fields/init.py", line 116, in init
self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE
File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 54, in getattr
self._setup(name)
File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 128, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
import(name)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/importer.py", line 52, in load_module
reraise_as(ConfigurationError(msg))
File "/usr/local/lib/python2.7/site-packages/sentry/utils/settings.py", line 48, in reraise_as
six.reraise(new_type, new_exception, e_traceback)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/importer.py", line 44, in load_module
mod = self.load_module(fullname)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/importer.py", line 76, in load_module
load_settings(self.config_path, settings=settings_mod, silent=True)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/importer.py", line 90, in load_settings
six.exec
(source_file.read(), conf.dict)
File "/usr/local/lib/python2.7/site-packages/six.py", line 699, in exec

exec("""exec code in globs, locs""")
File "", line 1, in
File "", line 65, in
sentry.runner.importer.ConfigurationError: TypeError: unsupported operand type(s) for -: 'module' and 'str'

Indentation error while lifting services

Getting same error while running below commands:

$ sudo docker-compose run --rm web upgrade
$ sudo docker-compose up --force-recreate --abort-on-container-exit

base_1 | Traceback (most recent call last):
base_1 | File "/usr/local/bin/sentry", line 11, in
base_1 | sys.exit(main())
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/init.py", line 158, in main
base_1 | cli(prog_name=get_prog(), obj={}, max_content_width=100)
base_1 | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in call
base_1 | return self.main(*args, **kwargs)
base_1 | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
base_1 | rv = self.invoke(ctx)
base_1 | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
base_1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
base_1 | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
base_1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
base_1 | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
base_1 | return ctx.invoke(self.callback, **ctx.params)
base_1 | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
base_1 | return callback(*args, **kwargs)
base_1 | File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
base_1 | return f(get_current_context(), *args, **kwargs)
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/decorators.py", line 65, in inner
base_1 | return ctx.invoke(f, *args, **kwargs)
base_1 | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
base_1 | return callback(*args, **kwargs)
base_1 | File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
base_1 | return f(get_current_context(), *args, **kwargs)
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/decorators.py", line 35, in inner
base_1 | configure()
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/init.py", line 121, in configure
base_1 | configure(ctx, py, yaml, skip_backend_validation)
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/settings.py", line 159, in configure
base_1 | }, skip_backend_validation=skip_backend_validation)
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 241, in initialize_app
base_1 | bootstrap_options(settings, config['options'])
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 116, in bootstrap_options
base_1 | from sentry.options import load_defaults
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/options/init.py", line 10, in
base_1 | from .store import OptionsStore
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/options/store.py", line 19, in
base_1 | from sentry.db.models.query import create_or_update
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/db/models/init.py", line 11, in
base_1 | from .base import * # NOQA
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/db/models/base.py", line 14, in
base_1 | from django.db import models
base_1 | File "/usr/local/lib/python2.7/site-packages/django/db/models/init.py", line 5, in
base_1 | from django.db.models.query import Q
base_1 | File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 17, in
base_1 | from django.db.models.deletion import Collector
base_1 | File "/usr/local/lib/python2.7/site-packages/django/db/models/deletion.py", line 4, in
base_1 | from django.db.models import signals, sql
base_1 | File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/init.py", line 4, in
base_1 | from django.db.models.sql.subqueries import *
base_1 | File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/subqueries.py", line 12, in
base_1 | from django.db.models.sql.query import Query
base_1 | File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 22, in
base_1 | from django.db.models.sql import aggregates as base_aggregates_module
base_1 | File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/aggregates.py", line 9, in
base_1 | ordinal_aggregate_field = IntegerField()
base_1 | File "/usr/local/lib/python2.7/site-packages/django/db/models/fields/init.py", line 116, in init
base_1 | self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE
base_1 | File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 54, in getattr
base_1 | self._setup(name)
base_1 | File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 49, in _setup
base_1 | self._wrapped = Settings(settings_module)
base_1 | File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 128, in init
base_1 | mod = importlib.import_module(self.SETTINGS_MODULE)
base_1 | File "/usr/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
base_1 | import(name)
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/importer.py", line 52, in load_module
base_1 | reraise_as(ConfigurationError(msg))
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/utils/settings.py", line 48, in reraise_as
base_1 | six.reraise(new_type, new_exception, e_traceback)
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/importer.py", line 44, in load_module
base_1 | mod = self.load_module(fullname)
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/importer.py", line 76, in load_module
base_1 | load_settings(self.config_path, settings=settings_mod, silent=True)
base_1 | File "/usr/local/lib/python2.7/site-packages/sentry/runner/importer.py", line 90, in load_settings
base_1 | six.exec
(source_file.read(), conf.dict)
base_1 | File "/usr/local/lib/python2.7/site-packages/six.py", line 699, in exec

base_1 | exec("""exec code in globs, locs""")
base_1 | File "", line 1, in
base_1 | sentry.runner.importer.ConfigurationError: IndentationError: unexpected indent (, line 258)

Any help would be appreciated.

No Usable Temporary Directory Found

Hello,

I am following your instructions on setting up the docker container for Sentry using the docker-compose.yml. I seem to be experiencing an issue around Step 3. Here is the print out of my stack trace:

File "/usr/local/bin/sentry", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/sentry/runner/init.py", line 161, 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 35, in inner
configure()
File "/usr/local/lib/python2.7/site-packages/sentry/runner/init.py", line 124, in configure
configure(ctx, py, yaml, skip_service_validation)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/settings.py", line 152, in configure
skip_service_validation=skip_service_validation
File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 260, in initialize_app
bootstrap_options(settings, config['options'])
File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 133, in bootstrap_options
from sentry.options import load_defaults
File "/usr/local/lib/python2.7/site-packages/sentry/options/init.py", line 10, in
from .store import OptionsStore
File "/usr/local/lib/python2.7/site-packages/sentry/options/store.py", line 19, in
from sentry.db.models.query import create_or_update
File "/usr/local/lib/python2.7/site-packages/sentry/db/models/init.py", line 11, in
from .base import * # NOQA
File "/usr/local/lib/python2.7/site-packages/sentry/db/models/base.py", line 14, in
from django.db import models
File "/usr/local/lib/python2.7/site-packages/django/db/models/init.py", line 5, in
from django.db.models.query import Q
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 17, in
from django.db.models.deletion import Collector
File "/usr/local/lib/python2.7/site-packages/django/db/models/deletion.py", line 4, in
from django.db.models import signals, sql
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/init.py", line 4, in
from django.db.models.sql.subqueries import *
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/subqueries.py", line 12, in
from django.db.models.sql.query import Query
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 22, in
from django.db.models.sql import aggregates as base_aggregates_module
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/aggregates.py", line 9, in
ordinal_aggregate_field = IntegerField()
File "/usr/local/lib/python2.7/site-packages/django/db/models/fields/init.py", line 116, in init
self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE
File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 54, in getattr
self._setup(name)
File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 128, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
import(name)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/importer.py", line 52, in load_module
reraise_as(ConfigurationError(msg))
File "/usr/local/lib/python2.7/site-packages/sentry/utils/settings.py", line 48, in reraise_as
six.reraise(new_type, new_exception, e_traceback)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/importer.py", line 44, in load_module
mod = self._load_module(fullname)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/importer.py", line 63, in _load_module
default_settings_mod = import_module(self.default_settings)
File "/usr/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
import(name)
File "/usr/local/lib/python2.7/site-packages/sentry/conf/server.py", line 481, in
CELERYBEAT_SCHEDULE_FILENAME = os.path.join(tempfile.gettempdir(), 'sentry-celerybeat')
File "/usr/local/lib/python2.7/tempfile.py", line 275, in gettempdir
tempdir = _get_default_tempdir()
File "/usr/local/lib/python2.7/tempfile.py", line 217, in _get_default_tempdir
("No usable temporary directory found in %s" % dirlist))
sentry.runner.importer.ConfigurationError: IOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/usr/src/sentry']

I am running this on my Surface Pro 4 using Windows 10. What's really confusing to me is that there is an issue with a tmp directory. I'm assuming that this would be an issue from within the container itself. I wouldn't think the print out is talking about my local machine. In case it matters, for Step 2 this is how I added SENTRY_SECRET_KEY into the docker-compose.yml:

11 base:
12 restart: unless-stopped
13 build: .
14 environment:
15 # Run docker-compose run web config generate-secret-key
16 # to get the SENTRY_SECRET_KEY value.
17 SENTRY_SECRET_KEY: ***********
18 SENTRY_MEMCACHED_HOST: memcached
19 SENTRY_REDIS_HOST: redis
20 SENTRY_POSTGRES_HOST: postgres
21 SENTRY_EMAIL_HOST: smtp

Obviously the asterisks aren't my real secret key though. Anyway, is there any help I can get for the issue I get from my stack trace above? I feel like I'm missing something simple here.

web works well, but can't capture exception via code

Hi,
I installed sentry, and the web works well, but I can't capture exception via nodejs code, I've checked the DSN, and it correct. Here's my code,

var Raven = require('raven');
Raven.config('http://2c485cf04ad2454a8d34015701f674d8:1451ffec89e54ae9aaf98c4bb0117a52@localhost:9000/1').install();

try {
    throw new Error('some error');
} catch (e) {
    Raven.captureException(e);
}

setTimeout(function(){}, 3000);

I ran the code, and got this error, I don't know why

/usr/local/bin/node index.js
[email protected] alert: failed to send exception to sentry: socket hang up
{ Error: socket hang up
    at createHangUpError (_http_client.js:252:15)
    at Socket.socketOnEnd (_http_client.js:344:23)
    at emitNone (events.js:91:20)
    at Socket.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9) code: 'ECONNRESET' }

Could someone help me and give some suggestions?

docker-compose base service, should it run?

From reading the docker-compose.yml I get the impression that the base service is an abstract definition of config and the other services extend on it.

But docker-compose is happily starting 'base' and it runs the default command from the sentry:8.8-onbuild image. Or is it necessary to have this double django service running, once exposed and once running without being able to accept any connections?

There's a discussion on compose abstract services here.
docker/compose#1988

Hyperlinks have ports in their url

I'm trying to put an nginx on top of the web container and not expose it directly to outside. Everything is working as expected but some of the links on the UI are pointing to 9000 port and fail.

For instance, if I'm not the dashboard page, the History is correctly pointing to http://whatever/organizations/sentry/auth/. But if I go to auth page then the same History link is pointing to http://whatever:9000/organizations/sentry/issues/history/.

How can I fix this?

dash
auth

Permission Problems

If you encounter this problem:
chown: changing ownership of ‘/var/lib/sentry/files’: Operation not permitted

Make sure you run the command specifying the default user:
docker-compose run -u 1000 web config generate-secret-key

Exception: Error: REDIS_PORT_6379_TCP_ADDR (or SENTRY_REDIS_HOST) is undefined, did you forget to `--link` a redis container?

Exception happens when running docker run --rm -it sentry upgrade. I tried to apply a suggestion from getsentry/docker-sentry#79 but my sentry.conf.py file seems to ignore changes. I've located the line which throws an exception and modified the message. I've then rebooted my machine, tried to run upgrade again and got the same message even if the message is different in sentry.conf.py file.

I installed sentry using instructions from this repo, so I didn't do any manual linking of containers.

Problem with url

I have installed a Sentry at my workplace with docker-compose.
The problem that I'm encountering is the following:
If I'm clicking on various links on the Sentry home page on the left, after a few times I get an error that says Page not Found.
After that I can see that the URL is wrong.
The URL is like this:
http://sentry.[my-company]/organizations/sentry/auth/sentry.[my-company].com/organizations/sentry/rate-limits/
As you can see it does not point to the right destination. At the first part there is the URL from where I'm coming, and it just pastes the new URL where I'm going at the end.
I've tried it with just the ip and the original port, and it messes it up also, so Nginx is not the fault.
Please help.

Attempting to install sentry-plugins via the requirements.txt route seems to break the build process.

Attempting to install sentry-plugins via the requirements.txt route seems to break the build process. To reproduce the issue, follow these steps:

  • Edit requirements.txt to the following and save it.
-e git+git://github.com/getsentry/sentry-plugins@master#egg=sentry-plugins
  • Attempt a make build.

This is what happens:

debayande@build-xxxxx ‹ master ● › : ~/Workspaces/Sentry/onpremise
[0] % make build
==> Building sentry-onpremise:latest
Sending build context to Docker daemon   16.9kB
Step 1/1 : FROM sentry:8.20-onbuild
# Executing 4 build triggers...
Step 1/1 : COPY . /usr/src/sentry
Step 1/1 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi
 ---> Running in 43e266a9f2ab
Obtaining sentry-plugins from git+git://github.com/getsentry/sentry-plugins@master#egg=sentry-plugins (from -r requirements.txt (line 1))
  Cloning git://github.com/getsentry/sentry-plugins (to master) to ./src/sentry-plugins
Requirement already satisfied: BeautifulSoup>=3.2.1 in /usr/local/lib/python2.7/site-packages (from sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: boto3<1.5.0,>=1.4.4 in /usr/local/lib/python2.7/site-packages (from sentry-plugins->-r requirements.txt (line 1))
Collecting cached-property (from sentry-plugins->-r requirements.txt (line 1))
  Downloading cached_property-1.3.1-py2.py3-none-any.whl
Requirement already satisfied: python-dateutil in /usr/local/lib/python2.7/site-packages (from sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: PyJWT in /usr/local/lib/python2.7/site-packages (from sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: requests-oauthlib>=0.3.0 in /usr/local/lib/python2.7/site-packages (from sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: unidiff>=0.5.4 in /usr/local/lib/python2.7/site-packages (from sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python2.7/site-packages (from boto3<1.5.0,>=1.4.4->sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: s3transfer<0.2.0,>=0.1.10 in /usr/local/lib/python2.7/site-packages (from boto3<1.5.0,>=1.4.4->sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: botocore<1.6.0,>=1.5.0 in /usr/local/lib/python2.7/site-packages (from boto3<1.5.0,>=1.4.4->sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: six>=1.5 in /usr/local/lib/python2.7/site-packages (from python-dateutil->sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: oauthlib>=0.6.2 in /usr/local/lib/python2.7/site-packages (from requests-oauthlib>=0.3.0->sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: requests>=2.0.0 in /usr/local/lib/python2.7/site-packages (from requests-oauthlib>=0.3.0->sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in /usr/local/lib/python2.7/site-packages (from s3transfer<0.2.0,>=0.1.10->boto3<1.5.0,>=1.4.4->sentry-plugins->-r requirements.txt (line 1))
Requirement already satisfied: docutils>=0.10 in /usr/local/lib/python2.7/site-packages (from botocore<1.6.0,>=1.5.0->boto3<1.5.0,>=1.4.4->sentry-plugins->-r requirements.txt (line 1))
Installing collected packages: cached-property, sentry-plugins
  Found existing installation: sentry-plugins 8.20.0
    Uninstalling sentry-plugins-8.20.0:
      Successfully uninstalled sentry-plugins-8.20.0
  Running setup.py develop for sentry-plugins
    Complete output from command /usr/local/bin/python -c "import setuptools, tokenize;__file__='/usr/src/sentry/src/sentry-plugins/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps:
    running develop
    running egg_info
    writing requirements to src/sentry_plugins.egg-info/requires.txt
    writing src/sentry_plugins.egg-info/PKG-INFO
    writing top-level names to src/sentry_plugins.egg-info/top_level.txt
    writing dependency_links to src/sentry_plugins.egg-info/dependency_links.txt
    writing entry points to src/sentry_plugins.egg-info/entry_points.txt
    reading manifest file 'src/sentry_plugins.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'src/sentry_plugins/assets.json'
    warning: no files found matching '*.js.gz' under directory 'src/sentry_plugins'
    warning: no files found matching '*.js.map' under directory 'src/sentry_plugins'
    warning: no previously-included files matching '*~' found anywhere in distribution
    writing manifest file 'src/sentry_plugins.egg-info/SOURCES.txt'
    running build_ext
    Creating /usr/local/lib/python2.7/site-packages/sentry-plugins.egg-link (link to src)
    Adding sentry-plugins 8.22.0.dev0 to easy-install.pth file
    
    Installed /usr/src/sentry/src/sentry-plugins/src
    running build_assets
    initializing git submodules
    command failed [node --version] via [/usr/src/sentry/src/sentry-plugins]
    Cannot find `node` executable. Please install node` and try again.
    
    ----------------------------------------
  Rolling back uninstall of sentry-plugins
Command "/usr/local/bin/python -c "import setuptools, tokenize;__file__='/usr/src/sentry/src/sentry-plugins/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps" failed with error code 1 in /usr/src/sentry/src/sentry-plugins/
The command '/bin/sh -c if [ -s requirements.txt ]; then pip install -r requirements.txt; fi' returned a non-zero code: 1
make: *** [build] Error 1

Cheers!

chown: cannot read directory ‘/var/lib/sentry/files’: Permission denied

i encounter this problem. can you help me?

root@localhost onpremise]# docker-compose run --rm web config generate-config-key
Starting onpremise_memcached_1 ... 
Starting onpremise_postgres_1 ... 
Starting onpremise_smtp_1 ... 
Starting onpremise_redis_1 ... done
chown: cannot read directory ‘/var/lib/sentry/files’: Permission denied

version: '2'
services:
base:
build: .
environment:
# Run docker-compose run web config generate-secret-key
# to get the SENTRY_SECRET_KEY value.
SENTRY_SECRET_KEY: '#*r@jgcg5h6e_kfxfheqgf+2^cqky24!%0wal(a1)72+ozf%m3'
SENTRY_MEMCACHED_HOST: memcached
SENTRY_REDIS_HOST: redis
SENTRY_POSTGRES_HOST: postgres
SENTRY_EMAIL_HOST: smtp
volumes:
- /opt/sentry/onpremise/data/sentry:/var/lib/sentry/files

Troubleshooting customization

Hi,

I'm trying to avoid interactive input for

  1. SENTRY_SECRET_KEY
  2. Change db name, user
  3. Init / rebuild the database

I managed first point defining the variable in sentry.conf.py and adding to Dockerfile:
COPY sentry.conf.py /usr/src/sentry/sentry.conf.py

Anyway, I'm in trouble with the second and third one because related to the official doc I thinks it's mixing two set of instructions. How should I be building sentry ? I mean, make build, docker build, etc..

Thanks in advance !

send mail error

web_1        | 118.186.200.10 - - [11/Dec/2017:15:33:35 +0000] "POST /api/2/store/ HTTP/1.1" 200 366 "-" "sentry-php/1.8.1"
postgres_1   | ERROR:  duplicate key value violates unique constraint "sentry_environmentproject_project_id_29250c1307d3722b_uniq"
postgres_1   | DETAIL:  Key (project_id, environment_id)=(2, 1) already exists.
postgres_1   | STATEMENT:  INSERT INTO "sentry_environmentproject" ("project_id", "environment_id") VALUES (2, 1) RETURNING "sentry_environmentproject"."id"
worker_1     | 15:33:35 [INFO] sentry.plugins.mail: notification.dispatched (project_id=2L plugin=u'mail' event_id=29L group_id=8L rule_id=2L digest_key=u'mail:p:2')
worker_1     | 15:33:37 [INFO] sentry.mail: mail.queued (message_to=(u'[email protected]',) event_id=29L group_id=8L message_type=u'notify.error' message_id=u'<20171211153336.19.25341@localhost>')




worker_1     | celery@2af3bcee7361 ready.
worker_1     | Traceback (most recent call last):
worker_1     |   File "/usr/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
worker_1     |     R = retval = fun(*args, **kwargs)
worker_1     |   File "/usr/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
worker_1     |     return self.run(*args, **kwargs)
worker_1     |   File "/usr/local/lib/python2.7/site-packages/sentry/tasks/base.py", line 54, in _wrapped
worker_1     |     result = func(*args, **kwargs)
worker_1     |   File "/usr/local/lib/python2.7/site-packages/sentry/tasks/email.py", line 76, in send_email
worker_1     |     send_messages([message])
worker_1     |   File "/usr/local/lib/python2.7/site-packages/sentry/utils/email.py", line 416, in send_messages
worker_1     |     sent = connection.send_messages(messages)
worker_1     |   File "/usr/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 87, in send_messages
worker_1     |     new_conn_created = self.open()
worker_1     |   File "/usr/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 48, in open
worker_1     |     local_hostname=DNS_NAME.get_fqdn())
worker_1     |   File "/usr/local/lib/python2.7/smtplib.py", line 256, in __init__
worker_1     |     (code, msg) = self.connect(host, port)
worker_1     |   File "/usr/local/lib/python2.7/smtplib.py", line 318, in connect
worker_1     |     (code, msg) = self.getreply()
worker_1     |   File "/usr/local/lib/python2.7/smtplib.py", line 366, in getreply
worker_1     |     + str(e))
worker_1     | SMTPServerDisconnected: Connection unexpectedly closed: timed out
worker_1     | 15:33:42 [ERROR] celery.worker.job: Task sentry.tasks.email.send_email[6b60ad32-fcf4-4994-ad41-b490b4b753d3] raised unexpected: SMTPServerDisconnected('Connection unexpectedly closed: timed out',) (data={u'hostname': 'celery@2af3bcee7361', u'name': 'sentry.tasks.email.send_email', u'args': '[]', u'internal': False, u'kwargs': "{'message': <django.core.mail.message.EmailMultiAlternatives object at 0x7f58e2d50a90>}", u'id': '6b60ad32-fcf4-4994-ad41-b490b4b753d3'})

SMTP Mail Config not working for tianon/exim4 Container only fro sentry frontend

Hi,

wie configured at the config.yaml our Mailgun Account. At the sentry Frontend the Testmail is ready and sent by this account. But all other mails which are send by the worker queues like invitations or exception notification are sent by our docker host ip and not by the configured smtp config. Anybody know this?

Here the /data/sentry/config.yaml

###############
# Mail Server #
###############

 mail.backend: 'smtp'  # Use dummy if you want to disable email entirely
 mail.host: 'smtp.mailgun.org'
 mail.port: 587
 mail.username: '[email protected]'
 mail.password: 'secretkey'
 mail.use-tls: true
# The email address to send on behalf of
 mail.from: '[email protected]'
 mail.list-namespace: 'ourdomain.de'

# If you'd like to configure email replies, enable this.
# mail.enable-replies: false

# When email-replies are enabled, this value is used in the Reply-To header
# mail.reply-hostname: ''

# If you're using mailgun for inbound mail, set your API key and configure a
# route to forward to /api/hooks/mailgun/inbound/
# mail.mailgun-api-key: ''

All values are ready and checkable at the graphical user interface.

`upgrade` doesn't create user. _Internal project (id=1) does not exist_

Following the steps in README.md doesn't quite work.

web upgrade completes without prompting for a user to be created:

root@ubuntu-xenial:~/onpremise# docker-compose run --rm web upgrade
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
...
Running migrations for jira_ac: 
 - Migrating forwards to 0001_initial.
 > jira_ac:0001_initial
 - Loading initial data for jira_ac.
Installed 0 object(s) from 0 fixture(s)
Running migrations for hipchat_ac:
 - Migrating forwards to 0002_auto__del_mentionedevent.
 > hipchat_ac:0001_initial
 > hipchat_ac:0002_auto__del_mentionedevent
 - Loading initial data for hipchat_ac.
Installed 0 object(s) from 0 fixture(s)
Creating missing DSNs
Correcting Group.num_comments counter

createuser fails with Internal project (id=1) does not exist:

root@ubuntu-xenial:~/onpremise# docker-compose run --rm web createuser
Email: [email protected]
Password:
Repeat for confirmation:
Should this user be a superuser? [y/N]: y
User created: [email protected]
14:31:14 [ERROR] sentry.errors: Internal project (id=1) does not exist
Traceback (most recent call last):
  File "/usr/local/bin/sentry", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 160, 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 36, 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/sentry/runner/commands/createuser.py", line 97, in createuser
    org = Organization.get_default()
  File "/usr/local/lib/python2.7/site-packages/sentry/models/organization.py", line 117, in get_default
    )[0]
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 132, in __getitem__
    return list(qs)[0]
IndexError: list index out of range

If I forge ahead and start the service, it fails with a 500 error:

root@ubuntu-xenial:~/onpremise# wget http://localhost:9000/
--2017-07-25 14:31:46--  http://localhost:9000/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:9000... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: http://localhost:9000/auth/login/ [following]
--2017-07-25 14:31:47--  http://localhost:9000/auth/login/
Reusing existing connection to localhost:9000.
HTTP request sent, awaiting response... No data received.
Retrying.

--2017-07-25 14:31:48--  (try: 2)  http://localhost:9000/auth/login/
Connecting to localhost (localhost)|127.0.0.1|:9000... connected.
HTTP request sent, awaiting response... 500 INTERNAL SERVER ERROR
2017-07-25 14:31:48 ERROR 500: INTERNAL SERVER ERROR.

logs web shows the same error as the createuser command:

root@ubuntu-xenial:~/onpremise# docker-compose logs web
...
web_1        | IndexError: list index out of range
web_1        | 14:31:48 [ERROR] root: Unable to fetch ProjectKey for internal project
web_1        | 14:31:48 [ERROR] sentry.errors: Internal project (id=1) does not exist
web_1        | Traceback (most recent call last):
web_1        |   File "/usr/local/lib/python2.7/site-packages/sentry/templatetags/sentry_react.py", line 67, in _get_public_dsn
web_1        |     )[0]
web_1        |   File "/usr/local/lib/python2.7/site-packages/sentry/../django/db/models/query.py", line 132, in __getitem__
web_1        |     return list(qs)[0]
web_1        | IndexError: list index out of range
web_1        | 14:31:48 [ERROR] root: Unable to fetch ProjectKey for internal project
web_1        | 14:31:48 [ERROR] sentry.errors: Internal project (id=1) does not exist
web_1        | 172.18.0.1 - - [25/Jul/2017:14:31:48 +0000] "GET /auth/login/ HTTP/1.1" 500 8646 "-" "Wget/1.17.1 (linux-gnu)"

SENTRY_SECRET_KEY not being detected

I have set SENTRY_SECRET_KEY as an environment variable and I can echo it from bash as well as print it from python. Whenever I run any of the commands in the documentation, like the one to start up redis, I get an error: sentry.runner.importer.ConfigurationError: Exception: Error: SENTRY_SECRET_KEY is undefined, run generate-secret-key and set to -e SENTRY_SECRET_KEY

Any idea what is going on? I've attached some stack traces from docker-compose up.

stacktrace.txt

trying to follow documentation: unknown flag --port

So I'm trying to follow the installation guide mentioned here, but when I run this command:

docker run \
  --detach \
  --rm \
  --name sentry-web-01 \
  --port 9000:9000 \
  sentry-onpremise \
  run web

I get this:

unknown flag: --port
See 'docker run --help'.

Sentry accessible remotely on port 9000

I've set up a new onpremise instance using this docker system, and it's now all working with nginx for the correct domain with SSL. However, it is still accessible remotely via IP address on port 9000 (without https), even when nginx is not running.

In poking around iptables, I infer that this is because of this policy:

Chain DOCKER (2 references)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             172.18.0.8           tcp dpt:9000

That's useful (but maybe not strictly necessary) for getting set up initially to confirm that you got sentry installed correctly, but I don't know how to disable that for production use.

Setup Sentry on another SSL port than 443

Hi everyone !

I'm actually struggling with Sentry configuration. I want to make it run with HTTPS, so, I used nginx as reverse-proxy.

It works very well until I try to make it run on another port than the default 443.

Here important parts of my configuration files:

docker-compose.yml:

...
  nginx:
    image: nginx:alpine
   ...
    ports:
      - "49080:80"
      - "49443:443"
    depends_on:
      - web

.../site-enabled/sentry_project:

  server {
    listen   80;
    server_name some.example.com;

    location / {
      if ($request_method = GET) {
        rewrite  ^ https://$host:49443$request_uri? permanent;
      }
      return 405;
    }
  }

server {
  listen 443 ssl http2;
  listen [::]:443 ssl http2;

  server_name some.example.com;

  ssl_certificate ...
  ssl_certificate_key ...

  access_log /var/log/nginx/sentry_project.log;
  charset utf-8;

  location / {
    include proxy.conf;
    proxy_cache_bypass $http_upgrade;
    proxy_pass  http://web:9000;
  }
}

So, with this configuration, when I run my docker-compose, I see that my nginx redirection work well, my request is redirected into the web service. Giving me this log:

web_1        | XXX.XX.X.10 - - [05/Apr/2018:17:01:00 +0000] "GET / HTTP/1.1" 302 487 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36"

But then, I'm redirected to the https://some.example.com/auth/login. But without the port 49443 specification.

I've tried to setup the system.url-prefix: 'https://some.example.com:49443' but it didn't resolve the issue.

Also, if I map my nginx service ports with "443:443" I have no trouble. So, I suppose my problem must be an environment variable to overwrite.

Thank you, for reading me :)

secret key contains special character

The secret key generated by the command docker-compose run --rm web config generate-secret-key contains special character $ which needs to be escaped while using with docker Ref.

The error thrown is:

ERROR: Invalid interpolation format for "environment" option in service "base": "l=xyhk%r%9$)8ute)6jk#u=fkek!@*1&2jw0w!(qfnq&@s^94i"

Should remove $ from the secret key generator's list of characters.

Base service in docker-compose

I'm toying around with this repo (awesome work by the way!) and I'm wondering - is it necessary to run base service to run the whole application (I'm pretty sure that I know the answer and the answer is 'no') ?

What I'm refering to is Up and Running, 4. point:
docker-compose up -d - it will spin up unnecessary(I think) base service which is essentialy the same as web service that doesn't map ports.

Regards
Piotr

Malformed Config Error

I've completed the build steps, generated my key, added it to the docker-composer.yml file and when I
excute the docker-compose run --rm web upgrade command I get the following error:

File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 96, in bootstrap_options raise ConfigurationError('Malformed config.yml file: %s' % six.text_type(e)) sentry.runner.importer.ConfigurationError: Malformed config.yml file: while parsing a block mapping in "/etc/sentry/config.yml", line 36, column 1 did not find expected key in "/etc/sentry/config.yml", line 55, column 2

I've tried leaving the config.yml file included in the repo stock or uncommented and I get the same error each time.

Sentry is not sending emails

Hi,

I tried to get the Sentry up and running using docker-compose. It seems to work and I can log events. But Sentry is not sending emails. Where should I specify SMTP configuration?

I tried to put it into config.yml and docker-compose.yml file using ENV variables. But I still see this error in a log file:

10:50:14 [ERROR] celery.worker.job: Task sentry.tasks.email.send_email[fef406ee-af45-4ae6-b163-a27d6cf6c0cc] raised unexpected: SMTPServerDisconnected('Connection unexpectedly closed: timed out',) (data={u'hostname': 'celery@2173820268c7', u'name': 'sentry.tasks.email.send_email', u'args': '[]', u'internal': False, u'kwargs': "{'message': <django.core.mail.message.EmailMultiAlternatives object at 0x7fb3f5666050>}", u'id': 'fef406ee-af45-4ae6-b163-a27d6cf6c0cc'})

Problem when uploading dsym files

I get an error when I upload the generated dsym files of an iOS project with cli tool:
sentry-cli upload-dsym -o __team__ -p __project__ ./__Project__.app.dSYM.zip
The output is

Batch 1
[1/3] Found 28 debug symbol files. Checking for missing symbols on server
[2/3] Compressing 28 missing debug symbol files
[3/3] Uploading debug symbol files
error: http error: generic error (502)

The server side log output with docker-compose logs -f web is:

web_1        | Invalid (too big) CONTENT_LENGTH. skip.
web_1        | 172.18.0.1 - - [19/Jun/2017:16:20:54 +0000] "POST /api/0/projects/__team__/__project__/files/dsyms/ HTTP/1.0" 500 0 "-" "-"

Any idea whats happening here?

What I'm doing wrong and sentry server doesn't work?

Hi,
I'm trying to setup sentry server on my digital ocean server. These are the steps I'm doing and it's not working.

  1. Clone this git
  2. Install Compose and Docker using this .sh file
  3. Create a linux user, dbuser, dbpassword and a database
  4. execute mkdir -p data/{sentry,postgres}
  5. run docker-compose run --rm web config generate-secret-key
  6. take the secret key and paste it in docker-compose.yml and uncomment the SENTRY_SECRET_KEY
  7. save and exit the docker-compose.yml file
  8. open, edit and save the sentry.conf.py with my new db details (db, dbuser, dbpassword, port)
  9. run docker-compose run --rm web upgrade
  10. run docker-compose up -d
  11. Check http://my-host-ip:9000 , and nothing happening, page keeps loading and at the end It's like website doesn't exist.

Can you help me please?

Is there any video-tutorial who explain how to setup a sentry server? I searched a lot and I didn't find anything. Even it's very hard to find a noob-friendly tutorial on a website.

Failure to run on OSX (permission denied)

When attempting to generate the secret I get an error:

$ docker-compose run --rm web config generate-secret-key
Starting onpremise_postgres_1
chown: changing ownership of ‘/var/lib/sentry/files’: Operation not permitted

I would guess this is because of the way the data volumes are mounted from the Mac and don't allow the permission change.

UserForm sends data via http

I have a little problem with the UserForm, it tries to send the request via http which chrome prohibits, because the rest of the content is https. It loads the form itself correctly via https.
Another weird thing is that it tries to submit it to localhost:9000 instead of the domain, although it gets the right sentry public dsn.

SENTRY_ALLOW_REGISTRATION not working

docker-compose.yml

 version: '2'
  services:
    base:
      build: .
      environment:
        SENTRY_ALLOW_REGISTRATION: 'False'
        SENTRY_SECRET_KEY: 'bnabwe_0t1w=6gr923158ugf)1gc7clx=01zr)ys6zy_f&op*p'
        SENTRY_MEMCACHED_HOST: memcached
        SENTRY_REDIS_HOST: redis
        SENTRY_POSTGRES_HOST: postgres
        SENTRY_EMAIL_HOST: smtp
      volumes:
        - ./data/sentry:/var/lib/sentry/files

    smtp:
      image: tianon/exim4

    memcached:
      image: memcached:1.4

    redis:
      image: redis:3.2-alpine

    postgres:
      image: postgres:9.5
      volumes:
        - ./data/postgres:/var/lib/postgresql/data

    web:
      extends: base
      links:
        - redis
        - postgres
        - memcached
        - smtp
      ports:
        - '9007:9000'

    cron:
      extends: base
      command: run cron
      links:
        - redis
        - postgres
        - memcached
        - smtp

    worker:
      extends: base
      command: run worker
      links:
        - redis
        - postgres
        - memcached
        - smtp

Dockerfile
FROM sentry:8.16-onbuild

SENTRY_ALLOW_REGISTRATION = False is not working

could not translate host name "postgres" to address:Name or service not known

 docker-compose run --rm web upgrade
Traceback (most recent call last):
  File "/usr/local/bin/sentry", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 158, 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 36, 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 60, in upgrade
    _upgrade(not noinput, traceback, verbosity, not no_repair)
  File "/usr/local/lib/python2.7/site-packages/sentry/runner/commands/upgrade.py", line 20, in _upgrade
    verbosity=verbosity,
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 159, in call_command
    return klass.execute(*args, **defaults)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 415, in handle
    return self.handle_noargs(**options)
  File "/usr/local/lib/python2.7/site-packages/south/management/commands/syncdb.py", line 92, in handle_noargs
    syncdb.Command().execute(**options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 415, in handle
    return self.handle_noargs(**options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 57, in handle_noargs
    cursor = connection.cursor()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/__init__.py", line 162, in cursor
    cursor = util.CursorWrapper(self._cursor(), self)
  File "/usr/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py", line 42, in inner
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/db/postgres/base.py", line 60, in _cursor
    cursor = super(DatabaseWrapper, self)._cursor()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/__init__.py", line 132, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/__init__.py", line 127, in ensure_connection
    self.connect()
  File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/__init__.py", line 127, in ensure_connection
    self.connect()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/__init__.py", line 115, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 115, in get_new_connection
    return Database.connect(**conn_params)
  File "/usr/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: could not translate host name "postgres" to address: Name or service not known

make build only recreates image but doesnt update running docker compose

Hi there,

I noticed that when I write updates to config.yml or sentry.conf.py, then the changes are not updated to a running machine I started with docker compose after running make build
would it make sense to add a task in the makefile that automatically stops the vm, updates the image and restarts it?

cheers
qiong

Statistic error

Hi,

I would like to know that happened with my Sentry statistics. Here is what I did:

  1. Stop cron, web, worker container and delete them.
  2. Dumpall PostgreSQL database from sentry-postgre container.
  3. Update Sentry docker image with cloning and build from GitHub
  4. Run upgrade command
  5. Run new cron, web, worker container from new build.

And, this is the error that I got when I opened statistic page:
image

Thank You

Best Regards,

Adityo Setyonugroho

Postgres isn't initialized

Tried today to run sentry as 100% docker (including postgres and redis)
seems that the DB isn't initialized on the first time that I run the web containr.
I've made sure that I've linked the containers correctly.

This is the sequence of running my containrs:

  1. redis
  2. postgres
  3. sentry-web (linked to previous + secret)
  4. sentry-worker (linked + secret)
  5. sentry-cron (linked + secret)

I can see in the logs of my postgres get requests to access data but it returns
errors that they doesn't exist (database exist but is empty).

  • Using all latest versions (except for redis and postgres which I'm using according to the installation guide)

Server Requirements

What are the minimum requirements for setting up a Sentry Server?
RAM requirement and Disk Requirement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.