Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Wkhtmltopdf failed (error code: -11)

By
Lucas Huber
on 2/9/15, 5:22 AM 5,700 views

When I try to generate a PDF from a quotation or something else the following error messge appears:

Report (PDF)
Wkhtmltopdf failed (error code: -11). Message

/var/log/syslog:

Feb  9 10:50:01 SRV02 kernel: [2175649.190455] wkhtmltopdf[35674]: segfault at bbadbeef ip 00000000004f3449 sp 00007fff9c574870 error  6 in wkhtmltopdf[400000+2274000]

I having an Ubuntu 14.4 Server, Wkhtmltopdf was installed as follows:

sudo wget http://downloads.sourceforge.net/project/wkhtmltopdf/archive/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb

sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin

Am I the only one having this issue?

@Lucas removed my answer as I looked wrong. My apologies! Do you get this error on every report? Did you modify the report code or is it still the same as from the source?

Yenthe
on 2/9/15, 5:49 AM

yep it is on every report.

Lucas Huber
on 2/9/15, 7:06 AM

You test your wkhtmltopdf from linux command line

zbik
on 2/9/15, 7:54 AM

@Lucas, 1.st - you should test if wkhtmltopdf wkhtmltopdf works. From bash you should issuue *wkhtmltopdf --help* 2.nd - If wkhrmltopdf works you should look at your report, because may be it has wrong data inside. Try to repeat commnda n odoo log with bash and see in /tmp what is created Hope this help Antonio

Antonio M. Vigliotti
on 2/9/15, 10:31 AM

Do you have selinux installed?

Shaun Haddrill
on 11/17/15, 5:59 PM
1
Lucas Huber
On 2/9/15, 11:58 AM

The solution in my question was relatively simple.

Because normally odoo is started from the root user, so the environment variable from the odoo user are not active. The  environment variables are coming from the process, eg are normally stated in the /etc/init.d/odoo-server startup file.

This variable should solve the problem:  Please ad or correct in the startup script.

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin 
0
Ivan Yelizariev
On 3/5/16, 5:02 AM

The solution is to increase value for limit_memory_hard parameter in odoo config file

 

0
Shaun Haddrill
On 11/17/15, 5:58 PM

In my case it was selinux getting in the way, have you checked your /etc/log/audit/audit.log?

0
Dhaval Patel
On 11/4/15, 2:25 AM

Hi

I am getting same issues to my vm (Debian 7.0). When I restart server it works well but after sometime I get it again. I dont know how to fix it.

Can anybody help me ?

0
zahid
On 9/15/15, 10:19 AM

Hi i had the same probleme, i solved it by installing wkhtmtopdf compiled with patched Qt libs. You can download it here

http://download.gna.org/wkhtmltopdf/0.12/0.12.2/

0

@Lucas,

It happened also to me after some change of document header. Combination of header.html + body.html + footer.html goes in crash.

Be patient, restore original file html and do 1 change per time, until you'll discover what is wrong.

Be patient, very patient

Antonio

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 2/9/15, 5:22 AM
Seen: 5700 times
Last updated: 3/5/16, 5:02 AM