wtakase / kibana-own-home

Multi-tenancy for Kibana
Other
249 stars 79 forks source link

Plugin makes Kibana 7.1.1 crash on boot #149

Open jpazsedano opened 5 years ago

jpazsedano commented 5 years ago

I've tried with both the pure Apache licensed Kibana 7.1.1 and the standard one, and this happens with both. On boot, kibana shows this error:

{"type":"log","@timestamp":"2019-06-12T12:34:07Z","tags":["fatal","root"],"pid":6,"message":"{ Error: Cannot find module 'ldap-filter'\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)\n    at Function.Module._load (internal/modules/cjs/loader.js:507:25)\n    at Module.require (internal/modules/cjs/loader.js:637:17)\n    at require (internal/modules/cjs/helpers.js:22:18)\n    at Object.<anonymous> (/usr/share/kibana/plugins/own_home/node_modules/ldapjs-client/src/filters/index.js:1:20)\n    at Module._compile (internal/modules/cjs/loader.js:689:30)\n    at Module._extensions..js (internal/modules/cjs/loader.js:700:10)\n    at Object.require.extensions.(anonymous function) [as .js] (/usr/share/kibana/node_modules/babel-register/lib/node.js:152:7)\n    at Module.load (internal/modules/cjs/loader.js:599:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:530:3)\n    at Module.require (internal/modules/cjs/loader.js:637:17)\n    at require (internal/modules/cjs/helpers.js:22:18)\n    at Object.<anonymous> (/usr/share/kibana/plugins/own_home/node_modules/ldapjs-client/src/requests/search_request.js:3:25)\n    at Module._compile (internal/modules/cjs/loader.js:689:30)\n    at Module._extensions..js (internal/modules/cjs/loader.js:700:10)\n    at Object.require.extensions.(anonymous function) [as .js] (/usr/share/kibana/node_modules/babel-register/lib/node.js:152:7)\n    at Module.load (internal/modules/cjs/loader.js:599:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:530:3)\n    at Module.require (internal/modules/cjs/loader.js:637:17)\n    at require (internal/modules/cjs/helpers.js:22:18) code: 'MODULE_NOT_FOUND' }"}

 FATAL  Error: Cannot find module 'ldap-filter'

And terminates.

I've been able boot Kibana with the plugin by getting its source code, modify Kibana's package.json to add a dependency to ldapjs-client, and compiling it.

However the plugin should work with unmodified Kibana.

wtakase commented 5 years ago

Because kibana-own-home/package.json contains ldapjs-client entry, you don't need to add it to Kibana's package.json.

Did you build the own_home plugin from the source code, right? If you built the plugin successfully, you will have kibana-own-home/node_modules/ldapjs-client/.

jpazsedano commented 5 years ago

Yes, i have the kibana-own-home/node_modules/ldapjs-client on the zip file, and it's copied to /usr/share/kibana/plugins/own_home/node_modules, but not to /usr/share/kibana/node_modules. And kibana doesn't detect it.

Maybe is an issue with Kibana and not with the plugin. I will ask there.