Getting SandboxException errors when initiating the Sandbox process due to not finding a valid executable Java
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When exporting a page to PDF or a file is converted, a External Process Pool for Confluence Data Center called Sandbox is triggered. If there is a Java change/modification in the Java path, Confluence might not find the right Java executable to initiate the new Sandbox process.
Environment
Confluence 8.X
Diagnosis
In the atlassian-confluence.log
files you will find a SandboxException message as the one below:
1
2
3
4
5
6
7
8
9
10
11
Caused by: com.atlassian.confluence.util.sandbox.SandboxException: /usr/lib/jvm/java-11-openjdk-11.0.21.0.9-1.el7_9.x86_64/bin/java is not an executable
at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.getJavaRuntime(SandboxProcess.java:330)
at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.start(SandboxProcess.java:254)
at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.startIfDead(SandboxProcess.java:242)
at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.execute(SandboxProcess.java:120)
at com.atlassian.confluence.impl.util.sandbox.SandboxLocalProcessPool.execute(SandboxLocalProcessPool.java:107)
at com.atlassian.confluence.impl.util.sandbox.ConfluenceSandboxPoolFactory$LazySandbox.execute(ConfluenceSandboxPoolFactory.java:70)
at com.atlassian.confluence.impl.util.sandbox.DefaultSandbox.execute(DefaultSandbox.java:36)
at com.atlassian.confluence.extra.flyingpdf.sandbox.PdfExportSandbox.execute(PdfExportSandbox.java:49)
at com.atlassian.confluence.extra.flyingpdf.sandbox.SandboxXmlToPdfConverter.convertXhtmlToPdf(SandboxXmlToPdfConverter.java:83)
... 488 more
Your OS administrator can confirm that there is no executable in the location mentioned in the Confluence error message:
1
2
$ /usr/lib/jvm/java-11-openjdk-11.0.21.0.9-1.el7_9.x86_64/bin/java -version
-bash: /usr/lib/jvm/java-11-openjdk-11.0.21.0.9-1.el7_9.x86_64/bin/java: No such file or directory
Cause
The cause of this error is that there was a Java-Update on the machine without re-starting Confluence.
Solution
Restarting Confluence will help to set the proper path.
Otherwise, follow the steps in our document Change the Java vendor or version Confluence uses to modify the new path manually.
Was this helpful?