Confluence Docker container not starting

Pankaj Jangid
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 20, 2023

I am launching confluence using the docker-compose setup. Following is my setup:

Screenshot from 2023-03-21 11-30-41.png

It produces following error:

Screenshot from 2023-03-21 11-31-47.png

 

1 answer

1 vote
Zhiyong Lin March 24, 2023

By default the Confuence application runs as the user confluence, with a UID and GID of 2002,

Jira is 2001, make sure the data directory's owner is 2002 or 2001.

Pankaj Jangid
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 24, 2023

Initially, I have no directories. So directories are created by `docker compose up`. I don't know why the directories are created with root ownership. Even if I pass `user: confluence`, the host directories are still owned by `root`.

Another point, if I use named volumes then it works fine. but I want to use host directories.

Gustavo Chaves
Contributor
March 24, 2023

When "docker compose up" creates the directories it makes they owned by root. You should create the directories before starting the containers and make them owned by the user that will have to use them inside the container. In this case, since it's for Confluence, you need to make they owned by uid 2002. Something like this:

mkdir -p ./logs/confluence-logs

sudo chown 2002:2002 ./logs/confluence-logs

Like Pankaj Jangid likes this
Pankaj Jangid
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 24, 2023

This works. I have also tried to pass `user: jira` in `docker-compose.yml` service definition. But that didn't work. This should ideally be fixed in the docker image. The entry-point script that is creating those folders should fix the ownership.

Ryan Goodwin
Contributor
March 24, 2023

I would reference the vendor supplied Dockerfiles and perform similar chown/chmod actions:

https://bitbucket.org/atlassian-docker/docker-atlassian-jira/src/master/Dockerfile

Like Pankaj Jangid likes this
Pankaj Jangid
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 24, 2023

Thanks. I would definitely like to fix this.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events