self-hosted icon indicating copy to clipboard operation
self-hosted copied to clipboard

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

Open tomaskikutis opened this issue 9 years ago • 7 comments

Exception happens when running docker run --rm -it sentry upgrade. I tried to apply a suggestion from https://github.com/getsentry/docker-sentry/issues/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.

tomaskikutis avatar Jan 20 '17 07:01 tomaskikutis

@tomaskikutis If you edit any of the configuration files such as sentry.conf.py you have to rebuild the container right?

CodyCodeman avatar Aug 26 '17 20:08 CodyCodeman

@CodyCodeman Thanks! I haven't worked with containers before, so wasn't sure how the whole thing operates.

tomaskikutis avatar Sep 01 '17 04:09 tomaskikutis

I have same problem

sunshaobin avatar Jan 10 '20 03:01 sunshaobin

I have same issue when trying the command from Sentry Docker documentation: $ docker run -it --rm -e SENTRY_SECRET_KEY='<secret-key>' --link sentry-postgres:postgres --link sentry-redis:redis sentry upgrade

a workaround is to add all this env for the sentry container:

SENTRY_REDIS_HOST=redis
SENTRY_POSTGRES_HOST=postgres
SENTRY_DB_USER=sentry
SENTRY_DB_PASSWORD=secret

to look like this: $ docker run -it --rm -e SENTRY_SECRET_KEY=''<secret-key>' -e SENTRY_REDIS_HOST='redis' -e SENTRY_POSTGRES_HOST='postgres' -e SENTRY_DB_USER='sentry' -e SENTRY_DB_PASSWORD='secret' --link sentry-postgres:postgres --link sentry-redis:redis sentry upgrade

ismaail avatar Jan 14 '20 21:01 ismaail

@ismaail those docs are for an older version of Sentry and should not be used. Please follow our official documentation and the README of this repository.

BYK avatar Jan 15 '20 22:01 BYK

Same problem here.

fredericlebel avatar Feb 05 '20 03:02 fredericlebel

@frleb please open a new issue with proper details.

BYK avatar Feb 05 '20 09:02 BYK