Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional test server errors out on Windows when running on ES snapshot #20560

Closed
marius-dr opened this issue Jul 9, 2018 · 1 comment
Closed
Labels
bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team

Comments

@marius-dr
Copy link
Member

Kibana version: master

Server OS version: Windows 10

Describe the bug:
Running the test server from Windows will give the following error:

 info  Installing from snapshot
   │ info  version: 7.0.0-alpha1
   │ info  install path: C:\Users\ratonbox\Documents\GitHub\kibana\.es\test-ambq
glgc1wn
   │ info  license: trial
   │ info  downloading from https://snapshots.elastic.co/downloads/elasticsearch
/elasticsearch-7.0.0-alpha1-SNAPSHOT.tar.gz
   │ info  extracting C:\Users\ratonbox\Documents\GitHub\kibana\.es\cache\elasti
csearch-7.0.0-alpha1-SNAPSHOT.tar.gz
   │ info  extracted to C:\Users\ratonbox\Documents\GitHub\kibana\.es\test-ambqg
lgc1wn
   │ info  setting bootstrap password to iamsuperuser
Error: spawn ./bin/elasticsearch-keystore.bat ENOENT

Tracking it down, it's because it downloads the .tar.gz package regardless of the OS. Looks like it comes from here:
https://github.com/elastic/kibana/blob/master/packages/kbn-es/src/install/snapshot.js
in this function:

function getFilename(license, version) {
  const basename = `elasticsearch${
    license === 'oss' ? '-oss-' : '-'
  }${version}`;

  return `${basename}-SNAPSHOT.tar.gz`;
}

ping @tylersmalley

I did try something like this, which fixes the download, but then there are more problems further down the line with the unzip (as it uses the node lib to extract tarballs by default)

const os = require('os');
...
...
...
function getFilename(license, version) {
  var isWin = (os.platform() === 'win32')
  const basename = `elasticsearch${
    license === 'oss' ? '-oss-' : '-'
  }${version}`;
  if (isWin) {
	return `${basename}-SNAPSHOT.zip`
  } else {
  return `${basename}-SNAPSHOT.tar.gz`;}
}
@marius-dr marius-dr added bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team labels Jul 9, 2018
@tylersmalley
Copy link
Contributor

Closing, duplicate of #20063

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team
Projects
None yet
Development

No branches or pull requests

2 participants