Getting SandboxException errors when initiating the Sandbox process due to not finding a valid executable Java

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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 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: 

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: 

$ /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.

Last modified on May 23, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.