FATAL Error: Optimizations failure

I tried to start Kibana 6.5.0, yet got following error:

kibana-mr-custom | {"type":"log","@timestamp":"2018-11-15T03:27:35Z","tags":["info","optimize"],"pid":1,"message":"Optimizing and caching bundles for stateSessionStorageRedirect, status_page, timelion, monitoring, space_selector, login, logout, dashboardViewer, canvas, infra and kibana. This may take a few minutes"}
kibana-mr-custom | {"type":"error","@timestamp":"2018-11-15T03:34:27Z","tags":["fatal","root"],"pid":1,"level":"fatal","error":{"message":"Optimizations failure.\n   6914 modules\n    \n    \u001b[1m\u001b[31mERROR in ./node_modules/x-pack/plugins/canvas/public/components/workpad_export/index.js\n    Module not found: Error: Can't resolve 'plugins/reporting/lib/job_completion_notifications' in '/usr/share/kibana/node_modules/x-pack/plugins/canvas/public/components/workpad_export'\u001b[39m\u001b[22m\n","name":"Error","stack":"Error: Optimizations failure.\n   6914 modules\n    \n    \u001b[1m\u001b[31mERROR in ./node_modules/x-pack/plugins/canvas/public/components/workpad_export/index.js\n    Module not found: Error: Can't resolve 'plugins/reporting/lib/job_completion_notifications' in '/usr/share/kibana/node_modules/x-pack/plugins/canvas/public/components/workpad_export'\u001b[39m\u001b[22m\n\n    at FsOptimizer.failedStatsToError (/usr/share/kibana/src/optimize/base_optimizer.js:379:27)\n    at compiler.run (/usr/share/kibana/src/optimize/fs_optimizer.js:47:26)\n    at onCompiled (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:241:12)\n    at applyPluginsAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:514:14)\n    at next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:202:11)\n    at Compiler.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/CachePlugin.js:78:5)\n    at Compiler.applyPluginsAsyncSeries (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:206:13)\n    at compilation.seal.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:511:11)\n    at Compilation.applyPluginsAsyncSeries (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:195:46)\n    at self.applyPluginsAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:671:19)\n    at Compilation.applyPluginsAsyncSeries (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:195:46)\n    at self.applyPluginsAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:662:11)\n    at next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:202:11)\n    at /usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/index.js:282:11\n    at step (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:90:11)\n    at done (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:99:22)\n    at /usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:105:15\n    at _class.boundWorkers (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:76:13)\n    at enqueue (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:96:17)\n    at /usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:116:11\n    at Array.forEach (<anonymous>)\n    at _class.runTasks (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:94:13)\n    at UglifyJsPlugin.optimizeFn (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/index.js:195:16)\n    at next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:204:14)\n    at Compilation.compilation.plugin (/usr/share/kibana/node_modules/webpack/lib/BannerPlugin.js:67:5)\n    at Compilation.applyPluginsAsyncSeries (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:206:13)\n    at self.applyPluginsAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:657:10)\n    at next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:202:11)"},"message":"Optimizations failure.\n   6914 modules\n    \n    ERROR in ./node_modules/x-pack/plugins/canvas/public/components/workpad_export/index.js\n    Module not found: Error: Can't resolve 'plugins/reporting/lib/job_completion_notifications' in '/usr/share/kibana/node_modules/x-pack/plugins/canvas/public/components/workpad_export'\n"}
kibana-mr-custom | 
kibana-mr-custom |  FATAL  Error: Optimizations failure.
kibana-mr-custom |    6914 modules
kibana-mr-custom |     
kibana-mr-custom |     ERROR in ./node_modules/x-pack/plugins/canvas/public/components/workpad_export/index.js
kibana-mr-custom |     Module not found: Error: Can't resolve 'plugins/reporting/lib/job_completion_notifications' in '/usr/share/kibana/node_modules/x-pack/plugins/canvas/public/components/workpad_export'
kibana-mr-custom | 
kibana-mr-custom |

and what really weird is, I have 2 Kibana VMs and the other Kibana started without any issues, yet this one isn't... and they're exactly identical...

Please advise.

2 Likes

Have the same issue...

I think it's the same issue :

kibana: {"type":"error","@timestamp":"2018-11-15T14:54:38Z","tags":["fatal","root"],"pid":29349,"level":"fatal","error":{"message":"Optimizations failure.\n 6882 modules\n \n \u001b[1m\u001b[31mERROR in /usr/share/kibana/node_modules/x-pack/plugins/canvas/public/components/workpad_export/index.js\n Module not found: Error: Can't resolve 'plugins/reporting/lib/job_completion_notifications' in '/usr/share/kibana/node_modules/x-pack/plugins/canvas/public/components/workpad_export'\u001b[39m\u001b[22m\n","name":"Error","stack":"Error: Optimizations failure.\n 6882 modules\n \n \u001b[1m\u001b[31mERROR in /usr/share/kibana/node_modules/x-pack/plugins/canvas/public/components/workpad_export/index.js\n Module not found: Error: Can't resolve 'plugins/reporting/lib/job_completion_notifications' in '/usr/share/kibana/node_modules/x-pack/plugins/canvas/public/components/workpad_export'\u001b[39m\u001b[22m\n\n at FsOptimizer.failedStatsToError (/usr/share/kibana/src/optimize/base_optimizer.js:379:27)\n at compiler.run (/usr/share/kibana/src/optimize/fs_optimizer.js:47:26)\n at onCompiled (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:241:12)\n at applyPluginsAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:514:14)\n at next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:202:11)\n at Compiler. (/usr/share/kibana/node_modules/webpack/lib/CachePlugin.js:78:5)\n at Compiler.applyPluginsAsyncSeries (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:206:13)\n at compilation.seal.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:511:11)\n at Compilation.applyPluginsAsyncSeries (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:195:46)\n at self.applyPluginsAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:671:19)\n at Compilation.applyPluginsAsyncSeries (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:195:46)\n at self.applyPluginsAsync.err (/usr/share kibana/node_modules/webpack/lib/Compilation.js:662:11)\n at next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:202:11)\n at /usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/index.js:282:11\n at step (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:90:11)\n at done (/usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:99:22)\n at /usr/share/kibana/node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js:105:15\n at /usr/share/kibana/node_modules/worker-farm/lib/farm.js:191:19\n at _combinedTickCallback (internal/process/next_tick.js:131:7)\n at process._tickCallback (internal/process/next_tick.js:180:9)"},"message":"Optimizations failure.\n 6882 modules\n \n ERROR in /usr/share/kibana/node_modules/x-pack/plugins/canvas/public/components/workpad_export/index.js\n Module not found: Error: Can't resolve 'plugins/reporting/lib/job_completion_notifications' in '/usr/share/kibana/node_modules/x-pack/plugins/canvas/public/components/workpad_export'\n"}

I resolved it by commenting out the following settings in the kibana .yml file:

#xpack.security.enabled: false
#xpack.graph.enabled: false
#xpack.reporting.enabled: false

I already have disabled Graph and Reporting (prior to 6.4.2), however I can't disable Security.

It's an issue that we'll fix soon, please follow https://github.com/elastic/kibana/issues/25728 to know when this is fixed.

For now you either need to enable reporting or disable canvas (Error: Module not found error on 6.5.0 upgrade).

Best,
Oleg

I confirmed, the real "workaround" (at least for now) is:

xpack.reporting.enabled: false

Hey,
@alexus I tried the workaround, but it doesn't work.
How is this issue going on ?
Will it be released soon ?

Hey @sialagio,

The workaround is to enable reporting, not disable (i.e. xpack.reporting.enabled: true).

Best,
Oleg

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.