All Apps and Add-ons

Report Capture app for Splunk: Exception capturing page: Output file missing post-capture (incorrect http/https setting?)

SplunkTrust
SplunkTrust

Hi there,

I'm trying to get this app https://splunkbase.splunk.com/app/4132/ version 0.8.6 working.

After starting the app and selecting a report to capture:

alt text
I get the following error message:

Oops, something went wrong!


The following error-messages were found: 
Failed to create report-capture:
Exception capturing page:
Output file missing post-capture (incorrect http/https setting?)

here are the current local/repcap.conf settings:

[repcap]
# Logging level (info/warn/error/debug)
# Note: Unless really required, leave at debug
loglevel = debug

# Connection protocol (http or https)
# Note: This should match your Splunk server mode, or expect failures
conn_proto = https
conn_host = <myServerIPHere>
rest_scripted_enabled = true

This is the log file while trying the capture:

2019-04-09 13:45:36,262 DEBUG Incoming UI capture request from michael.uschmann
2019-04-09 13:45:36,357 DEBUG Parsing REST parameters
2019-04-09 13:45:36,358 DEBUG Adding the following to the request options: d_method: email
2019-04-09 13:45:36,358 DEBUG Adding the following to the request options: c_wait: 60
2019-04-09 13:45:36,358 DEBUG Adding the following to the request options: c_url: /app/repcap/report?s=XXX - Monthly Graphs - License
2019-04-09 13:45:36,358 DEBUG Adding the following to the request options: e_to: michael.uschmann@xxx.xxx
2019-04-09 13:45:36,358 DEBUG Adding the following to the request options: p_size: A4
2019-04-09 13:45:36,358 DEBUG Adding the following to the request options: c_user: smart-pdf
2019-04-09 13:45:36,359 DEBUG Adding the following to the request options: p_orient: portrait
2019-04-09 13:45:36,359 DEBUG Adding the following to the request options: f_type: png
2019-04-09 13:45:36,359 DEBUG Adding the following to the request options: f_name: XXX - Monthly Graphs - License
2019-04-09 13:45:36,359 DEBUG Validating parameters
2019-04-09 13:45:36,360 DEBUG End of validation steps
2019-04-09 13:45:36,361 DEBUG Parameters validated
2019-04-09 13:45:36,361 DEBUG Determining output screen-size
2019-04-09 13:45:36,361 DEBUG Determing output email-addresses
2019-04-09 13:45:36,361 DEBUG Retrieving user credentials
2019-04-09 13:45:36,371 DEBUG Generating output filenames
2019-04-09 13:45:36,372 DEBUG Creating temporary folder: /opt/splunk/etc/apps/repcap/temp/1554774336.37-7016-michael.uschmann
2019-04-09 13:45:36,372 DEBUG Request options begin
2019-04-09 13:45:36,372 DEBUG REST:      c_panel: None
2019-04-09 13:45:36,372 DEBUG REST:        c_url: https://IP:8000/app/repcap/report?s=XXX - Monthly Graphs - License
2019-04-09 13:45:36,373 DEBUG REST:       c_user: smart-pdf
2019-04-09 13:45:36,373 DEBUG REST:       c_wait: 60
2019-04-09 13:45:36,373 DEBUG REST:     d_method: email
2019-04-09 13:45:36,373 DEBUG REST:         e_to: michael.uschmann@xxx.xxx
2019-04-09 13:45:36,373 DEBUG REST:       f_name: XXX- Monthly Graphs - License
2019-04-09 13:45:36,373 DEBUG REST:       f_type: png
2019-04-09 13:45:36,373 DEBUG REST:     p_orient: portrait
2019-04-09 13:45:36,373 DEBUG REST:       p_size: A4
2019-04-09 13:45:36,373 DEBUG REST:      s_hidpi: True
2019-04-09 13:45:36,373 DEBUG REST:       s_zoom: 1.0
2019-04-09 13:45:36,374 DEBUG Task: capture_user: smart-pdf
2019-04-09 13:45:36,374 DEBUG Task:   email_to: ['michael.uschmann@xxx.xxx']
2019-04-09 13:45:36,374 DEBUG Task: output_img: /opt/splunk/etc/apps/repcap/temp/1554774336.37-7016-michael.uschmann/XXX - Monthly Graphs - License.png
2019-04-09 13:45:36,374 DEBUG Task: output_pdf: /opt/splunk/etc/apps/repcap/temp/1554774336.37-7016-michael.uschmann/XXX - Monthly Graphs - License.pdf
2019-04-09 13:45:36,374 DEBUG Task: screen_height: 1754
2019-04-09 13:45:36,374 DEBUG Task: screen_width: 1240
2019-04-09 13:45:36,374 DEBUG Capturing page
2019-04-09 13:45:36,375 DEBUG Executing command: ['/opt/casperjs/bin/casperjs', '--ignore-ssl-errors=true', '/opt/splunk/etc/apps/repcap/static/screenshot.js', '-url', 'https://IP:8000/app/repcap/report?s=XXX - Monthly Graphs - License', '-file', '/opt/splunk/etc/apps/repcap/temp/1554774336.37-7016-michael.uschmann/XXX_-_Monthly_Graphs_-_License.png', '-screen_height', '1754', '-screen_width', '1240', '-screen_hidpi', 'True', '-screen_zoom', '1.0', '-wait', '60', '-username', 'smart-pdf', '-password', '********']
2019-04-09 13:46:41,493 DEBUG Command Output:
[debug] [phantom] Setting default options
[debug] [phantom] Parsing CLI arguments
[debug] [phantom] Checking required options are present and valid
[debug] [phantom] Settings Begin
[debug] [phantom] - file: /opt/splunk/etc/apps/repcap/temp/1554774336.37-7016-michael.uschmann/XXX_-_Monthly_Graphs_-_License.png
[debug] [phantom] - password: ********
[debug] [phantom] - screen_height: 1754
[debug] [phantom] - screen_hidpi: true
[debug] [phantom] - screen_width: 1240
[debug] [phantom] - screen_zoom: 1
[debug] [phantom] - url: https://IP:8000/app/repcap/report?s=XXX - Monthly Graphs - License
[debug] [phantom] - username: smart-pdf
[debug] [phantom] - wait: 60
[debug] [phantom] Settings End
[debug] [phantom] Creating Casper object
[debug] [phantom] Performing Splunk authentication
[info] [phantom] Starting...
[debug] [phantom] Configuring pixel-ratio (HiDPI)
[debug] [phantom] Preparing capture job
[debug] [phantom] Beginning capture job
[info] [phantom] Running suite: 3 steps
[debug] [phantom] opening url: https://IP:8000/app/repcap/report?s=XXX%20-%20Monthly%20Graphs%20-%20License, HTTP GET
[debug] [phantom] Navigation requested: url=https://IP:8000/app/repcap/report?s=XXX - Monthly Graphs - License, type=Other, willNavigate=true, isMainFrame=true
[warning] [phantom] Loading resource failed with status=fail: https://IP:8000/app/repcap/report?s=XXX - Monthly Graphs - License
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step anonymous 2/3: done in 116ms.
[info] [phantom] Step _step 3/4: done in 136ms.
[warning] [phantom] Casper.waitFor() timeout
[error] [phantom] Wait timeout of 60000ms expired, exiting.
Wait timeout of 60000ms expired, exiting.
Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///opt/casperjs/bin/bootstrap.js. Domains, protocols and ports must match.

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///opt/casperjs/bin/bootstrap.js. Domains, protocols and ports must match.

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///opt/casperjs/bin/bootstrap.js. Domains, protocols and ports must match.


2019-04-09 13:46:41,494 ERROR Output file missing post-capture (incorrect http/https setting?)
2019-04-09 13:46:41,494 ERROR Exception capturing page: Output file missing post-capture (incorrect http/https setting?)
2019-04-09 13:46:41,494 ERROR Failed to create report-capture: Exception capturing page: Output file missing post-capture (incorrect http/https setting?)

I can see that it tell me the resource failed to load:

[debug] [phantom] Navigation requested: url=https://IP:8000/app/repcap/report?s=XXX - Monthly Graphs - License, type=Other, willNavigate=true, isMainFrame=true
[warning] [phantom] Loading resource failed with status=fail: https://IP:8000/app/repcap/report?s=XXX - Monthly Graphs - License

But the server is on https, running on port 8000, the report exists, and is readable for the user smart-pdf.

Any idea what could be the problem here?

Thanks, MuS

0 Karma

Path Finder

Hi MuS,

I think the issue for you may be that the connection host setting should be 127.0.0.1, not the externally accessible IP of the server.

However I still get issues with this application missing panels and generally not working very well with pdfs. I am curious if you had made any progress on your take on this concept? I would love to beta test anything you've been developing as this functionality has become a growing need in our organization. I'm curious if you could share anything at this time. Thanks for your consideration!

0 Karma

Mus,

did you find the solution?

0 Karma

SplunkTrust
SplunkTrust

Nope,

I'm working on another app that will achieve the same, so watch this space 😉

cheers, MuS

0 Karma

New Member

Hello,

Could you tell me please what is the name of this other app ?

Thanks 🙂

 

0 Karma

thanks a lot!

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!