Page 1 of 1

Cannot preview JPGs

PostPosted:Fri Apr 12, 2019 7:20 pm
by Secco
Hello,

I can preview PDFs and DOCs just fine but when I want to preview a JPG file it shows a page saying "There was a problem with the conversion generation. Please, contact your OpenKM administrator."

I am running the docker version of openkm CE 6.3.7 on an Ubuntu 18.04 system.

ImageMagick is installed and system.imagemagick.convert is set to /usr/bin/convert

I don't think catalina.log contains any useful information apart from maybe this one:
Code: Select all
12-Apr-2019 13:57:52.931 WARNING [http-nio-0.0.0.0-8080-exec-7] net.xeoh.plugins.base.impl.classpath.loader.FileLoader.loadFrom Supplied path does not exist. Unable to add plugins from there.
However, in openkm.log there are several instances where the following message pops up:
Code: Select all
2019-04-12 13:42:55,556 [http-nio-0.0.0.0-8080-exec-10] [] WARN com.openkm.util.ExecutionUtils - Abnormal program termination: 1
 2019-04-12 13:42:55,556 [http-nio-0.0.0.0-8080-exec-10] [] WARN com.openkm.util.ExecutionUtils - CommandLine: [/usr/bin/convert, /opt/openkm/temp/okm2991825342771400261.jpg, /opt/openkm/repository/cache/pdf/a214fa23-5e19-4fc7-8bdd-6ce28fe49918.pdf]
2019-04-12 13:42:55,556 [http-nio-0.0.0.0-8080-exec-10] [] WARN com.openkm.util.ExecutionUtils - STDERR: convert: not authorized `/opt/openkm/repository/cache/pdf/a214fa23-5e19-4fc7-8bdd-6ce28fe49918.pdf' @ error/constitute.c/WriteImage/1037.
2019-04-12 13:42:55,572 [http-nio-0.0.0.0-8080-exec-10] [] ERROR c.o.s.frontend.ConverterServlet - convert: not authorized `/opt/openkm/repository/cache/pdf/a214fa23-5e19-4fc7-8bdd-6ce28fe49918.pdf' @ error/constitute.c/WriteImage/1037.
com.openkm.core.ConversionException: convert: not authorized `/opt/openkm/repository/cache/pdf/a214fa23-5e19-4fc7-8bdd-6ce28fe49918.pdf' @ error/constitute.c/WriteImage/1037.
at com.openkm.util.DocConverter.img2pdf(DocConverter.java:497) ~[classes/:6.3.7] 
What's wrong here?

Re: Cannot preview JPGs

PostPosted:Sat Apr 13, 2019 8:52 am
by jllort
The issue is caused by Imagemagick update, take a look here https://docs.openkm.com/kcenter/view/ok ... ge412.html

Re: Cannot preview JPGs

PostPosted:Sat Apr 13, 2019 5:33 pm
by Secco
I already tried that but nothing has changed.

Re: Cannot preview JPGs

PostPosted:Wed Apr 17, 2019 5:54 am
by jllort
Share with us your policy.xml described in the documentation.