Hi,
I'm trying to export pdf dashboards.
Thank's smartexporter can do this on demand (The export when I click on the button is good).
Splunk is installed on RedHat 7.4
Therefore, when rtying pour add a cron to this export, I got the following error :
2019-05-02 14:31:01,476 INFO temporary js file /tmp/tmpXN7wqi
2019-05-02 14:31:01,493 INFO protocole : https Vs https
2019-05-02 14:31:01,493 INFO ExportPDF for url https://localhost:8000/fr-FR/app/Splunk_For_MyApp/1-Test-SimpleXML-Print
2019-05-02 14:31:01,494 INFO start PhantomJS Process ...
2019-05-02 14:31:01,494 INFO phantomjs bin : /data/phantomjs-2.1.1-linux-x86_64/bin
2019-05-02 14:31:01,494 INFO temp js file : /tmp/tmpXN7wqi
2019-05-02 14:41:02,131 ERROR Failed to capture the page within the allocated time
Traceback (most recent call last):
File "/data/splunk/etc/apps/smart_exporter_app/bin/smartexporter.py", line 150, in handle_POST
self.__die('Failed to capture the page within the allocated time')
File "/data/splunk/etc/apps/smart_exporter_app/bin/smartexporter.py", line 84, in __die
raise RuntimeError(str(fmsg))
RuntimeError: Failed to capture the page within the allocated time
Phantomjs is installed, as well as Fontconfig.
I check actually how to verify if GLIBCXX_3.4.9 AND GLIBC_2.7 are installed.
Have you encountered this problem, have you got any idea ?
Thank's.
Olivier.
Hi @o.calmels,
I went through the smartexporter.py script and this is the section generating your error :
while task.poll() is None and timeout_rem > 0:
time.sleep(1)
timeout_rem -= 1
if timeout_rem < 1:
task.terminate()
self.__die('Failed to capture the page within the allocated time')
It's using a default timeout of 600 seconds timeout_rem = 600
. Could it be that your dashboard is slow to load ? taking more than 600 seconds ? You could try to increase this timeout_rem
parameter to 1200 on line 137 and see if it fixes anything.
Cheers,
David
Hi @DavidHourani, My dashboard is ready within a couple of second (10s max). Ieven tried to enlarge this timer with no result. Thank's.
It seams like phantomjs do not detect the end of page load.
I give up this app, and addapt my dashboard.
Do you use other application ?
Awesome ! Let me know if you found the solution and please accept my answer if it helped 🙂