# Can not build Kibana 4.3.1 or start elasticsearch

**URL:** <https://discuss.elastic.co/t/can-not-build-kibana-4-3-1-or-start-elasticsearch/44747>\
**Category:** Kibana\
**Created:** [March 17, 2016, 5:48pm UTC](https://discuss.elastic.co/t/can-not-build-kibana-4-3-1-or-start-elasticsearch/44747 "2016-03-17T17:48:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulbarr](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@paulbarr](https://discuss.elastic.co/u/paulbarr)\
**Post date:** [March 17, 2016, 5:48pm UTC](https://discuss.elastic.co/t/can-not-build-kibana-4-3-1-or-start-elasticsearch/44747/1 "2016-03-17T17:48:20Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Court](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/court/32/6640_2.png) [@Court](https://discuss.elastic.co/u/Court)\
**Post date:** [March 17, 2016, 6:55pm UTC](https://discuss.elastic.co/t/can-not-build-kibana-4-3-1-or-start-elasticsearch/44747/2 "2016-03-17T18:55:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paulbarr](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@paulbarr](https://discuss.elastic.co/u/paulbarr)\
**Post date:** [March 18, 2016, 11:39am UTC](https://discuss.elastic.co/t/can-not-build-kibana-4-3-1-or-start-elasticsearch/44747/3 "2016-03-18T11:39:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Court](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/court/32/6640_2.png) [@Court](https://discuss.elastic.co/u/Court)\
**Post date:** [March 18, 2016, 1:21pm UTC](https://discuss.elastic.co/t/can-not-build-kibana-4-3-1-or-start-elasticsearch/44747/4 "2016-03-18T13:21:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paulbarr](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@paulbarr](https://discuss.elastic.co/u/paulbarr)\
**Post date:** [March 18, 2016, 1:45pm UTC](https://discuss.elastic.co/t/can-not-build-kibana-4-3-1-or-start-elasticsearch/44747/5 "2016-03-18T13:45:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kadishmal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kadishmal/32/12307_2.png) [@kadishmal](https://discuss.elastic.co/u/kadishmal)\
**Post date:** [November 18, 2016, 1:18pm UTC](https://discuss.elastic.co/t/can-not-build-kibana-4-3-1-or-start-elasticsearch/44747/6 "2016-11-18T13:18:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:34pm UTC](https://discuss.elastic.co/t/can-not-build-kibana-4-3-1-or-start-elasticsearch/44747/7 "2017-07-06T13:34:08Z")

</div>


