Legacy Knowledge Base
Published Sep. 10, 2025

com.liferay.petra.process.ProcessException: java.io.IOException: Broken pipe error during indexation process

Written By

Jorge Diaz

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • We have configured the text extraction functionality in an external process using the configuration:
text.extraction.fork.process.enabled=true
text.extraction.fork.process.mime.types=application/x-tika-ooxml,application/pdf
  • But when we try to execute a reindexation process, the execution of the external process is not working, following error is thrown:
2023-01-13 11:05:00.849 ERROR [default-13][FileImpl:483] com.liferay.petra.process.ProcessException: java.io.IOException: Broken pipe
com.liferay.petra.process.ProcessException: java.io.IOException: Broken pipe
    at com.liferay.petra.process.local.LocalProcessExecutor.execute(LocalProcessExecutor.java:122)
    at com.liferay.portal.util.FileImpl.lambda$extractText$0(FileImpl.java:441)
    at com.liferay.registry.internal.RegistryImpl.callService(RegistryImpl.java:71)
    at com.liferay.portal.util.FileImpl.extractText(FileImpl.java:437)
    at com.liferay.portal.kernel.util.FileUtil.extractText(FileUtil.java:165)
    at com.liferay.portal.kernel.search.DocumentImpl.addFile(DocumentImpl.java:159)
    at com.liferay.document.library.internal.search.spi.model.index.contributor.DLFileEntryModelDocumentContributor.contribute(DLFileEntryModelDocumentContributor.java:114)

[ommited]

    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOException: Broken pipe
    at java.base/java.io.FileOutputStream.writeBytes(Native Method)
    at java.base/java.io.FileOutputStream.write(FileOutputStream.java:354)
    at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
    at java.base/java.io.BufferedOutputStream.write(BufferedOutputStream.java:127)
    at java.base/java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1873)
    at java.base/java.io.ObjectOutputStream$BlockDataOutputStream.write(ObjectOutputStream.java:1844)
    at java.base/java.io.ObjectOutputStream.write(ObjectOutputStream.java:708)
    at java.base/java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1873)
    at java.base/java.io.ObjectOutputStream$BlockDataOutputStream.writeByte(ObjectOutputStream.java:1911)
    at java.base/java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1572)
    at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
    at com.liferay.petra.process.local.LocalProcessExecutor.execute(LocalProcessExecutor.java:97)

How can I fix this error?

Environment

  • Liferay DXP 7.3

Resolution

  • The text extraction functionality in an external process executes the java process that is available in the system PATH of the Liferay user.
  • The reported error com.liferay.petra.process.ProcessException: java.io.IOException: Broken pipe can be produced if the java binary that is available in the system PATH is not the same as the java binary used by the application server.
  • To check this:
    1. Open a shell session using the same system user used to execute the application server
    2. Execute which java to locate the available java binary in the PATH environment (use where java in Windows environments)
    3. Execute ps -ef | grep java to get the java binary path used by the application server (use Task Manager in Windows)
    4. Check that both java binary paths are the same.
  • If they don't match, to fix it, change the system PATH configuration in order to point to the same java binary as the one of the application server or change the configuration to the application server if it is using the wrong java binary

 

 

 

Did this article resolve your issue ?

Legacy Knowledge Base