1

I am using wkhtmltopdf (wkhtmltopdf 0.11.0 rc1) for generating pdf using x-server (xvfb).

It was working for days but suddenly started showing “cannot connect to X server :99” error on one of our server.

ubuntu@servername:~$ xvfb-run --server-args="-screen 0, 1024x680x24" wkhtmltopdf  --use-xserver http://www.google.com google.pdf
wkhtmltopdf: cannot connect to X server :99

But the same setup is working fine on three other servers.

I am not sure what went wrong on that server.

Gogowitsch
  • 1,181
  • 1
  • 11
  • 32
Hemant Thorat
  • 2,386
  • 20
  • 14
  • Do you have a file `/tmp/.X99-lock`? Try deleting it. I didn't add as answer because this is guessing based on https://github.com/johnbintz/jasmine-headless-webkit/issues/34 – Joel Peltonen Feb 28 '14 at 11:21
  • Problem solved.. Xvfb process was already running , so killed process and now it is working. ubuntu 29517 0.0 0.0 57576 1180 ? S Feb17 0:00 Xvfb :99 -screen 0, 1024x680x24 -nolisten tcp – Hemant Thorat Mar 12 '14 at 13:24
  • Ach, good to know. If someone else has this problem they might solve it with that comment :) You can answer your own question too! – Joel Peltonen Mar 13 '14 at 07:38

1 Answers1

2

Problem solved.. Xvfb process was already running , By killed process, it is started working again.

ubuntu 29517 0.0 0.0 57576 1180 ? S Feb17 0:00 Xvfb :99 -screen 0, 1024x680x24 -nolisten tcp

also try to delete "/tmp/.tX99-lock",

#rm /tmp/.tX99-lock

Hemant Thorat
  • 2,386
  • 20
  • 14