docker-compose - "FATAL: role "root" does not exist"

4,149 views
Skip to first unread message

KenJ

unread,
May 4, 2018, 1:18:56 AM5/4/18
to AWX Project
Using the attached docker-compose.yml file, running a docker-compose up, I get the following errors over an over again in the logs:

postgres                 | FATAL:  role "root" does not exist
  *
  *
awx_task                 | django.db.utils.OperationalError: FATAL:  role "root" does not exist
  *
  *
awx_web                  | django.db.utils.OperationalError: FATAL:  role "root" does not exist

It seems to be related to the "user: root" definitions within the docker-compose.yml file, but those lines were created by the awx install script.

Any ideas? Should I be calling out a different "user: " within the docker-compose file?

Thanks!!
docker-compose.yml

Sébastien PERIN

unread,
May 4, 2018, 5:19:11 AM5/4/18
to AWX Project
I've no problem with the same docker-comppose.yml file
Who's the user that runs your 'docker-compose up' command? Did you followed the docker-ce post installation steps here to "Manage Docker as a non-root user"

KenJ

unread,
May 4, 2018, 12:41:46 PM5/4/18
to AWX Project
I was running the docker-compose up command as a non-root user.
> sudo docker-compose up

The security warnings listed in the docker-ce post installation steps made me not want to add the non-root user to the docker group.

KenJ

unread,
May 4, 2018, 5:39:03 PM5/4/18
to AWX Project
I went and added the non-root user to the docker group, as instructed in the post-installation doc.
sudo usermod -aG docker $USER

Same errors.

If I comment-out the "user: root" lines in the docker-compose file, the errors change to
  django.db.utils.OperationalError: FATAL:  role "awx" does not exist
Reply all
Reply to author
Forward
0 new messages