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

opendistro 1.12 CSV PDF generating reports issue #262

Closed
jsdevalx opened this issue Dec 17, 2020 · 4 comments
Closed

opendistro 1.12 CSV PDF generating reports issue #262

jsdevalx opened this issue Dec 17, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@jsdevalx
Copy link

jsdevalx commented Dec 17, 2020

Updated/Reinstalled Open Distro for Elastic 1.12.0. I have checked reporting feature. There are some problems. Please take a look.

systemctl stop kibana.service
yum remove opendistroforelasticsearch-kibana
rm -rf /usr/share/kibana/*
yum install opendistroforelasticsearch-kibana
Running transaction
  Installing : opendistroforelasticsearch-kibana-1.12.0-1.x86_64                                                                                                                                                                                                                                                      1/1
chown: cannot access ‘/usr/share/kibana/optimize’: No such file or directory
.
.
.
but the rest was fine... I have ignored it.

CSV - Report from Saved Search:

Dec 17 08:41:02 HOSTNAME kibana[11535]: {"type":"log","@timestamp":"2020-12-17T07:41:02Z","tags":["error","plugins","opendistroReportsKibana"],"pid":11535,"message":"Failed to generate report by id: TypeError: Cannot read property 'settings' of undefined"}
Dec 17 08:41:02 HOSTNAME kibana[11535]: {"type":"log","@timestamp":"2020-12-17T07:41:02Z","tags":["error","plugins","opendistroReportsKibana"],"pid":11535,"message":"TypeError: Cannot read property 'settings' of undefined\n    at getMaxResultSize (/usr/share/kibana/plugins/opendistroReportsKibana/server/routes/utils/savedSearchReportHelper.ts:163:35)\n    at process._tickCallback (internal/process/next_tick.js:68:7)"}
Dec 17 08:41:02 HOSTNAME kibana[11535]: {"type":"error","@timestamp":"2020-12-17T07:41:02Z","tags":[],"pid":11535,"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=Europe%2FWarsaw","query":{"timezone":"Europe/Warsaw"},"pathname":"/api/reporting/generateReport/ttLKa3YByb0KYNfZpGgH","path":"/api/reporting/generateReport/ttLKa3YByb0KYNfZpGgH?timezone=Europe%2FWarsaw","href":"/api/reporting/generateReport/ttLKa3YByb0KYNfZpGgH?timezone=Europe%2FWarsaw"},"message":"Internal Server Error"}

CSV - It is still unsolved for me anyhow.

PDF - Report from Dashboard:

Dec 17 09:38:08 HOSTNAME kibana[14899]: {"type":"log","@timestamp":"2020-12-17T08:38:08Z","tags":["info","plugins","opendistroReportsKibana"],"pid":14899,"message":"domain enables security, use session cookie to access"}
Dec 17 09:38:08 HOSTNAME kibana[14899]: {"type":"log","@timestamp":"2020-12-17T08:38:08Z","tags":["info","plugins","opendistroReportsKibana"],"pid":14899,"message":"original queryUrl http://localhost:5601/app/dashboards#/view/c147f9c0-33bc-11eb-b060-cf5517a9d5c7?_g=(time:(from:'2020-12-17T07:17:27.635Z',to:'2020-12-17T07:47:27.635Z'))"}
Dec 17 09:38:09 HOSTNAME kibana[14899]: {"type":"log","@timestamp":"2020-12-17T08:38:09Z","tags":["error","plugins","opendistroReportsKibana"],"pid":14899,"message":"Failed to generate report by id: Error: net::ERR_CONNECTION_REFUSED at http://localhost:5601/app/dashboards#/view/c147f9c0-33bc-11eb-b060-cf5517a9d5c7?_g=(time:(from:'2020-12-17T07:17:27.635Z',to:'2020-12-17T07:47:27.635Z'))"}
Dec 17 09:38:09 HOSTNAME kibana[14899]: {"type":"log","@timestamp":"2020-12-17T08:38:09Z","tags":["error","plugins","opendistroReportsKibana"],"pid":14899,"message":"Error: net::ERR_CONNECTION_REFUSED at http://localhost:5601/app/dashboards#/view/c147f9c0-33bc-11eb-b060-cf5517a9d5c7?_g=(time:(from:'2020-12-17T07:17:27.635Z',to:'2020-12-17T07:47:27.635Z'))\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)"}
Dec 17 09:38:09 HOSTNAME kibana[14899]: {"type":"error","@timestamp":"2020-12-17T08:38:08Z","tags":[],"pid":14899,"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=Europe%2FWarsaw","query":{"timezone":"Europe/Warsaw"},"pathname":"/api/reporting/generateReport/utKrb3YByb0KYNfZBWgo","path":"/api/reporting/generateReport/utKrb3YByb0KYNfZBWgo?timezone=Europe%2FWarsaw","href":"/api/reporting/generateReport/utKrb3YByb0KYNfZBWgo?timezone=Europe%2FWarsaw"},"message":"Internal Server Error"}

OK. So i have found a solution for PDF here: #259
I had to disable SSL and connect directly to kibana via http by 5601 port. Then it works. Disable ssl or connect directly to kibana is not a good solution for me. Am I able to run it somehow with SSL?

elasticsearch.hosts: https://localhost:9200
elasticsearch.ssl.verificationMode: none
#server.ssl.enabled: true
#server.ssl.key: /etc/kibana/certs/privatedomain.key
#server.ssl.certificate: /etc/kibana/certs/privatedomain.pem
elasticsearch.username: kibanaserver
elasticsearch.password: XYZ
elasticsearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
opendistro_security.multitenancy.enabled: true
opendistro_security.multitenancy.tenants.preferred: ["Private", "Global"]
opendistro_security.readonly_mode.roles: ["kibana_read_only"]
newsfeed.enabled: false
telemetry.optIn: false
telemetry.enabled: false
server.host: "0.0.0.0"
server.port: 5601
@alexz00
Copy link

alexz00 commented Dec 17, 2020

I'm experiencing the same issue. The Reporting does not work if ODFE security and Kibana SSL are enabled.

The problem is that the Reporting plugin tries to reach the Kibana HTTP endpoint instead than the HTTPS one:

Failed to generate report by id: Error: net::ERR_CONNECTION_REFUSED at http://localhost:5601/app/dashboards#/view/0d4b00f0-1a05-11eb-8f66-4d4217f91a88?_g=(time:(from:'2019-12-31T23:00:11.807Z',to:'2020-12-17T14:56:49.644Z'))

@remioo
Copy link

remioo commented Dec 18, 2020

Experiencing the same issue with the reporting trying to connect in http instead of https
{"type":"log","@timestamp":"2020-12-18T01:25:48Z","tags":["error","plugins","opendistroReportsKibana"],"pid":1,"message":"Error: net::ERR_EMPTY_RESPONSE at http://localhost:5601/app/visualize#/edit/2174bbc0-9671-11e9-8f6b-d1950b9b94c0?_g=(time:(from:'2020-12-18T00:55:45.463Z',to:'2020-12-18T01:25:45.463Z'))\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. (/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)"}

@zhongnansu
Copy link
Member

this is related to #98 , we'll deliver a fix soon

@zhongnansu
Copy link
Member

#98 is fixed

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

5 participants