All Apps and Add-ons

Smart PDF Exporter - Failed to capture the page within the allocated time

o_calmels
Communicator

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.

0 Karma

DavidHourani
Super Champion

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

0 Karma

o_calmels
Communicator

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.

0 Karma

o_calmels
Communicator

I give up this app, and addapt my dashboard.

0 Karma

jadengoho
Builder

Do you use other application ?

0 Karma

DavidHourani
Super Champion

Awesome ! Let me know if you found the solution and please accept my answer if it helped 🙂

0 Karma
Get Updates on the Splunk Community!

Accelerate Service Onboarding, Decomposition, Troubleshooting - and more with ITSI’s ...

Accelerate Service Onboarding, Decomposition, Troubleshooting - and more! Faster Time to ValueManaging and ...

New Release | Splunk Enterprise 9.3

Hi Splunky people! We are excited to share the newest updates in Splunk Enterprise 9.3!Admins and Analyst can ...

2024 Splunk Career Impact Survey | Earn a $20 gift card for participating!

Hear ye, hear ye! The time has come again for Splunk's annual Career Impact Survey!  We need your help by ...