Kibana: "yarn es snapshot" fails on Windows

Created on 20 Jun 2018  Β·  7Comments  Β·  Source: elastic/kibana

Kibana version: Latest master (92245ac)

Elasticsearch version: 7.0.0-alpha1 snapshot

OS version: Windows 10

Describe the bug:
After syncing the kibana source (first time in a few days), yarn es snapshot fails for me as follows:

> yarn es snapshot
yarn run v1.6.0
$ node scripts/es snapshot
 info  Installing from snapshot
   β”‚ info  version: 7.0.0-alpha1
   β”‚ info  install path: F:\CodingProjects\kibana\kibana\.es\7.0.0-alpha1
   β”‚ info  license: basic
   β”‚ info  downloading from https://snapshots.elastic.co/downloads/elasticsearch/elasticsearch-7.0.0-alpha1-SNAPSHOT.tar.gz
   β”‚ info  etags match, using cache from 2018-06-19T23:38:11.474Z
   β”‚ info  install directory already exists, removing
   β”‚ info  extracting F:\CodingProjects\kibana\kibana\.es\cache\elasticsearch-7.0.0-alpha1-SNAPSHOT.tar.gz
   β”‚ info  extracted to F:\CodingProjects\kibana\kibana\.es\7.0.0-alpha1
   β”‚ info  setting bootstrap password to changeme
   β”‚ERROR  Unhandled error
   β”‚ERROR  Error: spawn ./bin/elasticsearch-keystore.bat ENOENT
   β”‚           at notFoundError (F:\CodingProjects\kibana\kibana\packages\kbn-es\node_modules\cross-spawn\lib\enoent.js:6:26)
   β”‚           at verifyENOENT (F:\CodingProjects\kibana\kibana\packages\kbn-es\node_modules\cross-spawn\lib\enoent.js:40:16)
   β”‚           at ChildProcess.cp.emit (F:\CodingProjects\kibana\kibana\packages\kbn-es\node_modules\cross-spawn\lib\enoent.js:27:25)
   β”‚           at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
error Command failed with exit code 1.

It appears there is no elasticsearch-keystore.bat file in the .tar.gz file, yet there is in the .zip version. But it appears nothing has changed in kbn-es in the time that this stopped working, so I'm not sure how this used to work. Am I missing something? I could've sworn I didn't do anything different a few days ago...

Operations bug

All 7 comments

This is my bad, caused from https://github.com/elastic/kibana/pull/19916. I will get a fix in shortly.

Same behavior observed with Kibana 6.3.0 on node:8.11.0-alpine. I am able to execute: yarn kbn clean, yarn kbn bootstrap, and yarn start to get Kibana up and running, but when executing yarn es snapshot or yarn es archive /opt/elasticsearch-6.3.0.tar.gz (.tar.gz is copied to /opt/ prior to executing the command), both fail with the following error message regarding ./bin/elasticsearch-keystore. Are there any parameters that can be passed to the yarn es command to fix this?

$ node scripts/es snapshot
 info  Installing from snapshot
   β”‚ info  version: 6.3.0
   β”‚ info  install path: /kibana/.es/6.3.0
   β”‚ info  license: basic
   β”‚ info  downloading from https://snapshots.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0-SNAPSHOT.tar.gz
   β”‚ info  extracting /kibana/.es/cache/elasticsearch-6.3.0-SNAPSHOT.tar.gz
   β”‚ info  extracted to /kibana/.es/6.3.0
   β”‚ info  setting bootstrap password to changeme
   β”‚ERROR  Unhandled error
   β”‚ERROR  Error: spawn ./bin/elasticsearch-keystore ENOENT
   β”‚           at _errnoException (util.js:1022:11)
   β”‚           at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
   β”‚           at onErrorNT (internal/child_process.js:372:16)
   β”‚           at _combinedTickCallback (internal/process/next_tick.js:138:11)
   β”‚           at process._tickCallback (internal/process/next_tick.js:180:9)

@sbelyankin I've found that simply starting the elasticsearch from the manually-downloaded snapshot works fine. For me (on Windows), this meant unzipping https://snapshots.elastic.co/downloads/elasticsearch/elasticsearch-7.0.0-alpha1-SNAPSHOT.zip and just running bin/elasticsearch.bat.

Hi @tylersmalley are there any updates on this? Is there a fix planned (or already available)?
Thank you!

This was caused by https://github.com/elastic/elasticsearch/pull/30596 - I am working to update to pull the zip when on Windows.

PR has been merged

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stigdescamps picture stigdescamps  Β·  88Comments

srl295 picture srl295  Β·  104Comments

pkubat picture pkubat  Β·  75Comments

tbragin picture tbragin  Β·  81Comments

Vineeth-Mohan picture Vineeth-Mohan  Β·  149Comments