Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Unable to generate PNG or PDF reports #256

Closed
e100 opened this issue Dec 16, 2020 · 4 comments
Closed

Unable to generate PNG or PDF reports #256

e100 opened this issue Dec 16, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@e100
Copy link

e100 commented Dec 16, 2020

When trying to download a PDF or PNG report I get the message "Error downloading report"

Error logs from kibana:
{"type":"log","@timestamp":"2020-12-16T14:38:25Z","tags":["info","plugins","opendistroReportsKibana"],"pid":1,"message":"original queryUrl http://localhost:5601/app/visualize#/edit/cb329ba0-5e44-11ea-adc1-b1908ab22df5?_g=(time:(from:'2020-12-15T17:22:46.415Z',to:'2020-12-15T17:52:46.415Z'))"} {"type":"log","@timestamp":"2020-12-16T14:38:25Z","tags":["error","plugins","opendistroReportsKibana"],"pid":1,"message":"Failed to generate report by id: Error: net::ERR_EMPTY_RESPONSE at http://localhost:5601/app/visualize#/edit/cb329ba0-5e44-11ea-adc1-b1908ab22df5?_g=(time:(from:'2020-12-15T17:22:46.415Z',to:'2020-12-15T17:52:46.415Z'))" {"type":"log","@timestamp":"2020-12-16T14:38:25Z","tags":["error","plugins","opendistroReportsKibana"],"pid":1,"message":"Error: net::ERR_EMPTY_RESPONSE at http://localhost:5601/app/visualize#/edit/cb329ba0-5e44-11ea-adc1-b1908ab22df5?_g=(time:(from:'2020-12-15T17:22:46.415Z',to:'2020-12-15T17:52:46.415Z'))\n at navigate (/usr/share/kibana/plugins/opendistroReportsKibana/node_modules/puppeteer-core/lib/FrameManager.js:120:37)\n at process._tickCallback (internal/process/next_tick.js:68:7)\n -- ASYNC --\n at Frame.<anonymous> (/usr/share/kibana/plugins/opendistroReportsKibana/node_modules/puppeteer-core/lib/helper.js:111:15)\n at Page.goto (/usr/share/kibana/plugins/opendistroReportsKibana/node_modules/puppeteer-core/lib/Page.js:674:49)\n at Page.goto (/usr/share/kibana/plugins/opendistroReportsKibana/node_modules/puppeteer-core/lib/helper.js:112:23)\n at createVisualReport (/usr/share/kibana/plugins/opendistroReportsKibana/server/routes/utils/visual_report/visualReportHelper.ts:83:14)\n at process._tickCallback (internal/process/next_tick.js:68:7)"} {"type":"error","@timestamp":"2020-12-16T14:38:25Z","tags":[],"pid":1,"level":"error","error":{"message":"Internal Server Error","name":"Error","stack":"Error: Internal Server Error\n at HapiResponseAdapter.toError (/usr/share/kibana/src/core/server/http/router/response_adapter.js:132:19)\n at HapiResponseAdapter.toHapiResponse (/usr/share/kibana/src/core/server/http/router/response_adapter.js:86:19)\n at HapiResponseAdapter.handle (/usr/share/kibana/src/core/server/http/router/response_adapter.js:81:17)\n at Router.handle (/usr/share/kibana/src/core/server/http/router/router.js:164:34)\n at process._tickCallback (internal/process/next_tick.js:68:7)"},"url":{"protocol":null,"slashes":null,"auth":null,"host":null,"port":null,"hostname":null,"hash":null,"search":"?timezone=America%2FNew_York","query":{"timezone":"America/New_York"},"pathname":"/api/reporting/generateReport/Xn2IZ3YBeSonxmmUeyVR","path":"/api/reporting/generateReport/Xn2IZ3YBeSonxmmUeyVR?timezone=America%2FNew_York","href":"/api/reporting/generateReport/Xn2IZ3YBeSonxmmUeyVR?timezone=America%2FNew_York"},"message":"Internal Server Error"} {"type":"response","@timestamp":"2020-12-16T14:38:25Z","tags":[],"pid":1,"method":"get","statusCode":500,"req":{"url":"/api/reporting/generateReport/Xn2IZ3YBeSonxmmUeyVR?timezone=America%2FNew_York","method":"get","headers":{"host":"example.com","x-request-id":"91d37f92810f3839ef857a7ca04fdbcd","x-real-ip":"1.1.1.1","x-forwarded-for":"1.1.1.1","x-forwarded-host":"example.com","x-forwarded-port":"443","x-forwarded-proto":"https","x-original-uri":"/api/reporting/generateReport/Xn2IZ3YBeSonxmmUeyVR?timezone=America%2FNew_York","x-scheme":"https","kbn-version":"7.10.0","user-agent":"","content-type":"application/json","accept":"*/*","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","sec-fetch-dest":"empty","referer":"https://example.com/app/opendistro_kibana_reports","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9"},"remoteAddress":"1.1.1.1","userAgent":"","referer":"https://example.com/app/opendistro_kibana_reports"},"res":{"statusCode":500,"responseTime":458,"contentLength":9},"message":"GET /api/reporting/generateReport/Xn2IZ3YBeSonxmmUeyVR?timezone=America%2FNew_York 500 458ms - 9.0B"}

I have kibana setup to listen using TLS, connecting to it as http would result in an ERR_EMPTY_RESPONSE exception.

Perhaps the hard coded LOCAL_HOST constant is the source of the problem?
https://github.com/opendistro-for-elasticsearch/kibana-reports/blob/master/kibana-reports/server/routes/utils/constants.ts#L75

@zhongnansu
Copy link
Member

Please refer to this #259 (comment)

@zhongnansu zhongnansu added the bug Something isn't working label Dec 18, 2020
@zhongnansu
Copy link
Member

tracking similar issues here #98

@dhruvildoshi
Copy link

Getting the same error.
Is there any workaround that can be implemented untill next update

@zhongnansu
Copy link
Member

close this one, since we are tracking this issue on #98 and a fix is delivered

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants