I want to start my server with a docker-compose script. Currently I'm using a bash script to start the two containers separately: confluence and postgresql.
I need to copy the data from the existing volumes to the volumes created as part of the docker compose stack.
docker run --rm -v "confluence:/from" -v "confluence_confluence:/to" bash -c 'shopt -s dotglob; rm -rf /to/*; cp -r /from/* /to'
docker run --rm -v "postgres_confluence:/from" -v "confluence_postgres:/to" bash -c 'shopt -s dotglob; rm -rf /to/*; cp -r /from/* /to'
This copies the files over, but when I access through browser, Confluence complains about not finding the confluence.cfg.xml file, even when it is present:
Here it is:
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
confluence-configuration
>
<
setupStep
>complete</
setupStep
>
<
setupType
>custom</
setupType
>
<
buildNumber
>8401</
buildNumber
>
<
properties
>
<
property
name
=
"admin.ui.allow.daily.backup.custom.location"
>false</
property
>
<
property
name
=
"admin.ui.allow.manual.backup.download"
>false</
property
>
<
property
name
=
"admin.ui.allow.site.support.email"
>false</
property
>
<
property
name
=
"atlassian.license.message"
>...</
property
>
<
property
name
=
"attachments.dir"
>${confluenceHome}/attachments</
property
>
<
property
name
=
"confluence.database.connection.type"
>database-type-standard</
property
>
<
property
name
=
"confluence.setup.server.id"
>B63B-FP8G-AUNL-K6X1</
property
>
<
property
name
=
"confluence.webapp.context.path"
></
property
>
<
property
name
=
"hibernate.c3p0.acquire_increment"
>1</
property
>
<
property
name
=
"hibernate.c3p0.idle_test_period"
>100</
property
>
<
property
name
=
"hibernate.c3p0.max_size"
>60</
property
>
<
property
name
=
"hibernate.c3p0.max_statements"
>0</
property
>
<
property
name
=
"hibernate.c3p0.min_size"
>20</
property
>
<
property
name
=
"hibernate.c3p0.preferredTestQuery"
>select 1</
property
>
<
property
name
=
"hibernate.c3p0.timeout"
>30</
property
>
<
property
name
=
"hibernate.connection.driver_class"
>org.postgresql.Driver</
property
>
<
property
name
=
"hibernate.connection.isolation"
>2</
property
>
<
property
name
=
"hibernate.connection.password"
>...</
property
>
<
property
name
=
"hibernate.connection.url"
>jdbc:postgresql://10.1.0.219:5432/confluence</
property
>
<
property
name
=
"hibernate.connection.username"
>confluence</
property
>
<
property
name
=
"hibernate.database.lower_non_ascii_supported"
>true</
property
>
<
property
name
=
"hibernate.dialect"
>com.atlassian.confluence.impl.hibernate.dialect.PostgreSQLDialect</
property
>
<
property
name
=
"hibernate.setup"
>true</
property
>
<
property
name
=
"jwt.private.key"
>...</
property
>
<
property
name
=
"jwt.public.key"
>MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA27lFBfETFBvPSJS6nRmCFcMA5yS7GapiLRDQULv3VeoavhVsph8+Q0cdGdoIB0LYA2maFro7fe5sQvCR2fjdGeAWUg38D8BQaTNA/fjqjyMuuUkQS8pyTEvFvUVbNFnBjtNT/tPDgPJs0uWXMG8Y6QRJYocOBYZ/5eq0zMPknS4h4ZuRXcJAcklXLRxf4LSEd6yFA0/S+cKm3Zy3mrO6lUCo5+Y5jh5XICvj27DudQRK26YXNPoTXTawWqR85AiQRMgfDex8fmiYvy+QUn1NwSXfgrba5X4hU1KwivtABPoRhRel97vPXjBGQkxqn7+6CPwzZhMptLKw15QNspXOZzQsqetfL5xkwdLVHZpuqoLLh0Poxp/OYk6C0pRXhju4pAuCdg2+0SR8RyT7BMOnVOPpVT+pxjQEOp8ICThyQ0OzH9XIvAHy7oovfP/va9eBBqbN0BvsiusULm8exspH5YR5K95kP46m/ltchK3+ji5HUaeX0TjW0OOYY4qRCoaHAgMBAAE=</
property
>
<
property
name
=
"lucene.index.dir"
>${localHome}/index</
property
>
<
property
name
=
"synchrony.encryption.disabled"
>true</
property
>
<
property
name
=
"synchrony.proxy.enabled"
>true</
property
>
<
property
name
=
"webwork.multipart.saveDir"
>${localHome}/temp</
property
>
</
properties
>
</
confluence-configuration
>
And the compose script:
version: "3"
services:
confluence:
image: atlassian/confluence-server
restart: always
volumes:
- confluence:/var/atlassian/application-data/confluence
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- 10.1.0.219:80:8090
- 10.1.0.219:8091:8091
depends_on:
- postgres
networks:
- confluence
postgres:
image: postgres
restart: always
environment:
- POSTGRES_USER=confluence
- POSTGRES_DB=confluence
- POSTGRES_PASSWORD=...
volumes:
- postgres:/var/lib/postgresql/data
networks:
- confluence
volumes:
confluence:
postgres:
networks:
confluence:
Hey @Delany ,
I can see that confluence.cfg.xml is present from your ls command, but what isn't clear is the permissions for this file. Is it readable by the built in confluence user, or only by the root user? Can you run ls -l and share the output?
Yeah it was all root. I changed it to UID 2002, and when I started the compose container it was set to confluence:confluence
Now I get this err
The postgres container logs say it started fine.
Here are logs from the confluence container:
INFO:root:Generating /opt/atlassian/confluence/conf/server.xml from template server.xml.j2
INFO:root:Generating /opt/atlassian/confluence/confluence/WEB-INF/classes/seraph-config.xml from template seraph-config.xml.j2
INFO:root:Generating /opt/atlassian/confluence/confluence/WEB-INF/classes/confluence-init.properties from template confluence-init.properties.j2
INFO:root:/var/atlassian/application-data/confluence/confluence.cfg.xml exists; skipping.
INFO:root:User is currently root. Will downgrade run user to to confluence
INFO:root:Running Confluence with command '/bin/su', arguments ['/bin/su', 'confluence', '-c', '/opt/atlassian/confluence/bin/start-confluence.sh -fg']
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
26-May-2020 17:45:44.448 WARNING [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'proxyPort' to '' did not find a matching property.
26-May-2020 17:45:44.482 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Engine] failed to set property [debug] to [0]
26-May-2020 17:45:44.504 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Engine/Host] failed to set property [debug] to [0]
26-May-2020 17:45:44.548 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Engine/Host/Context] failed to set property [debug] to [0]
26-May-2020 17:45:44.583 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Engine/Host/Context] failed to set property [debug] to [0]
26-May-2020 17:45:44.590 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.27
26-May-2020 17:45:44.597 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 7 2019 09:57:22 UTC
26-May-2020 17:45:44.597 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.27.0
26-May-2020 17:45:44.597 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
26-May-2020 17:45:44.597 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.15.0-101-generic
26-May-2020 17:45:44.597 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
26-May-2020 17:45:44.597 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/java/openjdk
26-May-2020 17:45:44.597 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.5+10
26-May-2020 17:45:44.597 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: AdoptOpenJDK
26-May-2020 17:45:44.598 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/atlassian/confluence
26-May-2020 17:45:44.598 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/atlassian/confluence
26-May-2020 17:45:44.599 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
26-May-2020 17:45:44.599 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
26-May-2020 17:45:44.599 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
26-May-2020 17:45:44.599 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties
26-May-2020 17:45:44.599 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
26-May-2020 17:45:44.599 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
26-May-2020 17:45:44.599 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
26-May-2020 17:45:44.599 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
26-May-2020 17:45:44.600 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:ReservedCodeCacheSize=256m
26-May-2020 17:45:44.600 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseCodeCacheFlushing
26-May-2020 17:45:44.600 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.server.protocols=TLSv1.1,TLSv1.2
26-May-2020 17:45:44.600 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.client.protocols=TLSv1.1,TLSv1.2
26-May-2020 17:45:44.600 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dconfluence.context.path=
26-May-2020 17:45:44.600 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Datlassian.plugins.startup.options=-fg
26-May-2020 17:45:44.600 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.locale.providers=JRE,SPI,CLDR
26-May-2020 17:45:44.600 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768
26-May-2020 17:45:44.600 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsynchrony.enable.xhr.fallback=true
26-May-2020 17:45:44.601 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m
26-May-2020 17:45:44.601 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m
26-May-2020 17:45:44.601 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dconfluence.home=/var/atlassian/application-data/confluence
26-May-2020 17:45:44.601 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseG1GC
26-May-2020 17:45:44.601 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Datlassian.plugins.enable.wait=300
26-May-2020 17:45:44.601 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
26-May-2020 17:45:44.601 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:G1ReservePercent=20
26-May-2020 17:45:44.601 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xloggc:/opt/atlassian/confluence/logs/gc-2020-05-26_17-45-43.log
26-May-2020 17:45:44.601 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseGCLogFileRotation
26-May-2020 17:45:44.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:NumberOfGCLogFiles=5
26-May-2020 17:45:44.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:GCLogFileSize=2M
26-May-2020 17:45:44.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xlog:gc+age=debug:file=/opt/atlassian/confluence/logs/gc-2020-05-26_17-45-43.log::filecount=5,filesize=2M
26-May-2020 17:45:44.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:-PrintGCDetails
26-May-2020 17:45:44.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+PrintGCDateStamps
26-May-2020 17:45:44.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:-PrintTenuringDistribution
26-May-2020 17:45:44.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+IgnoreUnrecognizedVMOptions
26-May-2020 17:45:44.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
26-May-2020 17:45:44.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/atlassian/confluence
26-May-2020 17:45:44.603 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/atlassian/confluence
26-May-2020 17:45:44.603 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/atlassian/confluence/temp
26-May-2020 17:45:44.603 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib]
26-May-2020 17:45:45.092 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8090"]
26-May-2020 17:45:45.111 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [843] milliseconds
26-May-2020 17:45:45.188 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
26-May-2020 17:45:45.189 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.27]
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
26-May-2020 17:45:47.442 INFO [Catalina-utility-2] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath
26-May-2020 17:45:47.568 INFO [Catalina-utility-2] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
26-May-2020 17:45:47.776 INFO [Catalina-utility-2] org.apache.catalina.core.ApplicationContext.log Initializing Spring DispatcherServlet 'dispatcher'
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.atlassian.hibernate.adapter.proxy.BytecodeProviderImpl_ImplementV2Proxy (file:/opt/atlassian/confluence/confluence/WEB-INF/lib/hibernate.adapter-1.0.3.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of com.atlassian.hibernate.adapter.proxy.BytecodeProviderImpl_ImplementV2Proxy
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
26-May-2020 17:46:07.706 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8090"]
26-May-2020 17:46:07.727 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [22,615] milliseconds
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I forgot to change the hibernate.connection.url in Confluence configuration, so it was looking for an external db instead of the stack db.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.