There are 3 updates, 1 comment.
 
 
XWiki Docker images / cid:jira-generated-image-avatar-1e1683a3-06db-4251-86e0-411c3031508e XDOCKER-321 Closed

Container based image 16.2.x postgres-tomcat crashes regularly after upgrade due to a Solr issue

 
View issue   ยท   Add comment
 

3 updates

 
cid:jira-generated-image-avatar-b88c711f-3e78-4c30-a740-c5e34c3489a9 Changes by Vincent Massol on 17/Jul/26 22:25
 
Assignee: Vincent Massol
Resolution: Fixed
Status: Open Closed
 
 

1 comment

 
cid:jira-generated-image-avatar-b88c711f-3e78-4c30-a740-c5e34c3489a9 Vincent Massol on 17/Jul/26 22:22
 

Correction after building and running the fix on 18.5.0 + PostgreSQL 18:

Setting java.io.tmpdir through JAVA_OPTS (as I described in my previous comment) does NOT work. Tomcat's catalina.sh appends -Djava.io.tmpdir=$CATALINA_TMPDIR after JAVA_OPTS, so with the JVM's "last -D wins" rule the default /usr/local/tomcat/temp still won - I confirmed the temp files kept landing there. Please disregard the JAVA_OPTS=-Djava.io.tmpdir=... workaround from my earlier comment.

The correct fix, now implemented and verified, is to set CATALINA_TMPDIR in tomcat/setenv.sh (catalina.sh only defaults it when empty, so it wins), plus the empty-on-start cleanup in xwiki/docker-entrypoint.sh. Verified on the running container:
* JVM command line shows a single -Djava.io.tmpdir=/usr/local/xwiki/data/tmp (confirmed in Tomcat's own VersionLoggerListener log).
* Temporary files (JODConverter, etc.) now land in /usr/local/xwiki/data/tmp on the mapped volume, no longer in /usr/local/tomcat/temp.
* The directory is emptied on every container start (planted a marker file, restarted, it was gone).
* XWiki boots normally (HTTP 200), no FileSystemException / "No space left on device".

Corrected workaround for the current image until a new one is published - set CATALINA_TMPDIR (not java.io.tmpdir via JAVA_OPTS) and pre-create the directory on the volume, e.g. in docker-compose:

environment:
  \- CATALINA\_TMPDIR=/usr/local/xwiki/data/tmp

(create /usr/local/xwiki/data/tmp on the volume first, since the JVM won't create it). Could you confirm this resolves the crashes on your side?