Can not build Kibana 4.3.1 or start elasticsearch


#1

Hey guys,
I am trying to develop with Kibana 4.3.1.
I cloned the kibana repository and then switched to the 4.3.1 branch with this command: git checkout 4.3.1
I did my "npm install" and all looks good
However when I run: "npm run elasticsearch" I get the response below (basically: unable to fetch branch snapshot url list)

The build also fails for me. Any help you can give me in terms of how tp work with Kibana that is not the latest would be very helpful.

Thanks,
Paul

Error for "npm run build"

Running "_build:downloadNodeBuilds:finish" task

linux-x86 download complete
Warning: unexpected eof Use --force to continue.

Aborted due to warnings.

npm ERR! Linux 2.6.32-504.23.4.el6.x86_64
npm ERR! argv "/home/ioa/.nvm/versions/node/v0.12.9/bin/node" "/home/ioa/.nvm/versions/node/v0.12.9/bin/npm" "run" "build"
npm ERR! node v0.12.9
npm ERR! npm v2.14.9
npm ERR! code ELIFECYCLE
npm ERR! kibana@4.3.1 build: grunt build
npm ERR! Exit status 3

Error for "npm run elasticsearch"

grunt esvm:dev:keepalive

Running "esvm:dev:keepalive" (esvm) task
starting up "dev" cluster
Keeping elasticsearch alive, to shutdown press command/control+c
Unhandled rejection Error: unable to fetch branch snapshot url list
at respond (/home/ioa/kibana/kibana/node_modules/grunt-esvm/node_modules/libesvm/lib/getSnapshotUrls.js:89:33)
at tryCatch1 (/home/ioa/kibana/kibana/node_modules/grunt-esvm/node_modules/libesvm/node_modules/bluebird/js/main/util.js:43:21)
at Promise$_callHandler [as _callHandler] (/home/ioa/kibana/kibana/node_modules/grunt-esvm/node_modules/libesvm/node_modules/bluebird/js/main/promise.js:627:13)
at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/home/ioa/kibana/kibana/node_modules/grunt-esvm/node_modules/libesvm/node_modules/bluebird/js/main/promise.js:641:18)
at Promise$_settlePromiseAt [as _settlePromiseAt] (/home/ioa/kibana/kibana/node_modules/grunt-esvm/node_modules/libesvm/node_modules/bluebird/js/main/promise.js:800:14)
at Promise$_settlePromises [as _settlePromises] (/home/ioa/kibana/kibana/node_modules/grunt-esvm/node_modules/libesvm/node_modules/bluebird/js/main/promise.js:934:14)
at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (/home/ioa/kibana/kibana/node_modules/grunt-esvm/node_modules/libesvm/node_modules/bluebird/js/main/async.js:75:12)
at Async$consumeFunctionBuffer (/home/ioa/kibana/kibana/node_modules/grunt-esvm/node_modules/libesvm/node_modules/bluebird/js/main/async.js:38:14)
at process._tickCallback (node.js:355:11)


(Court Ewing) #2

I've just done a fresh clone of kibana and am able to run both kibana and elasticsearch via npm scripts without issue. Some shots in the dark:

  • Are you using node 0.12.9 and npm 2? Kibana 4.3 won't work otherwise.
  • Do you have an internet connection on that machine? Elasticsearch won't install/run otherwise.

#3

Hey,
So it turns out that I am able to run "npm run elastcisearch" as a different user.
My OS is: Red Hat Enterprise Linux Server release 6.7 (Santiago)
Are you aware of any user specific permissions that are required?

However, the build still does not work for me me, even with this other user.
I get this far and then it fails:

Running "clean:deepModules" (clean) task

6 paths cleaned.

Running "run:optimizeBuild" (run) task

Running "stop:optimizeBuild" (stop) task

optimizeBuild stopped

Running "_build:downloadNodeBuilds:finish" task
Warning: unexpected eof Use --force to continue.

Aborted due to warnings.

npm ERR! Linux 2.6.32-504.23.4.el6.x86_64
npm ERR! argv "/home/scadmin/.nvm/versions/node/v0.12.9/bin/node" "/home/scadmin/.nvm/versions/node/v0.12.9/bin/npm" "run" "build"
npm ERR! node v0.12.9
npm ERR! npm v2.14.9
npm ERR! code ELIFECYCLE
npm ERR! kibana@4.3.1 build: grunt build
npm ERR! Exit status 3

Any ideas?


(Court Ewing) #4

When starting, the Kibana user will need permissions to write to the optimize directory. This should be configured by default in the git repo. It'll also need the ability to execute npm install to create the node_modules directory.

To run npm run elasticsearch or most of the test functionality, the user will need permission to create an esvm directory at the root of the project.

To install or remove plugins, the user will need permission to write to the installedPlugins directory. This should be configured by default in the git repo.

Finally, the run the build, the user will need permission to create build and target directories at the root of the project.

Other than the ability to read all of the files in the project, I'm not aware of any other file permissions required.


#5

Hey,

So I fixed the problem, but the solution was pretty odd.
It was failing at the _build:downloadNodeBuilds:finish task so I comment out all the tasks between the :start and the :finish and ran the build and it built. Then I commented the tasks back in and now everything builds fine. Feels like there was something missing and now its there, and once its there is all works fine. The tests are still failing so I'll look at that next. Thanks for your help on this


#6

Very strange. But this worked for me, too, when solving absolutely same problem.


(system) #7