Kibana Source Installation gives Npm Error

i created a user with root permissions.

@FareehaNaaz would you mind sharing the steps you took to create this user, and the distro of Linux that you're using?

uname -r

2.6.32-279.el6.x86_64

and the steps i followed to create this user are:
$ sudo useradd -ou 0 -g 0 sraha
$ sudo passwd sraha
$ grep sraha /etc/passwd
sraha:x:0:0::/home/sraha:/bin/bash
$ sudo usermod -a -G root sraha

Hi @Brandon_Kobel i did create another user using steps:
useradd farya
passwd farya
visudo (## Allow root to run any commands anywhere
root ALL=(ALL) ALL
farya ALL=(ALL) ALL)

$ uname -r
3.10.0-327.el7.x86_64

and here is what i get
$ git checkout
[farya@localhost kibana]$ git status

On branch master

nothing to commit, working directory clean
[farya@localhost kibana]$ npm run elasticsearch

kibana@6.0.0-alpha2 elasticsearch /home/farya/kibana
grunt esvm:dev:keepalive

Loading "Gruntfile.js" tasks...ERROR

SyntaxError: Unexpected token {
Warning: Task "esvm:dev:keepalive" not found. Use --force to continue.

Aborted due to warnings.

npm ERR! Linux 3.10.0-327.el7.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "elasticsearch"
npm ERR! node v4.4.0
npm ERR! npm v2.14.20
npm ERR! code ELIFECYCLE
npm ERR! kibana@6.0.0-alpha2 elasticsearch: grunt esvm:dev:keepalive
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the kibana@6.0.0-alpha2 elasticsearch script 'grunt esvm:dev:keepalive'.
npm ERR! This is most likely a problem with the kibana package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! grunt esvm:dev:keepalive
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs kibana
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls kibana
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/farya/kibana/npm-debug.log

also i did notice that i haven't found any "esvm" dir here.

1 Like

@FareehaNaaz using the -ou 0 argument when executing sudo useradd -ou 0 -g 0 sraha was creating a user with userId of 0, which is going to behave exactly like the root user and throw the org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root error. However, it looks like you've gotten past this with the farya user.

Whenever you get the SyntaxError: Unexpected token { Warning: Task "esvm:dev:keepalive" not found. Use --force to continue. error, it's because you're using the wrong version of node. If you run nvm use $(cat .node-version) it'll switch your version of node to what Kibana expects. It'll likely be worthwhile to switch your default version of node to this using nvm alias default $(cat .node-version) or looking into avn which will do this automatically every time you change your working directory to a folder with the .node_version file.

i have looked into the node version and then i get the same error
$ nvm use $(cat .node-version)
Now using node v6.10.2 (npm v3.10.10)

@FareehaNaaz if you run npm run elasticsearch after running nvm use $(cat .node-version) could you please paste the error you receive?

$ npm run elasticsearch

kibana@6.0.0-alpha2 elasticsearch /home/farya/kibana
grunt esvm:dev:keepalive

Loading "Gruntfile.js" tasks...ERROR

Error: Cannot find module 'core-js/modules/es6.typed.array-buffer'
Warning: Task "esvm:dev:keepalive" not found. Use --force to continue.

Aborted due to warnings.

npm ERR! Linux 3.10.0-327.el7.x86_64
npm ERR! argv "/home/farya/.nvm/versions/node/v6.10.2/bin/node" "/home/farya/.nvm/versions/node/v6.10.2/bin/npm" "run" "elasticsearch"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! kibana@6.0.0-alpha2 elasticsearch: grunt esvm:dev:keepalive
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the kibana@6.0.0-alpha2 elasticsearch script 'grunt esvm:dev:keepalive'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the kibana package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! grunt esvm:dev:keepalive
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs kibana
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls kibana
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/farya/kibana/npm-debug.log

@FareehaNaaz it looks like you need to run npm install because it's complaining about not being able to find a module.

i did run npm install first and then npm run elasticsearch, yet i get this

kibana@6.0.0-alpha2 elasticsearch /home/farya/kibana
grunt esvm:dev:keepalive

Running "esvm:dev:keepalive" (esvm) task
starting up "dev" cluster
Keeping elasticsearch alive, to shutdown press command/control+c
INFO - - cluster - Downloading & installing from "master" branch.
INFO - - cluster - Installing plugins
INFO - - cluster - Starting 1 nodes
INFO - ? - ? - [2017-05-24T05:54:36,489][INFO ][o.e.n.Node ] initializing ...
INFO - aNWi76l - node_environment - using [1] data paths, mounts [[/ (rootfs)]], net usable_space [90.2gb], net total_space [100.5gb], spins? [unknown], types [rootfs]
INFO - aNWi76l - node_environment - heap size [1.9gb], compressed ordinary object pointers [true]
INFO - ? - ? - [2017-05-24T05:54:36,597][INFO ][o.e.n.Node ] node name [aNWi76l] derived from node ID [aNWi76loSr2ouOEFi51dcA]; set [node.name] to override
INFO - ? - ? - [2017-05-24T05:54:36,598][INFO ][o.e.n.Node ] version[6.0.0-alpha1-SNAPSHOT], pid[11469], build[86aab98/2017-04-28T20:24:57.275Z], OS[Linux/3.10.0-327.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_65/25.65-b01]
INFO - ? - ? - [2017-05-24T05:54:36,598][WARN ][o.e.n.Node ] version [6.0.0-alpha1-SNAPSHOT] is a pre-release version of Elasticsearch and is not suitable for production
INFO - aNWi76l - plugins_service - loaded module [aggs-matrix-stats]
INFO - aNWi76l - plugins_service - loaded module [analysis-common]
INFO - aNWi76l - plugins_service - loaded module [ingest-common]
INFO - aNWi76l - plugins_service - loaded module [lang-expression]
INFO - aNWi76l - plugins_service - loaded module [lang-mustache]
INFO - aNWi76l - plugins_service - loaded module [lang-painless]
INFO - aNWi76l - plugins_service - loaded module [percolator]
INFO - aNWi76l - plugins_service - loaded module [reindex]
INFO - aNWi76l - plugins_service - loaded module [repository-url]
INFO - aNWi76l - plugins_service - loaded module [transport-netty4]
INFO - aNWi76l - plugins_service - no plugins loaded
INFO - aNWi76l - discovery_module - using discovery type [zen]
INFO - ? - ? - [2017-05-24T05:54:40,557][INFO ][o.e.n.Node ] initialized
INFO - aNWi76l - node - starting ...
INFO - aNWi76l - transport_service - publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
WARN - aNWi76l - bootstrap_checks - max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
WARN - aNWi76l - bootstrap_checks - max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
INFO - aNWi76l - master_service - zen-disco-elected-as-master ([0] nodes joined), reason: new_master {aNWi76l}{aNWi76loSr2ouOEFi51dcA}{BbtkhxfhTzq9Kl3N6Pe2xg}{127.0.0.1}{127.0.0.1:9300}
INFO - aNWi76l - cluster_applier_service - new_master {aNWi76l}{aNWi76loSr2ouOEFi51dcA}{BbtkhxfhTzq9Kl3N6Pe2xg}{127.0.0.1}{127.0.0.1:9300}, reason: apply cluster state (from master [master {aNWi76l}{aNWi76loSr2ouOEFi51dcA}{BbtkhxfhTzq9Kl3N6Pe2xg}{127.0.0.1}{127.0.0.1:9300} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
INFO - aNWi76l - netty_4_http_server_transport - publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
INFO - aNWi76l - node - started
Fatal error: Client request error: connect ECONNREFUSED 192.168.1.69:9200

npm ERR! Linux 3.10.0-327.el7.x86_64
npm ERR! argv "/home/farya/.nvm/versions/node/v6.10.2/bin/node" "/home/farya/.nvm/versions/node/v6.10.2/bin/npm" "run" "elasticsearch"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! kibana@6.0.0-alpha2 elasticsearch: grunt esvm:dev:keepalive
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the kibana@6.0.0-alpha2 elasticsearch script 'grunt esvm:dev:keepalive'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the kibana package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! grunt esvm:dev:keepalive
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs kibana
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls kibana
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/farya/kibana/npm-debug.log

1 Like

Hi ! do you have any updates on this?

@Brandon_Kobel i was able to resolve the earlier issue but ran into another one while running npm start.

$ npm start

kibana@6.0.0-alpha2 start /home/farya/KIBANA
babel-node --presets es2015 app.js

module.js:471
throw err;
^

Error: Cannot find module '/home/farya/KIBANA/app.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Function.Module.runMain (module.js:604:10)
at Object. (/home/farya/KIBANA/node_modules/babel-cli/lib/_babel-node.js:154:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kibana@6.0.0-alpha2 start: babel-node --presets es2015 app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the kibana@6.0.0-alpha2 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/farya/.npm/_logs/2017-05-30T06_53_18_818Z-debug.log

i referred the following link to resolve the issue javascript - How to run Node.js app with ES6 features enabled? - Stack Overflow but didnot help me out, also i tried by removing "node_modules" and running npm install and installed following dependencies but it again didnt help me out.

npm install --save-dev babel-cli
npm install --save-dev babel-preset-es2015
npm install --save-dev babel-preset-stage-0
npm install babel-register
npm install express
npm install --save-dev babel-loader babel-core babel-preset-env webpack
npm install babel-node --presets es2015 app.js
npm install --save babel-polyfill
npm install --save-dev react react-dom webpack webpack-dev-server babel-loader babel-core babel-preset-es2015 babel-preset-react

1 Like

Hello,

I too face the same problem as @FareehaNaaz....can any one help us to overcome this problem

1 Like

Can you tell us how you solved the first issue please? I still can't figure out why..

I installed es node and started it manually instead of npm run elasticsearch

Heyy FareehaNaaz,

I tried to do that too but failed : I needed the 6alpha version of ES and couldnt build it from github..
Which version did you install?

i use elasticsearch-6.0.0-alpha1

hi! Please let us know if you have any updates on this issue....

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