Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-28928

Disable thumbnail conversion on explorer distribution persistence

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 11.1, 2021.0
    • Component/s: Explorer

      Description

      Steps to reproduce: go to the admin explorer view at http://localhost:8080/nuxeo/site/distribution/_admin and save the current snapshot distribution.

      A "persisted" distribution is created, but thumbnail conversion keeps on running for a while, with the following errors when GhostScript is misconfigured:

      Caused by: org.nuxeo.ecm.platform.commandline.executor.api.CommandException: Error code 1 return by command: convert -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -strip -thumbnail #{size} -background transparent -gravity center -format png -quality 75 #{inputFilePath}[0] #{outputFilePath}
      convert-im6.q16: not authorized `/opt/nuxeo-server-tomcat-11.1-SNAPSHOT/tmp/7006666692955549846/nxblob-4095060400953475755.pdf' @ error/constitute.c/ReadImage/412.
        convert-im6.q16: no images defined `/opt/nuxeo-server-tomcat-11.1-SNAPSHOT/tmp/nxblob-2645536541031002390.png' @ error/convert.c/ConvertImageCommand/3258.
      	at org.nuxeo.ecm.platform.commandline.executor.api.ExecResult.<init>(ExecResult.java:62) ~[nuxeo-platform-commandline-executor-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.platform.commandline.executor.service.executors.ShellExecutor.exec(ShellExecutor.java:76) ~[nuxeo-platform-commandline-executor-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent.execCommand(CommandLineExecutorComponent.java:173) ~[nuxeo-platform-commandline-executor-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.platform.thumbnail.converter.ThumbnailDocumentConverter.convert(ThumbnailDocumentConverter.java:81) ~[nuxeo-thumbnail-11.1-SNAPSHOT.jar:?]
      	... 17 more
      2020-04-14T17:34:28,451 WARN  [ThumbnailDocumentFactory] Cannot compute document thumbnail
      org.nuxeo.ecm.core.convert.api.ConversionException: Thumbnail conversion failed
      	at org.nuxeo.ecm.platform.thumbnail.converter.ThumbnailDocumentConverter.convert(ThumbnailDocumentConverter.java:88) ~[nuxeo-thumbnail-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.convert.extension.ChainedConverter.convertBasedSubConverters(ChainedConverter.java:89) ~[nuxeo-core-convert-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.convert.extension.ChainedConverter.convert(ChainedConverter.java:73) ~[nuxeo-core-convert-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:339) ~[nuxeo-core-convert-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.platform.thumbnail.converter.AnyToThumbnailConverter.convert(AnyToThumbnailConverter.java:77) ~[nuxeo-thumbnail-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:339) ~[nuxeo-core-convert-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.platform.thumbnail.factories.ThumbnailDocumentFactory.computeThumbnail(ThumbnailDocumentFactory.java:92) [nuxeo-thumbnail-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.api.thumbnail.ThumbnailServiceImpl.computeThumbnail(ThumbnailServiceImpl.java:99) [nuxeo-core-api-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.api.thumbnail.ThumbnailAdapter.computeThumbnail(ThumbnailAdapter.java:58) [nuxeo-core-api-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.platform.thumbnail.listener.UpdateThumbnailListener.processDoc(UpdateThumbnailListener.java:72) [nuxeo-thumbnail-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.platform.thumbnail.listener.UpdateThumbnailListener.handleEvent(UpdateThumbnailListener.java:146) [nuxeo-thumbnail-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:209) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:483) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:373) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
      	at java.lang.Thread.run(Thread.java:834) [?:?]
      

      Besides the PDF conversion issue, the actual ".pdf" files created in the tmp folder are holding XML content (the XML representing the explorer contributions).

      --> fix the problem by disabling thumbnail conversion on persistence.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h