Kibana plugin fails to install on Kibana version 6.5.4


(Frederick) #1

Hello all,
I was installing ROR Enterprise on an updated version of ELK,
Things were looking fine upto the part Optimizing and caching browser bundles...
After which I get this error, does anyone have any idea how I can fix this?

Plugin installation was unsuccessful due to error "Command failed: /usr/share/kibana/node/bin/node /usr/share/kibana/src/c
li --env.name=production --optimize.useBundleCache=false --server.autoListen=false --plugins.initialize=false
(node:4349) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/usr/share/kibana/node/bin/node]
 2: 0x8cce9c [/usr/share/kibana/node/bin/node]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [/usr/share/kibana/node/bin/node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/share/kibana/node/bin/node]
 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/usr/share/kibana/node/bin/node]
 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [/usr/s
hare/kibana/node/bin/node]
 7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [/usr/share/kib
ana/node/bin/node]
 8: v8::internal::String::LastIndexOf(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Ha
ndle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [/usr/share/kibana/node/bin/node]
 9: v8::internal::Builtin_StringPrototypeLastIndexOf(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/share/kiba
na/node/bin/node]
10: 0x3d859310697d

{"type":"log","@timestamp":"2019-01-14T13:45:39Z","tags":["info","optimize"],"pid":4349,"message":"Optimizing and caching 
bundles for ml, stateSessionStorageRedirect, status_page, timelion, graph, monitoring, space_selector, dashboardViewer, ap
m, canvas, infra, readonlyrest_kbn and kibana. This may take a few minutes"}

<--- Last few GCs --->

[4349:0x40a9140]  1719053 ms: Mark-sweep 1305.1 (1451.7) -> 1305.1 (1453.2) MB, 2317.7 / 0.0 ms  allocation failure GC in 
old space requested
[4349:0x40a9140]  1721404 ms: Mark-sweep 1305.1 (1453.2) -> 1305.1 (1420.2) MB, 2351.4 / 0.0 ms  last resort GC in old spa
ce requested
[4349:0x40a9140]  1723873 ms: Mark-sweep 1305.1 (1420.2) -> 1305.1 (1420.2) MB, 2469.0 / 0.0 ms  last resort GC in old spa
ce requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x31f43bc258b9 <JSObject>
    0: builtin exit frame: lastIndexOf(this=0x7d14a038199 <Very long string[5033764]>,0x2cf28bf120e9 <String[1]\: \n>)

    1: has_nlb(aka has_nlb) [0xa6d642822d1 <undefined>:5970] [bytecode=0x156e8f3cd3e1 offset=15](this=0xa6d642822d1 <undef
ined>)
    2: /* anonymous */(aka /* anonymous */) [0xa6d642822d1 <undefined>:6070] [bytecode=0x1e89adee58a9 offset=60](this=0xa6
d642822d1 <undefined>,c=0x3...

"

Enterprise installation - npm update caniuse-lite browserslist
(Simone Scarduzio) #2

Hi @frederickfrnnd, this is a common problem with installing any Kibana plugin. Also X-Pack is affected by it, here people propose some workarounds:


(Frederick) #3

Thanks, this worked for me for installing the plugin,
I realized later that this is also the issue with running kibana. I’m trying to run kibana with the same node options. Will report back on how it went.


(Frederick) #4

I tried the same to run kibana as a process, it gives me a similar error.
How do you think I can fix this issue?

NODE_OPTIONS="--max-old-space-size=4096" sudo ./kibana
  log   [07:31:35.993] [info][optimize] Optimizing and caching bundles for ml, stateSessionStorageRedirect, status_page, $
imelion, graph, monitoring, space_selector, dashboardViewer, apm, canvas, infra, readonlyrest_kbn and kibana. This may ta$
e a few minutes
^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B
<--- Last few GCs --->

[16066:0x3ff90a0]  2677141 ms: Mark-sweep 1325.1 (1464.4) -> 1325.0 (1465.4) MB, 5002.8 / 0.0 ms  allocation failure GC i$
 old space requested
[16066:0x3ff90a0]  2682242 ms: Mark-sweep 1325.0 (1465.4) -> 1325.0 (1429.9) MB, 5100.1 / 0.0 ms  last resort GC in old sp
ace requested
[16066:0x3ff90a0]  2685975 ms: Mark-sweep 1325.0 (1429.9) -> 1325.0 (1429.9) MB, 3733.4 / 0.0 ms  last resort GC in old sp
ace requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x37b6e27258b9 <JSObject>
    0: builtin exit frame: lastIndexOf(this=0x2a89c4327fc1 <Very long string[6709649]>,0x1aba7f5920b9 <String[1]\: \n>)

    1: has_nlb(aka has_nlb) [0x158e3a7822d1 <undefined>:5970] [bytecode=0x4d362b5e009 offset=15](this=0x158e3a7822d1 <unde
fined>)
    2: prepend_comments [0x158e3a7822d1 <undefined>:~5974] [pc=0x6c67ee352ff](this=0x3b8a36c971 <Object map = 0x2b58550dbb
71>,node=0x210bb19a7ee1 <...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [./../node/bin/node]
 2: 0x8cce9c [./../node/bin/node]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [./../node/bin/node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [./../node/bin/node]
 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [./../node/bin/node]
 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [./../n
ode/bin/node]
 7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [./../node/bin/
node]
 8: v8::internal::String::LastIndexOf(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Ha
ndle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [./../node/bin/node]
 9: v8::internal::Builtin_StringPrototypeLastIndexOf(int, v8::internal::Object**, v8::internal::Isolate*) [./../node/bin/n
ode]
10: 0x6c67d70697d
Aborted

(Frederick) #5

Hello again,
I’ve tried it this way and I get this error.

sudo ./kibana serve NODE_OPTIONS="--max-old-space-size=4096"
  log   [08:40:26.502] [warning][saved-objects] Saved Objects uninitialized because the Kibana plugin is disabled.
  log   [08:40:26.814] [info][optimize] Optimizing and caching bundles for ml, graph, monitoring, space_selector, login, l
ogout, dashboardViewer, apm, canvas and infra. This may take a few minutes
 error  [08:57:18.741] [fatal][root] Error: Optimizations failure.
   5941 modules
    
    ERROR in ../src/ui/public/vis/editors/default/schemas.js
    Module not found: Error: Can't resolve 'plugins/kbn_vislib_vis_types/controls/radius_ratio_option.html' in '/usr/shar$
/kibana/src/ui/public/vis/editors/default'
    
    ERROR in ../src/ui/public/vis/editors/default/schemas.js
    Module not found: Error: Can't resolve 'plugins/kbn_vislib_vis_types/controls/rows_or_columns.html' in '/usr/share/ki$
ana/src/ui/public/vis/editors/default'
    
    ERROR in ../node_modules/x-pack/plugins/dashboard_mode/public/dashboard_viewer.js
    Module not found: Error: Can't resolve 'plugins/kibana/dashboard' in '/usr/share/kibana/node_modules/x-pack/plugins/d$
shboard_mode/public'
    
    ERROR in ../node_modules/x-pack/plugins/dashboard_mode/public/dashboard_viewer.js
    Module not found: Error: Can't resolve 'plugins/kibana/dashboard/dashboard_constants' in '/usr/share/kibana/node_modu$
es/x-pack/plugins/dashboard_mode/public'
    
    ERROR in ../node_modules/val-loader/dist/cjs.js!../src/optimize/create_ui_exports_module.js?{"type":"embeddableFactor$
es","modules":["plugins/kibana/visualize/embeddable/visualize_embeddable_factory_provider","plugins/kibana/discover/embed$
able/search_embeddable_factory_provider"]}
    Module not found: Error: Can't resolve 'plugins/kibana/discover/embeddable/search_embeddable_factory_provider' in '/u$
r/share/kibana/src/optimize'
    ERROR in ../node_modules/val-loader/dist/cjs.js!../src/optimize/create_ui_exports_module.js?{"type":"embeddableFactori
es","modules":["plugins/kibana/visualize/embeddable/visualize_embeddable_factory_provider","plugins/kibana/discover/embedd
able/search_embeddable_factory_provider"]}
    Module not found: Error: Can't resolve 'plugins/kibana/discover/embeddable/search_embeddable_factory_provider' in '/u$
r/share/kibana/src/optimize'
    
    ERROR in ../node_modules/val-loader/dist/cjs.js!../src/optimize/create_ui_exports_module.js?{"type":"embeddableFactor$
es","modules":["plugins/kibana/visualize/embeddable/visualize_embeddable_factory_provider","plugins/kibana/discover/embed$
able/search_embeddable_factory_provider"]}
    Module not found: Error: Can't resolve 'plugins/kibana/visualize/embeddable/visualize_embeddable_factory_provider' in 
'/usr/share/kibana/src/optimize'

    at FsOptimizer.failedStatsToError (/usr/share/kibana/src/optimize/base_optimizer.js:379:27)
    at compiler.run (/usr/share/kibana/src/optimize/fs_optimizer.js:47:26)
    at onCompiled (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:241:12)
    at applyPluginsAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:514:14)
    at next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:202:11)
    at Compiler.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/CachePlugin.js:78:5)
    at Compiler.applyPluginsAsyncSeries (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:206:13)
    at compilation.seal.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:511:11)
    at Compilation.applyPluginsAsyncSeries (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:195:46)
    at self.applyPluginsAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:671:19)
    at Compilation.applyPluginsAsyncSeries (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:195:46)
    at self.applyPluginsAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:662:11)
    at next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:202:11)
    at /usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/index.js:282:11
    at step (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:90:11)
    at done (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:99:22)
    at /usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:105:15
    at _class.boundWorkers (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:76:13)
   at _class.boundWorkers (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:76:13)    [13/250]
    at enqueue (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:96:17)
    at /usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:116:11
    at Array.forEach (<anonymous>)
    at _class.runTasks (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:94:13)
    at UglifyJsPlugin.optimizeFn (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/index.js:195:16)
    at next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:204:14)
    at Compilation.compilation.plugin (/usr/share/kibana/node_modules/webpack/lib/BannerPlugin.js:67:5)
    at Compilation.applyPluginsAsyncSeries (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:206:13)
    at self.applyPluginsAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:657:10)
    at next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:202:11)

 FATAL  Error: Optimizations failure.
   5941 modules
    
    ERROR in ../src/ui/public/vis/editors/default/schemas.js
    Module not found: Error: Can't resolve 'plugins/kbn_vislib_vis_types/controls/radius_ratio_option.html' in '/usr/share
/kibana/src/ui/public/vis/editors/default'
    
    ERROR in ../src/ui/public/vis/editors/default/schemas.js
    Module not found: Error: Can't resolve 'plugins/kbn_vislib_vis_types/controls/rows_or_columns.html' in '/usr/share/kib
ana/src/ui/public/vis/editors/default'
    
    ERROR in ../node_modules/x-pack/plugins/dashboard_mode/public/dashboard_viewer.js
    Module not found: Error: Can't resolve 'plugins/kibana/dashboard' in '/usr/share/kibana/node_modules/x-pack/plugins/da
shboard_mode/public'
    
    ERROR in ../node_modules/x-pack/plugins/dashboard_mode/public/dashboard_viewer.js
    Module not found: Error: Can't resolve 'plugins/kibana/dashboard/dashboard_constants' in '/usr/share/kibana/node_modul
es/x-pack/plugins/dashboard_mode/public'
    
    ERROR in ../node_modules/val-loader/dist/cjs.js!../src/optimize/create_ui_exports_module.js?{"type":"embeddableFactori
es","modules":["plugins/kibana/visualize/embeddable/visualize_embeddable_factory_provider","plugins/kibana/discover/embedd
able/search_embeddable_factory_provider"]}
    Module not found: Error: Can't resolve 'plugins/kibana/discover/embeddable/search_embeddable_factory_provider' in '/us
r/share/kibana/src/optimize'
    
    ERROR in ../node_modules/val-loader/dist/cjs.js!../src/optimize/create_ui_exports_module.js?{"type":"embeddableFactori
es","modules":["plugins/kibana/visualize/embeddable/visualize_embeddable_factory_provider","plugins/kibana/discover/embedd
able/search_embeddable_factory_provider"]}
    Module not found: Error: Can't resolve 'plugins/kibana/visualize/embeddable/visualize_embeddable_factory_provider' in 
'/usr/share/kibana/src/optimize'

(Simone Scarduzio) #6

Try deleting everything and reinstalling Kibana from scratch.