Reporting plugin not working

Hi,

I’m using:

  • opendistro report plugin v1.12.0.0 (master branch ),
  • on kibana and elasticseach 7.10.0.
  • I’m under “all_access” role.

Plugin doesn’t work::

  • when I choose a visualisation, dash board, search, i have the following message :when create report:
    “one or more fields have an error , please check and try again”.
  • but when I visualize thoses objects there is no problems
    Sometimes when I start report plugin I have : Error generating reprot definition table
    Here are the errors detected in kibana console
    ‘’’
    {“type”:“log”,"@timestamp":“2021-01-27T08:11:19Z”,“tags”:[“warning”,“plugins”,“usageCollection”,“collector-set”],“pid”:1,“message”:"{ Error: [security_exception] no permissions for [indices:data/read/search] and User [name=kibanaserver, backend_roles=, requestedTenant=null]\n at respond (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)\n at checkRespForFailure (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)\n at HttpConnector. (/usr/share/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)\n at IncomingMessage.wrapper (/usr/share/kibana/node_modules/lodash/lodash.js:4949:19)\n at IncomingMessage.emit (events.js:203:15)\n at endReadableNT (_stream_readable.js:1145:12)\n at process._tickCallback (internal/process/next_tick.js:63:19)\n status: 403,\n displayName: ‘AuthorizationException’,\n message:\n ‘[security_exception] no permissions for [indices:data/read/search] and User [name=kibanaserver, backend_roles=, requestedTenant=null]’,\n path: ‘/.monitoring-es-6-%2C.monitoring-es-7-/_search’,\n query:\n { filter_path:\n ‘hits.hits._source.cluster_settings.cluster.metadata.display_name,hits.hits._source.cluster_uuid,hits.hits._source.cluster_name’ },\n body:\n { error:\n { root_cause: [Array],\n type: ‘security_exception’,\n reason:\n ‘no permissions for [indices:data/read/search] and User [name=kibanaserver, backend_roles=, requestedTenant=null]’ },\n status: 403 },\n statusCode: 403,\n response:\n ‘{“error”:{“root_cause”:[{“type”:“security_exception”,“reason”:“no permissions for [indices:data/read/search] and User [name=kibanaserver, backend_roles=, requestedTenant=null]”}],“type”:“security_exception”,“reason”:“no permissions for [indices:data/read/search] and User [name=kibanaserver, backend_roles=, requestedTenant=null]”},“status”:403}’,\n toString: [Function],\n toJSON: [Function] }"}
    ‘’’

And also

{“type”:“log”,"@timestamp":“2021-01-27T08:08:26Z”,“tags”:[“error”,“plugins”,“opendistroReportsKibana”],“pid”:1,“message”:“Failed to get reports details: [illegal_argument_exception] request [/_opendistro/_reports/instances] contains unrecognized parameter: [maxItems] :: {“path”:”/_opendistro/_reports/instances",“query”:{“maxItems”:10000},“statusCode”:400,“response”:"{\“error\”:{\“root_cause\”:[{\“type\”:\“illegal_argument_exception\”,\“reason\”:\“request [/_opendistro/_reports/instances] contains unrecognized parameter: [maxItems]\”}],\“type\”:\“illegal_argument_exception\”,\“reason\”:\“request [/_opendistro/_reports/instances] contains unrecognized parameter: [maxItems]\”},\“status\”:400}"}"}

An idea for this problem ?

Thanks

Is this intermittent? I can’t tell from your message.

Plugin never works but I receive error messages in loop
I have downloaded my plugin version from

https://d3g5vo6xdbdb9a.cloudfront.net/downloads/kibana-plugins/opendistro-reports/linux/x64/opendistroReportsKibana-1.12.0.0.zip

I use docker container for kibana , no reports can be created
So

  • On create action → One or more fields have an error. Please check and try again
  • and at plugin setup → Error generating report definitions table.

I work with docker swarm
When I use kibana in debug mode (yarn start --oss) and add plugin in “plugins” folder ,
I receive same error when execute plugin and at kibane setup I have the following error
‘’’
ERROR in /home/comijac/metriks/kibana_10/kibana/packages/kbn-optimizer/target/worker/entry_point_creator.js
│ Module not found: Error: Can’t resolve ‘…/…/…/…/plugins/opendistroReportsKibana/public’ in ‘/home/comijac/metriks/kibana_10/kibana/packages/kbn-optimizer/target/worker’
│ resolve ‘…/…/…/…/plugins/opendistroReportsKibana/public’ in ‘/home/comijac/metriks/kibana_10/kibana/packages/kbn-optimizer/target/worker’
│ using description file: /home/comijac/metriks/kibana_10/kibana/packages/kbn-optimizer/package.json (relative path: ./target/worker)
│ Field ‘browser’ doesn’t contain a valid alias configuration
│ using description file: /home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/package.json (relative path: ./public)
│ no extension
│ Field ‘browser’ doesn’t contain a valid alias configuration
│ /home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/public doesn’t exist
│ .js
│ Field ‘browser’ doesn’t contain a valid alias configuration
│ /home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/public.js doesn’t exist
│ .ts
│ Field ‘browser’ doesn’t contain a valid alias configuration
│ /home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/public.ts doesn’t exist
│ .tsx
│ Field ‘browser’ doesn’t contain a valid alias configuration
│ /home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/public.tsx doesn’t exist
│ .json
│ Field ‘browser’ doesn’t contain a valid alias configuration
│ /home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/public.json doesn’t exist
│ as directory
│ /home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/public doesn’t exist
│ [/home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/public]
│ [/home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/public.js]
│ [/home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/public.ts]
│ [/home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/public.tsx]
│ [/home/comijac/metriks/kibana_10/kibana/plugins/opendistroReportsKibana/public.json]
│ @ /home/comijac/metriks/kibana_10/kibana/packages/kbn-optimizer/target/worker/entry_point_creator.js 1:227-296
‘’’

Hi, the reporting feature requires both the reports-scheduler plugin(ES) and kibana-reports plugin(Kibana) installed? I believe you are missing the reports-scheduler plugin
You can install that plugin by

sudo bin/elasticsearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-reports-scheduler/opendistro-reports-scheduler-1.12.0.0.zip

The download command is also documented on our website. However, we need to better document this in the reporting section. Also, the Kibana plugin needs to add a mechanism to check if the corresponding ES plugin is missing.

Thank for your responses
I have installed the elasticsearch plugin.
I have no more:

  • “Error generating report definitions table” at reporting setup

But when I create a report I have the following errors

  • One or more fields have an error. Please check and try again.
  • (or) Error creating report definition.

I’m working with docker component. Let find my environment variables
kibana:
environment:
- xpack.reporting.enabled=true
- xpack.reporting.encryptionKey=“zDC&F)J@NcRfUjXn2r5u8x/A%DG-KaP"
- xpack.encryptedSavedObjects.encryptionKey="zDC&F)J@NcRfUjXn2r5u8x/A%D
G-KaP”

I have often the reccurrent error
{“type”:“log”,"@timestamp":“2021-01-29T08:17:10Z”,“tags”:[“warning”,“plugins”,“usageCollection”,“collector-set”],“pid”:1,“message”:"{ Error: [security_exception] no permissions for [indices:data/read/search] and User [name=kibanaserver, backend_roles=, requestedTenant=null]\n at respond (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)\n at checkRespForFailure (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)\n at HttpConnector. (/usr/share/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)\n at IncomingMessage.wrapper (/usr/share/kibana/node_modules/lodash/lodash.js:4949:19)\n at IncomingMessage.emit (events.js:203:15)\n at endReadableNT (_stream_readable.js:1145:12)\n at process._tickCallback (internal/process/next_tick.js:63:19)\n status: 403,\n displayName: ‘AuthorizationException’,\n message:\n ‘[security_exception] no permissions for [indices:data/read/search] and User [name=kibanaserver, backend_roles=, requestedTenant=null]’,\n path: ‘/.monitoring-es-6-%2C.monitoring-es-7-/_search’,\n query:\n { filter_path:\n ‘hits.hits._source.cluster_settings.cluster.metadata.display_name,hits.hits._source.cluster_uuid,hits.hits._source.cluster_name’ },\n body:\n { error:\n { root_cause: [Array],\n type: ‘security_exception’,\n reason:\n ‘no permissions for [indices:data/read/search] and User [name=kibanaserver, backend_roles=, requestedTenant=null]’ },\n status: 403 },\n statusCode: 403,\n response:\n ‘{“error”:{“root_cause”:[{“type”:“security_exception”,“reason”:“no permissions for [indices:data/read/search] and User [name=kibanaserver, backend_roles=, requestedTenant=null]”}],“type”:“security_exception”,“reason”:“no permissions for [indices:data/read/search] and User [name=kibanaserver, backend_roles=, requestedTenant=null]”},“status”:403}’,\n toString: [Function],\n toJSON: [Function] }"}

but i am not sure this error matche with the report problem
thank you

On existing visualisation the preceeding errors occurs
Note that : a lot of dasboards are missing in report dashboard list

But creating from new search or visu works !!

From these new reports definition , downloading report fails

  • Error generating report. (from report definition)
  • or Error downloading report (from reports list)
  • When you said “report dashboard list”, are you referring to the dropdown list in the “create report definition” page?
  • I wonder if you get any successful report generated by using any of the following approaches. When you said “create a report”, whick of the following two approaches are you referring to?
    1. Create an on demand report definition.
    2. Click the reporting menu button from any saved dashboard/visualization/saved search(Discover page), click generate report.
  • the xpack.reporting configuration has nothing to do with our plugin. Currently our plugin doesn’t have plugin-specific configuration.

Thanks
Zhongnan

For the first point , yes it is the dasboards list during report definition creation. But searches and visualizations seem correct.
For the second point, it is when the report definition is complete, when I push the button for downloading the report on my PC, from the list of available on-demand report (pdf, or csv or png).
According to some report discussion I use security mode (ssl, https)

I have migrated fron 6.7.1 to 7.10.0. I observe the following point:
when a create a report of an existing object , it fail :One or more fields have an error. Please check and try again
when a create a report of a new object , it is ok
when I duplicate an existing objet in a new object: it is ok
reversely : when I delete the existing objet an re-create it by the preceeding created new objet : it fails (???)

I found the following error in kibana logs → slight_smile: {“type”:“log”,"@timestamp":“2021-02-03T13:49:31Z”,“tags”:[“error”,“plugins”,“opendistroReportsKibana”],“pid”:1,“message”:“Failed to generate report by id: Error: Failed to launch chrome!\n/usr/share/kibana/plugins/opendistroReportsKibana/server/routes/utils/…/…/…/.chromium/headless_shell: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md\n”}

Then adding the required library libnss3.so to my kibana container , I have no more this error.
But the following errors

  • when attempt to download a report from available report list
    {“type”:“log”,"@timestamp":“2021-02-03T16:50:40Z”,“tags”:[“error”,“plugins”,“opendistroReportsKibana”],“pid”:1,“message”:“Failed to generate report by id: [object Object]”}

then
{“type”:“response”,"@timestamp":“2021-02-03T16:50:39Z”,“tags”:,“pid”:1,“method”:“get”,“statusCode”:500,“req”:{“url”:"/api/reporting/generateReport/b9yAVHcBVxuB4bsqpmiM?timezone=Europe%2FParis",“method”:“get”,“headers”:{“host”:“kibana-search-dev.melvis.hbx.geo.francetelecom.fr”,“user-agent”:“Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0”,“accept”:"/",“accept-encoding”:“gzip, deflate, br”,“accept-language”:“en-US,en;q=0.5”,“content-type”:“application/json”,“kbn-version”:“7.10.0”,“referer”:“https://kibana-search-dev.melvis.hbx.geo.francetelecom.fr/app/opendistro_kibana_reports",“te”:“trailers”,“x-forwarded-for”:“10.255.0.7”,“x-forwarded-host”:“kibana-search-dev.melvis.hbx.geo.francetelecom.fr”,“x-forwarded-port”:“443”,“x-forwarded-proto”:“https”,“x-forwarded-server”:“b7596e0b9b54”,“x-real-ip”:“10.255.0.7”,“securitytenant”:""},“remoteAddress”:“10.241.0.249”,“userAgent”:"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0”,“referer”:“https://kibana-search-dev.melvis.hbx.geo.francetelecom.fr/app/opendistro_kibana_reports"},“res”:{“statusCode”:500,“responseTime”:232,“contentLength”:9},“message”:"GET /api/reporting/generateReport/b9yAVHcBVxuB4bsqpmiM?timezone=Europe%2FParis 500 232ms - 9.0B”}

  • when attempt to download from a displayed visualisation (menu Download PDF, PNG)

{“type”:“log”,"@timestamp":“2021-02-03T16:37:51Z”,“tags”:[“error”,“plugins”,“opendistroReportsKibana”],“pid”:1,“message”:“Failed input validation for create report Error: [query_url]: invalid relative url: /app/visualize#/edit/OGA_Titre_AppliTV?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:’‘2021-01-30T18:20:08.829Z’’,to:‘2021-01-30T18:50:08.829Z’))&_a=(filters:!(),linked:!f,query:(language:lucene,query:(query_string:(analyze_wildcard:!t,query:’*’))),uiState:(),vis:(aggs:!(),params:(fontSize:12,markdown:‘Appli%20TV’,openLinksInNewTab:!f),title:OGA_Titre_AppliTV,type:markdown))”}

I believe similar issue has been reported on github, for the custom saved_object id. This is the PR to fixed that issue. It’s merged in dev branch, but will be included in next ODFE release.

1 Like

Moved to reporting category.