Could not write /etc/relay/credentials.json

When I try to install the Docker image, I always get this error here:

INFO relay_config::config > generating new relay credentials

  • ERROR relay::cli > could not write config file (file /etc/relay/credentials.json)*
  • caused by: Permission denied (os error 13)*
    Cleaning up…

I even tried to create the /etc/relay folder and give it a 777 permission, and the same issue still appears.
I’m using all default configurations.

Any ideas on what I might be doing wrong?

The relay directory inside the on-premise repo should be writeable. Is that the case for you?

I’m going to be editing this comment as I find solutions that gets me further, partially so I can get help, but also if someone runs into the same issue I have - they have to suffer less than I have, lol.

Got further by defining:
SENTRY_CACHE = 'sentry.cache.redis.RedisCache'
in sentry.conf.py

Also further by defining PostgreSQL info there.

Now I got this issue though:

django.db.utils.ProgrammingError: UndefinedObject('type "citext" does not exist\nLINE 1: ...email" ("id" serial NOT NULL PRIMARY KEY, "email" citext NOT...\n                                                             ^\n',)
SQL: CREATE TABLE "sentry_email" ("id" serial NOT NULL PRIMARY KEY, "email" citext NOT NULL UNIQUE, "date_added" timestamp with time zone NOT NULL)

Nevermind, got further further by running on Postgres:
create extension citext;

Since I’m on PSQL 11 (and CentOS), I first needed to do this:
sudo yum install postgresql11-contrib

Note, that I had to use the “full” IP address of the server, so not 127.0.0.1. Not sure if it did something, but this was my guess to do because I know Docker sometimes has issue figuring out “who” localhost is.

Now heading to Redis.
It couldn’t connect to the server on 127.0.0.1, so once again, in config.yml I set a hard port on Redis.
I also had to make Redis listen on all interfaces. I also had to disable protected mode.
I don’t know if it’s possible to pass a password on Sentry, so my “security” is running Redis on a different port. Uff…

No errors now, but still does not work. Still 502 error :confused:

Okay, this was an issue with our setup, probably when running the install script as root. A fix is now submitted: