Kibana build error

I am trying to build Kibana 6.6 and see spawn fpm ENOENT error.
I am running command yarn build without any options.

Below is the error.

info [ kibana ] Creating deb package
│ debg calling fpm with args: [ '--force',
│ '-t',
│ 'deb',
│ '--package',
│ '/Users/j0l03mx/repo/kibana/kibana-ext/target/NAME-6.6.3-SNAPSHOT-ARCH.TYPE',
│ '-s',
│ 'dir',
│ '--name',
│ 'kibana',
│ '--description',
│ 'Explore and visualize your Elasticsearch data',
│ '--version',
│ '6.6.3-SNAPSHOT',
│ '--url',
│ 'https://www.elastic.co',
│ '--vendor',
│ 'Elasticsearch, Inc.',
│ '--maintainer',
│ 'Kibana Team info@elastic.co',
│ '--license',
│ 'Elastic-License',
│ '--conflicts',
│ 'kibana-oss',
│ '--after-install',
│ '/Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/package_scripts/post_install.sh',
│ '--before-install',
│ '/Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/package_scripts/pre_install.sh',
│ '--before-remove',
│ '/Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/package_scripts/pre_remove.sh',
│ '--after-remove',
│ '/Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/package_scripts/post_remove.sh',
│ '--config-files',
│ '/etc/kibana/kibana.yml',
│ '--template-value',
│ 'user=kibana',
│ '--template-value',
│ 'group=kibana',
│ '--template-value',
│ 'optimizeDir=/usr/share/kibana/optimize',
│ '--template-value',
│ 'configDir=/etc/kibana',
│ '--template-value',
│ 'pluginsDir=/usr/share/kibana/plugins',
│ '--template-value',
│ 'dataDir=/var/lib/kibana',
│ '--exclude',
│ 'usr/share/kibana/config',
│ '--exclude',
│ 'usr/share/kibana/data',
│ '--architecture',
│ 'amd64',
│ '--deb-priority',
│ 'optional',
│ '/Users/j0l03mx/repo/kibana/kibana-ext/build/default/kibana-6.6.3-SNAPSHOT-linux-x86_64/=/usr/share/kibana/',
│ '/Users/j0l03mx/repo/kibana/kibana-ext/build/default/kibana-6.6.3-SNAPSHOT-linux-x86_64/config/=/etc/kibana/',
│ '/Users/j0l03mx/repo/kibana/kibana-ext/build/default/kibana-6.6.3-SNAPSHOT-linux-x86_64/data/=/var/lib/kibana/',
│ '/Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/service_templates/sysv/etc/=/etc/',
│ '/Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/service_templates/systemd/etc/=/etc/' ]
│ info $ fpm --force -t deb --package /Users/j0l03mx/repo/kibana/kibana-ext/target/NAME-6.6.3-SNAPSHOT-ARCH.TYPE -s dir --name kibana --description Explore and visualize your Elasticsearch data --version 6.6.3-SNAPSHOT --url https://www.elastic.co --vendor Elasticsearch, Inc. --maintainer Kibana Team info@elastic.co --license Elastic-License --conflicts kibana-oss --after-install /Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/package_scripts/post_install.sh --before-install /Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/package_scripts/pre_install.sh --before-remove /Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/package_scripts/pre_remove.sh --after-remove /Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/package_scripts/post_remove.sh --config-files /etc/kibana/kibana.yml --template-value user=kibana --template-value group=kibana --template-value optimizeDir=/usr/share/kibana/optimize --template-value configDir=/etc/kibana --template-value pluginsDir=/usr/share/kibana/plugins --template-value dataDir=/var/lib/kibana --exclude usr/share/kibana/config --exclude usr/share/kibana/data --architecture amd64 --deb-priority optional /Users/j0l03mx/repo/kibana/kibana-ext/build/default/kibana-6.6.3-SNAPSHOT-linux-x86_64/=/usr/share/kibana/ /Users/j0l03mx/repo/kibana/kibana-ext/build/default/kibana-6.6.3-SNAPSHOT-linux-x86_64/config/=/etc/kibana/ /Users/j0l03mx/repo/kibana/kibana-ext/build/default/kibana-6.6.3-SNAPSHOT-linux-x86_64/data/=/var/lib/kibana/ /Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/service_templates/sysv/etc/=/etc/ /Users/j0l03mx/repo/kibana/kibana-ext/src/dev/build/tasks/os_packages/service_templates/systemd/etc/=/etc/
│ERROR failure
│ERROR Error: spawn fpm ENOENT
│ at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
│ at onErrorNT (internal/child_process.js:415:16)
│ at process._tickCallback (internal/process/next_tick.js:63:19)
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.

HI,
Probaly, you can try and delete the optimize folder in the kibana folder and restarting Kibana. There have been improvements to not having the optimization process failing in Kibana.
I saw similar issue being reported here: https://github.com/elastic/kibana/issues/17190

Is there a version mismatch btw Kibana and ES ? Also thinking its a permission issue. Try setting it as KIBANA_ROOT and check it if it works?

Thanks
Rashmi

Hi Rashmi,

Sorry for the late reply and thanks a lot for your information.
Here is what I have done.

  1. git clone https://github.com/elastic/kibana.git kibana
  2. cd kibana
  3. git checkout 6.6
  4. yarn kbn bootstrap
    --- And running kibana with yarn start works all fine.
  5. yarn build

Running Kibana itself is all fine. The issue is when I try to build. The kibana version is 6.6 and if I understand correctly, the build shouldn't matter with elasticsearch version?

And what does 'KIBANA_ROOT' mean as you mentioned above? Where should I set this?

Thank you so much!!
Jasmine

Kibana uses the ruby gem fpm to build deb and rpm packages. If you don't need deb or rpm builds you can yarn build --skip-os-packages, or if you do gem install fpm. https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#building-os-packages has a little more info for further reading

Hi,
Sorry for really long wait response and thanks a lot for your comments.
Actually we are trying to setup a Kibana build environment from the git source. I talked to our team members, here are some questions I have.

  1. Is there a specific Linux and version required to build Kibana 6.6? Would CentOs Linux works?
  2. Is there any other dependencies? From the document, I only see ruby-dev and fpm.
apt-get install ruby-dev rpm
gem install fpm -v 1.5.0
  1. Since our build system are really restrict from download outside packages, is there a way to skip download packages from the build commands? And if we skipped, what are the packages we need to pre-download / pre-setup?
  2. And is there any commands or options whihch we can use to include the installed plugins in the build files?
    Thanks sooooo much!!

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