Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-59613

java.io.tmpdir has no effect on changing the installation temp directory

XMLWordPrintable

      Issue Summary

      java.io.tmpdir has no effect on changing the installation temp directory

      In the this documentation about changing the installation temp directory. It is advised to use the Java parameter below:

      -Djava.io.tmpdir=/path/to/your/own/temp/directory
      

      In the catalina.sh and catalina.bat file, the comment below suggests the same as well:

      catalina.sh
      #   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
      #                   the JVM should use (java.io.tmpdir).  Defaults to
      #                   $CATALINA_BASE/temp.
      
      catalina.bat
      rem   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
      rem                   the JVM should use (java.io.tmpdir).  Defaults to
      rem                   %CATALINA_BASE%\temp.
      

      However, having this Java parameter set has no effect on changing the installation temp directory

      Tested Environment

      Confluence 6.15.1
      Confluence 7.3.3

      Steps to Reproduce

      1. Stop a vanilla Confluence and add the system property below:
        -Djava.io.tmpdir=/somewhere/doesnt/matter 
        
      2. Restart Confluence

      Expected Results

      The Installation Temp directory will be changed according to the Java parameter included

      Actual Results

      The Installation Temp directory is not changed despite the Java parameter can be seen to parsed successfully into Confluence:

      Meanwhile, the original installation temp directory will still be used and a second set of java.io.tmpdir can be seen

      Workaround

      Add this line into setenv.sh according to the Jira KB:

      setenv.sh
      CATALINA_TMPDIR='/path/to/new/installation/temp'
      

      Note

      The newly changed installation temp directory from the workaround step may not be created by Confluence if it doesn't already exist due to CONFSERVER-59610

              33fcd7e92bd6 Arun Antony
              btan@atlassian.com Damien Tan
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: