To provide some context, the REVEN user is:
- With a Docker installation,
reven
- With a native installation,
<system-user-name>
used to install REVEN
You may transparently change the user of your REVEN installation when migrating from a native installation to a Docker installation (or the opposite) or when moving a native installation from a system user to another.
In this case, two error conditions may arise:
- If REVEN versions are different before and after the change of user, starting REVEN with
./start.sh
fails with the following error displayed in the terminal:django.db.utils.OperationalError: FATAL: role "my_username" does not exist
- If REVEN versions are identical, once started, the use of the Program Manager produces a 500 error, with a similar role error in the
uwsgi.log
file in theQUASAR_ROOT
folder.
You can repair this manually by renaming the old_user
to your new username, new_user
in the database, using the following procedure. Keep in mind that if you run into this error, you likely have a kind of special setup. Therefore, this procedure may have to be adapted regarding your situation.
Note: if you are running the Docker installation, you can get a shell inside your container by running the following:
docker exec -it <container_name> bash
Here are the basic steps:
-
Make sure your REVEN’s Project Manager (Quasar), faulty, PostgreSQL is running:
./start.sh
- Get the information about the running PostgreSQL:
$ ps x | grep postgres [...] /usr/lib/postgresql/9.6/bin/postgres -D /home/<new_user>/Reven2/2.6.0-dev/db-2.6.0-dev.psql -k /tmp/tetrane-1000 -p 34567 [...]
Here, the important information are the socket path (
/tmp/tetrane-1000
) and the port (34567
). -
Create a new superuser
root
in your DB:$ createuser -h /tmp/tetrane-1000 -p 34567 -U old_user --superuser root
-
Get a shell with this new superuser in your Project Manager’s DB (
quasar
):$ psql -h /tmp/tetrane-1000 -p 34567 -U root quasar
- Rename your
old_user
to yournew_user
:quasar=# ALTER USER old_user RENAME TO new_user; ALTER ROLE
Exit the
pqsl
shell withCtrl-D
. - Complete the procedure by restarting REVEN Project Manager:
- With a Docker installation, run
run.sh
twice to stop and restart. - With a native installation, run
stop.sh
thenstart.sh
.
- With a Docker installation, run
Comments
0 comments
Article is closed for comments.