Hi,
I try to get a XWiki demo on our docker host up and running. I used the following docker-compose.yml.
As you can see we have a corporate proxy which has to be set to access the internet.
version: '2'
networks:
bridge:
driver: bridge
services:
web:
image: "xwiki:stable-mysql-tomcat"
container_name: xwiki-web
depends_on:
- db
ports:
- "8082:8080"
environment:
- XWIKI_VERSION=xwiki
- DB_USER=xwiki
- DB_PASSWORD=xwiki
- DB_DATABASE=xwiki
- DB_HOST=xwiki-db
- JAVA_OPTS="-Dhttp.proxyHost=10.x.x.x -Dhttp.proxyPort=80 -Dhttps.proxyHost=10.x.x.x -Dhttps.proxyPort=80"
volumes:
- xwiki-data:/usr/local/xwiki
networks:
- bridge
db:
image: "mysql:5.7"
container_name: xwiki-db
volumes:
- ./12/mysql-tomcat/mysql/xwiki.cnf:/etc/mysql/conf.d/xwiki.cnf
- mysql-data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=xwiki
- MYSQL_USER=xwiki
- MYSQL_PASSWORD=xwiki
- MYSQL_DATABASE=xwiki
networks:
- bridge
volumes:
mysql-data: {}
xwiki-data: {}
I get the setup wizard and can add a admin account but in the second step the list of flavors remains empty.
I see the proxy is set via JAVA_OPTS in the container startup logs
xwiki-web | 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
xwiki-web | 14-Jul-2020 05:50:27.518 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/8.5.57
xwiki-web | 14-Jul-2020 05:50:27.529 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jun 30 2020 21:49:10 UTC
xwiki-web | 14-Jul-2020 05:50:27.529 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.57.0
xwiki-web | 14-Jul-2020 05:50:27.530 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
xwiki-web | 14-Jul-2020 05:50:27.530 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 5.4.0-40-generic
xwiki-web | 14-Jul-2020 05:50:27.531 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
xwiki-web | 14-Jul-2020 05:50:27.531 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/java/openjdk
xwiki-web | 14-Jul-2020 05:50:27.532 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.7+10
xwiki-web | 14-Jul-2020 05:50:27.532 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: AdoptOpenJDK
xwiki-web | 14-Jul-2020 05:50:27.532 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
xwiki-web | 14-Jul-2020 05:50:27.533 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
xwiki-web | 14-Jul-2020 05:50:27.534 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
xwiki-web | 14-Jul-2020 05:50:27.535 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
xwiki-web | 14-Jul-2020 05:50:27.535 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
xwiki-web | 14-Jul-2020 05:50:27.536 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
xwiki-web | 14-Jul-2020 05:50:27.536 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
xwiki-web | 14-Jul-2020 05:50:27.537 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dhttp.proxyHost=10.x.x.x -Dhttp.proxyPort=80 -Dhttps.proxyHost=10.x.x.x -Dhttps.proxyPort=80
xwiki-web | 14-Jul-2020 05:50:27.537 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m
xwiki-web | 14-Jul-2020 05:50:27.537 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
xwiki-web | 14-Jul-2020 05:50:27.538 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true
xwiki-web | 14-Jul-2020 05:50:27.538 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:/dev/./urandom
xwiki-web | 14-Jul-2020 05:50:27.539 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
xwiki-web | 14-Jul-2020 05:50:27.539 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
xwiki-web | 14-Jul-2020 05:50:27.540 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
xwiki-web | 14-Jul-2020 05:50:27.540 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
xwiki-web | 14-Jul-2020 05:50:27.540 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
xwiki-web | 14-Jul-2020 05:50:27.541 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
xwiki-web | 14-Jul-2020 05:50:27.541 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
But I get a bunch of errors regarding internet access. Like
xwiki-web | 14-Jul-2020 05:50:47.781 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 20143 ms
xwiki-web | 2020-07-14 05:50:57,693 [Core extension repository updater] ERROR aultExtensionRepositoryManager - Unexpected error when trying to find extension [commons-daemon:commons-daemon/1.2.2] in repository [maven-xwiki:maven:https://nexus.xwiki.org/nexus/content/groups/public]
xwiki-web | org.xwiki.extension.ResolveException: Failed to resolve artifact [commons-daemon:commons-daemon:jar:1.2.2] descriptor
xwiki-web | at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:492)
and
xwiki-web | 2020-07-14 05:53:08,117 [Core extension repository updater] ERROR aultExtensionRepositoryManager - Unexpected error when trying to find extension [commons-daemon:commons-daemon/1.2.2] in repository [store.xwiki.com:xwiki:https://store.xwiki.com/xwiki/rest]
xwiki-web | org.xwiki.extension.ResolveException: Failed to create extension object for extension [commons-daemon:commons-daemon/1.2.2]
Also tcpdump shows me direct access from the host to xwiki.org subdomains.
$ tcpdump -i eth0 -v port 443
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
07:50:47.552831 IP (tos 0x0, ttl 63, id 31618, offset 0, flags [DF], proto TCP (6), length 60)
host.47050 > maven.xwiki.org.https: Flags [S], cksum 0x16f8 (incorrect -> 0xd746), seq 957798078, win 64240, options [mss 1460,sackOK,TS val 2657089348 ecr 0,nop,wscale 7], length 0
07:50:48.563774 IP (tos 0x0, ttl 63, id 31619, offset 0, flags [DF], proto TCP (6), length 60)
host.47050 > maven.xwiki.org.https: Flags [S], cksum 0x16f8 (incorrect -> 0xd353), seq 957798078, win 64240, options [mss 1460,sackOK,TS val 2657090359 ecr 0,nop,wscale 7], length 0
07:50:50.579811 IP (tos 0x0, ttl 63, id 31620, offset 0, flags [DF], proto TCP (6), length 60)
host.47050 > maven.xwiki.org.https: Flags [S], cksum 0x16f8 (incorrect -> 0xcb73), seq 957798078, win 64240, options [mss 1460,sackOK,TS val 2657092375 ecr 0,nop,wscale 7], length 0
07:50:54.739770 IP (tos 0x0, ttl 63, id 31621, offset 0, flags [DF], proto TCP (6), length 60)
host.47050 > maven.xwiki.org.https: Flags [S], cksum 0x16f8 (incorrect -> 0xbb33), seq 957798078, win 64240, options [mss 1460,sackOK,TS val 2657096535 ecr 0,nop,wscale 7], length 0
07:50:57.979285 IP (tos 0x0, ttl 63, id 1815, offset 0, flags [DF], proto TCP (6), length 60)
host.33084 > store.xwiki.com.https: Flags [S], cksum 0x7da5 (incorrect -> 0xe269), seq 3895818074, win 64240, options [mss 1460,sackOK,TS val 424735062 ecr 0,nop,wscale 7], length 0
07:50:58.995766 IP (tos 0x0, ttl 63, id 1816, offset 0, flags [DF], proto TCP (6), length 60)
A curl with the same proxy set can load the webpage just fine.
$ curl --proxy 10.x.x.x:80 https://maven.xwiki.org
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Index of /</title>
</head>
<body>
<h1>Index of /</h1>
<pre><img src="/icons/blank.gif" alt="Icon "> <a href="?C=N;O=D">Name</a> <a href="?C=M;O=A">Last modified</a> <a href="?C=S;O=A">Size</a> <a href="?C=D;O=A">Description</a><hr><img src="/icons/folder.gif" alt="[DIR]"> <a href="externals/">externals/</a> 16-Jun-2020 00:36 -
<img src="/icons/folder.gif" alt="[DIR]"> <a href="lts/">lts/</a> 14-Jul-2020 00:02 -
<img src="/icons/unknown.gif" alt="[ ]"> <a href="public.gpg">public.gpg</a> 26-Sep-2012 16:04 1.6K
<img src="/icons/folder.gif" alt="[DIR]"> <a href="releases/">releases/</a> 14-Jul-2020 01:58 -
<img src="/icons/folder.gif" alt="[DIR]"> <a href="site/">site/</a> 27-Feb-2014 01:14 -
<img src="/icons/folder.gif" alt="[DIR]"> <a href="snapshots/">snapshots/</a> 30-Jun-2020 16:12 -
<img src="/icons/folder.gif" alt="[DIR]"> <a href="stable/">stable/</a> 14-Jul-2020 00:34 -
<img src="/icons/folder.gif" alt="[DIR]"> <a href="superstable/">superstable/</a> 14-Jul-2020 00:02 -
<img src="/icons/unknown.gif" alt="[ ]"> <a href="xwiki.list">xwiki.list</a> 06-Sep-2014 20:47 48
<hr></pre>
<address>Apache/2.2.22 (Debian) Server at maven.xwiki.org Port 443</address>
</body></html>
Did I miss anything? Is there anything else I have to set to get xwiki on docker to use the proxy?
thanks
cd