I've installed the pdf_server app on my server, but firefox fails to generate the PDF. I have installed all prerequisites listed in the docs.
Errors in python.log:
root@splunkpdfserver:/opt/splunk/etc# uname -a
Linux splunkpdfserver 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux
root@splunkpdfserver:/opt/splunk/etc# tail -25 ../var/log/splunk/python.log
2010-08-04 16:15:24,053 WARNING pdfhandler:340 - body=Splunk;4.1.4;4.1.4
2010-08-04 16:15:24,053 WARNING body=Splunk;4.1.4;4.1.4
2010-08-04 16:15:24,054 WARNING pdfhandler:341 - entries=['Splunk', '4.1.4', '4.1.4']
2010-08-04 16:15:24,054 WARNING entries=['Splunk', '4.1.4', '4.1.4']
2010-08-04 16:15:24,058 INFO xvfb:45 - Started new X server. Now 1 active
2010-08-04 16:15:24,058 INFO Started new X server. Now 1 active
2010-08-04 16:15:24,061 INFO xvfb:205 - Assigned DISPLAY :5
2010-08-04 16:15:24,061 INFO Assigned DISPLAY :5
2010-08-04 16:15:24,061 INFO xvfb:115 - Starting X Server: ['/usr/bin/Xvfb', ':5', '-screen', '0', '3000x768x24', '-nolisten', 'tcp']
2010-08-04 16:15:24,061 INFO Starting X Server: ['/usr/bin/Xvfb', ':5', '-screen', '0', '3000x768x24', '-nolisten', 'tcp']
2010-08-04 16:15:24,061 INFO xvfb:116 - Starting X Server env: {'XAUTHORITY': '/opt/splunk/var/run/splunk/xvfb/xauth-5/Xauthority'}
2010-08-04 16:15:24,061 INFO Starting X Server env: {'XAUTHORITY': '/opt/splunk/var/run/splunk/xvfb/xauth-5/Xauthority'}
2010-08-04 16:15:26,064 INFO xvfb:122 - X Started
2010-08-04 16:15:26,064 INFO X Started
2010-08-04 16:15:26,152 ERROR pdfhandler:308 - Execution of Firefox to create profile under x86_64 failed
2010-08-04 16:15:26,152 ERROR Execution of Firefox to create profile under x86_64 failed
2010-08-04 16:15:26,174 ERROR pdfhandler:308 - Execution of Firefox to create profile under i386 failed
2010-08-04 16:15:26,174 ERROR Execution of Firefox to create profile under i386 failed
2010-08-04 16:15:26,175 ERROR pdfhandler:423 - Failed to start any version of Firefox
2010-08-04 16:15:26,175 ERROR Failed to start any version of Firefox
2010-08-04 16:15:26,175 ERROR pdfhandler:637 - (500) Failed to generate a report using Firefox: Failed to start: Check that all Firefox dependencies are met
2010-08-04 16:15:26,175 ERROR (500) Failed to generate a report using Firefox: Failed to start: Check that all Firefox dependencies are met
2010-08-04 16:15:26,175 WARNING xvfb:132 - Stopping X Server 5
2010-08-04 16:15:26,175 WARNING Stopping X Server 5
2010-08-04 16:15:26,192 ERROR An error occurred while generating a PDF of this report: Failed to generate PDF: PDF server at /services/pdfserver/renderpdf returned error: Failed to generate a report using Firefox: Failed to start: Check that all Firefox dependencies are met
As per http://answers.splunk.com/questions/1218/why-does-pdf-server-fail-with-the-message-error-pdfhandler4... I have tried running the binary and I am getting the result suggested by gareth's answer...but still no PDFs.
root@splunkpdfserver:/opt/splunk/etc# sudo -H -u splunk DISPLAY=none /opt/splunk/etc/apps/pdfserver/bin/firefox-x86_64/firefox
Error: cannot open display: none
Does anybody have any suggestion on how to get the pdf_server working?
[edit:] @gareth, running Ubuntu 10.04 LTS amd64. http://ubuntu.media.mit.edu/ubuntu-releases/10.04/ubuntu-10.04-server-amd64.iso. Thanks!
Figured this out. If you are running Ubuntu Server edition you will need to install the following packages in addition to xvfb and xauth:
fontconfig
libxrender1
libxcursor1
libxinerama1
Use this command:
apt-get install xvfb xauth fontconfig libxrender1 libxcursor1 libxinerama1
In Splunk 4.3.4 on Ubuntu server 11.4 you can fix the problem installing the libxcursor1 packet, it contains the libXcursor.so.1 library needed to execute the pdf generator.
Figured this out. If you are running Ubuntu Server edition you will need to install the following packages in addition to xvfb and xauth:
fontconfig
libxrender1
libxcursor1
libxinerama1
Use this command:
apt-get install xvfb xauth fontconfig libxrender1 libxcursor1 libxinerama1
@gareth hmm, I had specific errors logged about it. I'll look into it when i'm back from the user conf and update the answer if needed. Thanks for checking this out!
Thanks for the update - I've modified the docs accordingly - libxcursor1 shouldn't be required though (at least, it wasn't during my tests)
I haven't seen it fail at this point before - Which version of Ubuntu are you running exactly? I''ll try and reproduce it here