Kibana 7.5.2 Startup Exception: "Error: Optimizations failure"

I'm deploying Elasticsearch and Kibana on to OpenShift via a template yaml file. ES is deployed without issue, but I'm having trouble getting Kibana to start. Here are the details:

Template YML Configuration
  - apiVersion: v1
    kind: DeploymentConfig
    metadata:
      name: kibana
    spec:
      replicas: 1
      template:
          metadata:
            labels:
              app: kibana
              component: kibana
              addonmanager.kubernetes.io/mode: Reconcile
          spec:
            securityContext:
                privileged: false
                capabilities:
                  add:
                    - IPC_LOCK
                    - SYS_RESOURCE
            serviceAccountName: scc-ai-elasticsearch
            containers:
            - name: kibana
              image: docker.elastic.co/kibana/kibana:7.5.2
              imagePullPolicy: IfNotPresent
              env:
                - name: "CLUSTER_NAME"
                  value: "elasticsearch"
                - name: XPACK_SECURITY_ENABLED
                  value: 'false'
                - name: XPACK_GRAPH_ENABLED
                  value: 'false'
                - name: XPACK_ML_ENABLED
                  value: 'false'
                - name: XPACK_REPORTING_ENABLED
                  value: 'false'
                - name: XPACK_GROKDEBUGGER_ENABLED
                  value: 'false'
                - name: XPACK_INFRA_ENABLED
                  value: 'false'
                - name: XPACK_SEARCHPROFILER_ENABLED
                  value: 'false'
                - name: XPACK_LICENSE_MANAGEMENT_ENABLED
                  value: 'false'
              resources:
                limits:
                  cpu: 2000m
                  memory: 2Gi
                requests:
                  cpu: 500m
                  memory: 1Gi
              ports:
                - name: ui
                  containerPort: 5601
                  protocol: TCP
Error Log

{"type":"log","@timestamp":"2020-02-10T16:09:57Z","tags":["info","optimize"],"pid":9,"message":"Optimizing and caching bundles for core, monitoring, space_selector, dashboardViewer, apm, maps, canvas, siem, uptime, lens, status_page, kibana, timelion and stateSessionStorageRedirect. This may take a few minutes"}
{"type":"log","@timestamp":"2020-02-10T16:14:03Z","tags":["fatal","root"],"pid":9,"message":"{ Error: Optimizations failure.\n 6622 modules\n \n ERROR in commons.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)\n \n ERROR in canvas.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)\n \n ERROR in kibana.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)\n\n at FsOptimizer.failedStatsToError (/usr/share/kibana/src/optimize/base_optimizer.js:440:26)\n at compiler.run (/usr/share/kibana/src/optimize/fs_optimizer.js:43:26)\n at finalCallback (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:257:39)\n at hooks.done.callAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:273:13)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)\n at onCompiled (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:271:21)\n at hooks.afterCompile.callAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:681:15)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)\n at compilation.seal.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:678:31)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)\n at hooks.optimizeAssets.callAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:1423:35)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)\n cause:\n { Error: Optimizations failure.\n 6622 modules\n \n ERROR in commons.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)\n \n ERROR in canvas.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)\n \n ERROR in kibana.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)\n \n at FsOptimizer.failedStatsToError (/usr/share/kibana/src/optimize/base_optimizer.js:440:26)\n at compiler.run (/usr/share/kibana/src/optimize/fs_optimizer.js:43:26)\n at finalCallback (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:257:39)\n at hooks.done.callAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:273:13)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)\n at onCompiled (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:271:21)\n at hooks.afterCompile.callAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:681:15)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)\n at compilation.seal.err (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:678:31)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)\n at hooks.optimizeAssets.callAsync.err (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:1423:35)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)\n data:\n { errors: [Array],\n warnings: ,\n version: '4.41.0',\n hash: '605a4ec3920626053e02',\n time: 243613,\n builtAt: 1581351242808,\n publicPath: 'REPLACE_WITH_PUBLIC_PATH',\n outputPath: '/usr/share/kibana/optimize/bundles',\n assetsByChunkName: [Object],\n assets: [Array],\n filteredAssets: 0,\n entrypoints: [Object],\n namedChunkGroups: [Object],\n chunks: [Array],\n modules: [Array],\n filteredModules: 0,\n logging: [Object],\n children: [Array] },\n isBoom: true,\n isServer: true,\n output: { statusCode: 500, payload: [Object], headers: {} },\n reformat: [Function],\n typeof: [Function: internal] },\n isOperational: true,\n data:\n { errors:\n [ 'commons.bundle.js from Terser\nError: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)',\n 'canvas.bundle.js from Terser\nError: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)',\n 'kibana.bundle.js from Terser\nError: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)' ],\n warnings: ,\n version: '4.41.0',\n hash: '605a4ec3920626053e02',\n time: 243613,\n builtAt: 1581351242808,\n publicPath: 'REPLACE_WITH_PUBLIC_PATH',\n outputPath: '/usr/share/kibana/optimize/bundles',\n assetsByChunkName:\n { commons: [Array],\n apm: [Array],\n canvas: [Array],\n core: 'core.bundle.js',\n dark_theme: [Array],\n dashboardViewer: 'dashboardViewer.bundle.js',\n kibana: [Array],\n lens: 'lens.bundle.js',\n light_theme: [Array],\n maps: 'maps.bundle.js',\n monitoring: [Array],\n 'plugin/advancedUiActions': 'plugin/advancedUiActions.bundle.js',\n 'plugin/data': 'plugin/data.bundle.js',\n 'plugin/embeddable': 'plugin/embeddable.bundle.js',\n 'plugin/eui_utils': 'plugin/eui_utils.bundle.js',\n 'plugin/expressions': 'plugin/expressions.bundle.js',\n 'plugin/inspector': 'plugin/inspector.bundle.js',\n 'plugin/newsfeed': 'plugin/newsfeed.bundle.js',\n 'plugin/uiActions': 'plugin/uiActions.bundle.js',\n siem: 'siem.bundle.js',\n
(...cut due to char limits for this post)

... any suggestions would be much appreciated!

Since the docker image you're using includes X-pack plugins, that container also includes pre-built javascript bundles. When you disable these plugins with configuration, Kibana needs to rebuild the javascript bundles which is very memory intensive. The 2Gi memory allocation is probably not sufficient and you should be able to get by with 4Gi memory.

Another option is to build an intermediate image while allocating at least 4Gi. Once built, you should be able to run the image with 2Gi of memory.

Thank you! I'll give this a try...

That worked! Thanks again!

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