codeclou / docker-atlassian-confluence-data-center

Dockerized Atlassian Confluence Data Center for local testing during plugin development.
MIT License
21 stars 9 forks source link

Not able to get the cluster running #7

Closed ajayep closed 4 years ago

ajayep commented 4 years ago

I'm getting the following error when I start 7.5.0. Any ideas? Everything seems to start correctly. Seems to a permission issue with Confluence home directory ? How do i get it resolved . I even tried v7.4.0 and get the same issue.

Using Mac OS Catlina v10.15.4 & Docker version 19.03.8, build afacb8b

sh-3.2# sudo docker-compose -f docker-compose-one-node.yml up --detach

Creating confluence-cluster-750-db ... done
Recreating confluence-cluster-750-node1 ... done
Creating confluence-cluster-750-lb      ... done

sh-3.2# docker ps

CONTAINER ID        IMAGE                                                                   COMMAND                  CREATED             STATUS              PORTS                    NAMES
0b0c4e5c6dd1        codeclou/docker-atlassian-confluence-data-center:loadbalancer-36c4370   "/work-private/docke…"   6 seconds ago       Up 5 seconds        0.0.0.0:2750->2750/tcp   confluence-cluster-750-lb
1ad7dd876f9b        postgres:10-alpine                                                      "docker-entrypoint.s…"   8 seconds ago       Up 7 seconds        5432/tcp                 confluence-cluster-750-db

sh-3.2# docker-compose -f docker-compose-one-node.yml logs

Attaching to confluence-cluster-750-lb, confluence-cluster-750-node1, confluence-cluster-750-db
confluence-cluster-750-db       | The files belonging to this database system will be owned by user "postgres".
confluence-cluster-750-db       | This user must also own the server process.
confluence-cluster-750-db       | 
confluence-cluster-750-db       | The database cluster will be initialized with locale "en_US.utf8".
confluence-cluster-750-db       | The default database encoding has accordingly been set to "UTF8".
confluence-cluster-750-db       | The default text search configuration will be set to "english".
confluence-cluster-750-db       | 
confluence-cluster-750-db       | Data page checksums are disabled.
confluence-cluster-750-db       | 
confluence-cluster-750-db       | fixing permissions on existing directory /var/lib/postgresql/data ... ok
confluence-cluster-750-db       | creating subdirectories ... ok
confluence-cluster-750-db       | selecting default max_connections ... 100
confluence-cluster-750-db       | selecting default shared_buffers ... 128MB
confluence-cluster-750-db       | selecting default timezone ... UTC
confluence-cluster-750-db       | selecting dynamic shared memory implementation ... posix
confluence-cluster-750-db       | creating configuration files ... ok
confluence-cluster-750-db       | running bootstrap script ... ok
confluence-cluster-750-db       | sh: locale: not found
confluence-cluster-750-db       | 2020-06-14 09:43:47.153 UTC [29] WARNING:  no usable system locales were found
confluence-cluster-750-db       | performing post-bootstrap initialization ... ok
confluence-cluster-750-db       | syncing data to disk ... ok
confluence-cluster-750-db       | 
confluence-cluster-750-db       | Success. You can now start the database server using:
confluence-cluster-750-db       | 
confluence-cluster-750-db       |     pg_ctl -D /var/lib/postgresql/data -l logfile start
confluence-cluster-750-db       | 
confluence-cluster-750-db       | 
confluence-cluster-750-db       | WARNING: enabling "trust" authentication for local connections
confluence-cluster-750-db       | You can change this by editing pg_hba.conf or using the option -A, or
confluence-cluster-750-db       | --auth-local and --auth-host, the next time you run initdb.
confluence-cluster-750-db       | waiting for server to start....2020-06-14 09:43:48.370 UTC [34] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
confluence-cluster-750-db       | 2020-06-14 09:43:48.385 UTC [35] LOG:  database system was shut down at 2020-06-14 09:43:47 UTC
confluence-cluster-750-db       | 2020-06-14 09:43:48.388 UTC [34] LOG:  database system is ready to accept connections
confluence-cluster-750-db       |  done
confluence-cluster-750-db       | server started
confluence-cluster-750-db       | CREATE DATABASE
confluence-cluster-750-db       | 
confluence-cluster-750-db       | 
confluence-cluster-750-db       | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
confluence-cluster-750-db       | 
confluence-cluster-750-db       | 2020-06-14 09:43:48.840 UTC [34] LOG:  received fast shutdown request
confluence-cluster-750-db       | waiting for server to shut down....2020-06-14 09:43:48.842 UTC [34] LOG:  aborting any active transactions
confluence-cluster-750-db       | 2020-06-14 09:43:48.843 UTC [34] LOG:  worker process: logical replication launcher (PID 41) exited with exit code 1
confluence-cluster-750-db       | 2020-06-14 09:43:48.844 UTC [36] LOG:  shutting down
confluence-cluster-750-db       | 2020-06-14 09:43:48.860 UTC [34] LOG:  database system is shut down
confluence-cluster-750-db       |  done
confluence-cluster-750-db       | server stopped
confluence-cluster-750-db       | 
confluence-cluster-750-db       | PostgreSQL init process complete; ready for start up.
confluence-cluster-750-db       | 
confluence-cluster-750-db       | 2020-06-14 09:43:48.962 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
confluence-cluster-750-db       | 2020-06-14 09:43:48.963 UTC [1] LOG:  listening on IPv6 address "::", port 5432
confluence-cluster-750-db       | 2020-06-14 09:43:48.967 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
confluence-cluster-750-db       | 2020-06-14 09:43:48.982 UTC [45] LOG:  database system was shut down at 2020-06-14 09:43:48 UTC
confluence-cluster-750-db       | 2020-06-14 09:43:48.985 UTC [1] LOG:  database system is ready to accept connections
confluence-cluster-750-lb       | generating loadbalancer config for 1 nodes
confluence-cluster-750-lb       | [Sun Jun 14 09:43:48.390784 2020] [lbmethod_heartbeat:notice] [pid 1] AH02282: No slotmem from mod_heartmonitor
confluence-cluster-750-lb       | [Sun Jun 14 09:43:48.393826 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.41 (Unix) configured -- resuming normal operations
confluence-cluster-750-lb       | [Sun Jun 14 09:43:48.394032 2020] [core:notice] [pid 1] AH00094: Command line: 'httpd -D FOREGROUND'
confluence-cluster-750-node1    | INFO:root:Generating /opt/atlassian/confluence/conf/server.xml from template server.xml.j2
confluence-cluster-750-node1    | INFO:root:Generating /opt/atlassian/confluence/confluence/WEB-INF/classes/seraph-config.xml from template seraph-config.xml.j2
confluence-cluster-750-node1    | INFO:root:Generating /opt/atlassian/confluence/confluence/WEB-INF/classes/confluence-init.properties from template confluence-init.properties.j2
confluence-cluster-750-node1    | INFO:root:Generating /opt/confluence-home/confluence.cfg.xml from template confluence.cfg.xml.j2
confluence-cluster-750-node1    | WARNING:root:Container not started as root. Bootstrapping skipped for '/opt/confluence-home/confluence.cfg.xml'
confluence-cluster-750-node1    | Traceback (most recent call last):
confluence-cluster-750-node1    |   File "/entrypoint.py", line 19, in <module>
confluence-cluster-750-node1    |     start_app(f'{CONFLUENCE_INSTALL_DIR}/bin/start-confluence.sh -fg', CONFLUENCE_HOME, name='Confluence')
confluence-cluster-750-node1    |   File "/entrypoint_helpers.py", line 85, in start_app
confluence-cluster-750-node1    |     set_perms(home_dir, env['run_user'], env['run_group'], 0o700)
confluence-cluster-750-node1    |   File "/entrypoint_helpers.py", line 34, in set_perms
confluence-cluster-750-node1    |     shutil.chown(path, user=user, group=group)
confluence-cluster-750-node1    |   File "/usr/lib/python3.6/shutil.py", line 1052, in chown
confluence-cluster-750-node1    |     os.chown(path, _user, _group)
confluence-cluster-750-node1    | PermissionError: [Errno 1] Operation not permitted: '/opt/confluence-home'
clouless commented 4 years ago

Please try sudo sysctl -w net.inet.ip.forwarding=1 and really give your docker at least 8GB ram and min 4 CPUs on MacOS. Otherwise it will fail to start.

Bildschirmfoto 2020-06-14 um 12 01 01

On my macOS Catalina with latest docker and latest docker-compose it works as described.

Other than that I have no idea. Could be anything. Your pc is too slow, docker installation is broken. Docker networks problems a.s.o. I hope the above things with ram+cpu solves your issue.

spraot commented 3 years ago

@ajayep I have the same issue, apparently with missing permissions to write to the home directory. How did you solve it? I've followed the instructions exactly and all the home dirs are owned by 2002:2002.

spraot commented 3 years ago

I'm on Linux by the way, so not a Mac-specific issue.

spraot commented 3 years ago

@ajayep When running a distro with SElinux, the following command is needed to allow containers to write to the volumes: chcon -R -t svirt_sandbox_file_t /opt/confluence-cluster/7.5.0/confluence-*

@clouless This should be added to the readme.