Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Windows MSI 6.7.1 Installation Fail #283

Closed
GrandMastaC opened this issue Apr 5, 2019 · 7 comments
Closed

Windows MSI 6.7.1 Installation Fail #283

GrandMastaC opened this issue Apr 5, 2019 · 7 comments

Comments

@GrandMastaC
Copy link

So I tried to install on a nearly brand new computer with no previous ElasticSearch install and it still failed. I have no idea what the problem is. I've reviewed the Log file for anything obvious but I'm not an ElasticSearch expert so would appreciate help.

Elastic Fail Log.txt

Environment

Expected Behaviour

Actual Behaviour

Steps to reproduce the behaviour

@gavinB-orange
Copy link

gavinB-orange commented Apr 5, 2019

Just hit exactly the same issue.

MSI install, Windows10, manual not service, default options.

First thought - possibly a problem during ingest-attach install?

Elastic.InstallerHosts.Elasticsearch.Tasks.Install.InstallPluginsTask: Installing Elasticsearch plugins
[0] installing ingest-attachment installing ingest-attachment
warning: Falling back to java on path. This behavior is deprecated. Specify JAVA_HOME
\Common was unexpected at this time.
[0] installing ingest-attachment installing ingest-attachment
System.Exception: Execution failed (C:\Program Files\Elastic\Elasticsearch\6.7.1\bin\elasticsearch-plugin.bat install ingest-attachment --batch). ExitCode: 255 ErrorCheck: True ErrorOut:\Common was unexpected at this time.

   at Elastic.Installer.Domain.Configuration.Plugin.PluginStateProviderBase.Install(Int32 pluginTicks, String installDirectory, String configDirectory, String plugin, String additionalArguments, IDictionary`2 environmentVariables)
   at Elastic.Installer.Domain.Configuration.Plugin.ElasticsearchPluginStateProvider.Install(Int32 pluginTicks, String installDirectory, String configDirectory, String plugin, String additionalArguments, IDictionary`2 environmentVariables)
   at Elastic.InstallerHosts.Elasticsearch.Tasks.Install.InstallPluginsTask.ExecuteTask()
   at Elastic.InstallerHosts.SessionExtensions.Handle(Session session, Func`1 action)
CustomAction ElasticsearchPluginsAction returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 17:02:51: InstallFinalize. Return value 3.

However I tried installing without ingest-attach and got the same error on the next plugin.

I then attempted with no plugins, and that has worked fine.

So looks like there is some kind of issue with install plugins in general.

@russcam
Copy link
Contributor

russcam commented Apr 9, 2019

@GrandMastaC, @gavinB-orange where do you have Java installed on the machine? You can get this value with

Command Prompt

where java.exe

PowerShell

where.exe java.exe

Also, what is the environment variable JAVA_HOME set to? You can get this with

Command Prompt

echo %JAVA_HOME%

PowerShell

$env:JAVA_HOME

This looks like a quoting issue with the path to Java when calling the plugin install batch file within a process

private static Tuple<int, bool, string> InvokeProcess(Process process, DataReceivedEventHandler processOnOutputDataReceived)
{
process.OutputDataReceived += processOnOutputDataReceived;
var errorsBuilder = new StringBuilder();
var errors = false;
process.ErrorDataReceived += (s, a) =>
{
if (string.IsNullOrEmpty(a.Data)) return;
errorsBuilder.AppendLine(a.Data);
errors = true;
processOnOutputDataReceived(s, a);
};
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
process.WaitForExit();
var exitCode = process.ExitCode;
process.OutputDataReceived -= processOnOutputDataReceived;
process.ErrorDataReceived -= processOnOutputDataReceived;
process.Close();
return Tuple.Create(exitCode, errors, errorsBuilder.ToString());
}

but if you could provide the above details, that would really help in looking into further.

@kgwood39
Copy link

I have the same problem on Windows 10
where java.exe => C:\ProgramData\Oracle\Java\javapath\java.exe

echo %JAVA_HOME% => C:\Program Files (x86)\Java\jre1.8.0_201\

I checked the %JAVA_HOME% environment variable and noticed that it was for my account, not a system wide variable. I changed this to a system variable and reinstalled. It STILL doesn't work.

MSI9b742.LOG
elasticsearch.log

@russcam
Copy link
Contributor

russcam commented Apr 15, 2019

Related: elastic/elasticsearch#30606 and elastic/elasticsearch#33405

A change in one of the batch files that is invoked when the installer performs plugin installation does not handle parentheses in the %JAVA_HOME% environment variable. This has been fixed in later versions.

@GrandMastaC, @kgwood39, @gavinB-orange: For the version you are looking to install, can you install Java to a path that does not contain parentheses e.g. C:\Program Files\Java\jre1.8.0_201 (which should be the default 64 bit installation directory), update %JAVA_HOME% environment variable to point to this location, and try the installation again? Please report back how the installation goes

@kgwood39
Copy link

I uninstalled the 32-bit java and installed 64-bit java and updated my %JAVA_HOME%. I re-downloaded the latest elasticsearch msi installer and attempted to install again. Unfortunately, I get the same result.
MSI51088.LOG

@russcam
Copy link
Contributor

russcam commented Jul 4, 2019

@kgwood39 It looks like a different issue this time

Elastic.InstallerHosts.Elasticsearch.Tasks.Install.SetupXPackPasswordsTask: Setting up X-Pack passwords
[0] Checking Elasticsearch is up and running Checking Elasticsearch is up and running
[0] Checking Elasticsearch is up and running Checking Elasticsearch is up and running
[0] Checking Elasticsearch is up and running Checking Elasticsearch is up and running
[0] Checking Elasticsearch is up and running Checking Elasticsearch is up and running
[0] Checking Elasticsearch is up and running Checking Elasticsearch is up and running
[0] Checking Elasticsearch is up and running Checking Elasticsearch is up and running
[0] Elasticsearch is up and running Elasticsearch is up and running
[0] Changing password for 'elastic' Changing password for 'elastic'
System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Elastic.InstallerHosts.Elasticsearch.Tasks.Install.SetupXPackPasswordsTask.SetPassword(HttpClient client, String elasticUserPassword, String user, String password)
   at Elastic.InstallerHosts.Elasticsearch.Tasks.Install.SetupXPackPasswordsTask.ExecuteTask()
   at Elastic.InstallerHosts.SessionExtensions.Handle(Session session, Func`1 action)

There was a problem in changing the elastic built-in user account. Do you recall the password that you used?

@russcam
Copy link
Contributor

russcam commented Aug 12, 2019

We’re closing this issue due to inactivity; if you’re still in need of resolution, feel free to re-open with the additional details and we'd be glad to help you out 👍

The issue \Common was unexpected at this time related to elastic/elasticsearch#30606 and elastic/elasticsearch#33405 has been fixed.

@russcam russcam closed this as completed Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants