I’m running the XWiki 10.7 Tomcat official docker image with a Postgres-DB.
The problem is that I can’t upload attachments larger than 1 MB even though bin/edit/XWiki/XWikiPreferences?editor=object was set to 30MB by default and is now set to 30GB or something like that.
There appears to be no log entries in tomcat/logs/ but I’m not sure what I’d be looking for and in which log file.
I’ve also added a few zeroes to the max upload size even though it shouldn’t have been necessary. As mentioned, it seems to fail from 1MB upwards.
The upload dialog appears, it appears to upload and to finish and then “an error occurred” if the file is larger than 1MB:
My main question: How would you debug something like this? If there is code that makes the error message appear doesn’t that code log that error somewhere?! Perhaps with a more helpful error message.
In the container there is a catalina.2018-10-10.log in the logs dir of tomcat:
root@xwiki-test-0:/usr/local/tomcat/logs# ls -la
total 192
drwxrwxrwx 1 root root 4096 Oct 10 08:56 .
drwxr-sr-x 1 root staff 4096 Sep 12 21:41 ..
-rw-r----- 1 root root 13073 Oct 10 09:22 catalina.2018-10-10.log
-rw-r----- 1 root root 0 Oct 10 08:56 host-manager.2018-10-10.log
-rw-r----- 1 root root 0 Oct 10 08:56 localhost.2018-10-10.log
-rw-r----- 1 root root 160446 Oct 10 13:51 localhost_access_log.2018-10-10.txt
-rw-r----- 1 root root 0 Oct 10 08:56 manager.2018-10-10.log
That contains nothing about the file or the upload.
root@xwiki-test-0:/usr/local/tomcat/logs# cat catalina.2018-10-10.log
10-Oct-2018 08:56:14.255 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.34
10-Oct-2018 08:56:14.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 4 2018 22:28:22 UTC
10-Oct-2018 08:56:14.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.34.0
10-Oct-2018 08:56:14.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
10-Oct-2018 08:56:14.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.15.0-34-generic
10-Oct-2018 08:56:14.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
10-Oct-2018 08:56:14.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre
10-Oct-2018 08:56:14.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_181-8u181-b13-1~deb9u1-b13
10-Oct-2018 08:56:14.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
10-Oct-2018 08:56:14.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
10-Oct-2018 08:56:14.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
10-Oct-2018 08:56:14.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
10-Oct-2018 08:56:14.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
10-Oct-2018 08:56:14.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
10-Oct-2018 08:56:14.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
10-Oct-2018 08:56:14.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
10-Oct-2018 08:56:14.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m
10-Oct-2018 08:56:14.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
10-Oct-2018 08:56:14.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true
10-Oct-2018 08:56:14.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsecurerandom.source=file:/dev/urandom
10-Oct-2018 08:56:14.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
10-Oct-2018 08:56:14.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
10-Oct-2018 08:56:14.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
10-Oct-2018 08:56:14.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
10-Oct-2018 08:56:14.259 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.17] using APR version [1.5.2].
10-Oct-2018 08:56:14.259 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
10-Oct-2018 08:56:14.259 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
10-Oct-2018 08:56:14.265 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.0f 25 May 2017]
10-Oct-2018 08:56:14.324 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
10-Oct-2018 08:56:14.332 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
10-Oct-2018 08:56:14.337 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
10-Oct-2018 08:56:14.338 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
10-Oct-2018 08:56:14.339 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 347 ms
10-Oct-2018 08:56:14.360 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
10-Oct-2018 08:56:14.360 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.34
10-Oct-2018 08:56:14.367 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/ROOT]
10-Oct-2018 08:56:25.269 INFO [localhost-startStop-1] 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.
10-Oct-2018 08:56:37.226 INFO [localhost-startStop-1] org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.<init> ProcessManager implementation is LinuxProcessManager
10-Oct-2018 08:56:37.245 INFO [OfficeProcessThread-0] org.artofsolving.jodconverter.office.OfficeProcess.start starting process with acceptString 'socket,host=127.0.0.1,port=8100,tcpNoDelay=1' and profileDir '/usr/local/tomcat/temp/.jodconverter_socket_host-127.0.0.1_port-8100'
10-Oct-2018 08:56:37.254 INFO [OfficeProcessThread-0] org.artofsolving.jodconverter.office.OfficeProcess.start started process; pid = 98
10-Oct-2018 08:56:37.535 WARNING [OfficeProcessThread-0] org.artofsolving.jodconverter.office.ManagedOfficeProcess$6.attempt office process died with exit code 81; restarting it
10-Oct-2018 08:56:37.542 INFO [OfficeProcessThread-0] org.artofsolving.jodconverter.office.OfficeProcess.start starting process with acceptString 'socket,host=127.0.0.1,port=8100,tcpNoDelay=1' and profileDir '/usr/local/tomcat/temp/.jodconverter_socket_host-127.0.0.1_port-8100'
10-Oct-2018 08:56:37.553 INFO [OfficeProcessThread-0] org.artofsolving.jodconverter.office.OfficeProcess.start started process; pid = 108
10-Oct-2018 08:56:37.856 INFO [OfficeProcessThread-0] org.artofsolving.jodconverter.office.OfficeConnection.connect connected: 'socket,host=127.0.0.1,port=8100,tcpNoDelay=1'
10-Oct-2018 08:56:39.118 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/ROOT] has finished in [24,751] ms
10-Oct-2018 08:56:39.123 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
10-Oct-2018 08:56:39.171 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
10-Oct-2018 08:56:39.199 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 24860 ms
10-Oct-2018 09:22:13.529 WARNING [http://wiki.statistik-experten.de/bin/download/FlamingoThemes/Iceberg/logo.svg] org.apache.catalina.connector.Response.setCharacterEncoding The encoding [] is not recognised by the JRE
java.lang.IllegalArgumentException: java.io.UnsupportedEncodingException: The character encoding [] is not supported
There’s also an access log. But there, too, is nothing about the upload:
ok so that explains it. I’ve recently noticed that the xwiki logs do not appear in the catalina.out files when using the XWiki Docker image. I’ve just created Loading...
You should have them in the console where you started “docker run” and if you ran it in the background you can issue a “docker logs”.
I don’t know what’s the problem. All I know is that it can work since it worked when I tried the XWiki docker image so my guess is that it’s your environment. If I had to guess I’d say that it’s a permission issue in your permanent directory (the volume mapped to your host).