-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Elasticsearch 7.0.0-alpha2 elasticsearch-plugin \Common is not expected at this time. #38578
Comments
Pinging @elastic/es-core-infra |
Tracing it a bit down the rabbithole, it seems there is issue with elasticsearch-env.bat >set ES_DISTRIBUTION_TYPE=zip
\Common was unexpected at this time.
> for /f "tokens=* usebackq" %a in (`""C:\Program Files (x86)\Common Files\Oracle\Java
\javapath\java.exe" -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.TempDirectory""`) do set
ES_TMPDIR=%a These are coming from elasticsearch-env.bat set ES_DISTRIBUTION_TYPE=zip
if not defined ES_TMPDIR (
for /f "tokens=* usebackq" %%a in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.TempDirectory""`) do set ES_TMPDIR=%%a
) There seems to be extra " before %JAVA% and also one after "org.elasticsearch.tools.launchers.TempDirectory" I got it to work by changing last rows in elasticsearch-env.bat to if not defined ES_TMPDIR (
for /f "tokens=* usebackq" %%a in ('%JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.TempDirectory"') do set ES_TMPDIR=%%a
) using ' instead of `" and "` |
In the long run we want to move all of startup to a Java program. This will simplify our startup scripts and make maintenance of startup less dependent on the underlying platform that we run on. This commit moves the creation of the temporary directory off of system-dependent commands and onto a simple Java program.
Thanks for reporting this @krisavi a quick reproduction failed on my end though. Using
Installs fine on my end. Both Will try and mimic your environment more closely next |
Can reproduce if no |
When %JAVA% gets inferred from %PATH% trying to resolve %ES_TMPDIR% failed. If %JAVA_HOME% was set explicitly this did not cause an error.
the elasticsearch.bat and elasticsearch-env.bat won't work if JAVA contains parentheses. This seems to be the limitation of FOR /F IN (command) DO syntax. The JAVA variable present in a command contains a path to a binary to start elasticsearch (with spaces & parens). We can workaround the problem of spaces and parentheses in this path by referring this variable with a CALL command. Note that executing binaries with CALL is an undocumented behaviour (but works) closes #38578 closes #38624 closes #33405 closes #30606
…39712) the elasticsearch.bat and elasticsearch-env.bat won't work if JAVA contains parentheses. This seems to be the limitation of FOR /F IN (command) DO syntax. The JAVA variable present in a command contains a path to a binary to start elasticsearch (with spaces & parens). We can workaround the problem of spaces and parentheses in this path by referring this variable with a CALL command. Note that executing binaries with CALL is an undocumented behaviour (but works) closes elastic#38578 closes elastic#38624 closes elastic#33405 closes elastic#30606
the elasticsearch.bat and elasticsearch-env.bat won't work if JAVA contains parentheses. This seems to be the limitation of FOR /F IN (command) DO syntax. The JAVA variable present in a command contains a path to a binary to start elasticsearch (with spaces & parens). We can workaround the problem of spaces and parentheses in this path by referring this variable with a CALL command. Note that executing binaries with CALL is an undocumented behaviour (but works) closes elastic#38578 closes elastic#38624 closes elastic#33405 closes elastic#30606
the elasticsearch.bat and elasticsearch-env.bat won't work if JAVA contains parentheses. This seems to be the limitation of FOR /F IN (command) DO syntax. The JAVA variable present in a command contains a path to a binary to start elasticsearch (with spaces & parens). We can workaround the problem of spaces and parentheses in this path by referring this variable with a CALL command. Note that executing binaries with CALL is an undocumented behaviour (but works) closes elastic#38578 closes elastic#38624 closes elastic#33405 closes elastic#30606
…40768) the elasticsearch.bat and elasticsearch-env.bat won't work if JAVA contains parentheses. This seems to be the limitation of FOR /F IN (command) DO syntax. The JAVA variable present in a command contains a path to a binary to start elasticsearch (with spaces & parens). We can workaround the problem of spaces and parentheses in this path by referring this variable with a CALL command. Note that executing binaries with CALL is an undocumented behaviour (but works) closes #38578 closes #38624 closes #33405 closes #30606 backports: * Bat scripts to work with JAVA_HOME with parentheses(#39712) * Link to SYSTEM_JAVA_HOME on windows (#40806)
the elasticsearch.bat and elasticsearch-env.bat won't work if JAVA contains parentheses. This seems to be the limitation of FOR /F IN (command) DO syntax. The JAVA variable present in a command contains a path to a binary to start elasticsearch (with spaces & parens). We can workaround the problem of spaces and parentheses in this path by referring this variable with a CALL command. Note that executing binaries with CALL is an undocumented behaviour (but works) closes elastic#38578 closes elastic#38624 closes elastic#33405 closes elastic#30606
Elasticsearch version
Version: 7.0.0-alpha2, Build: unknown/unknown/a30e8c2/2018-12-17T12:33:32.311168Z, JVM: 1.8.0_172
JVM version
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
OS version
Windows Server 2012 R2 Datacenter
Description of the problem including expected versus actual behavior:
Expected to have plugin installed like it worked in previous version.
Steps to reproduce:
Upgraded from 6.3.2 to 7.0.0-alpha2 and during install when used old config it ran into errors.
Turned off geoip ingest plugin let the install to finish. Thought I can enable it again after install, but it seems it is not working.
Did not upgrade Java, from google search it seemed that at some point java update caused similar issues, but this time Java was not updated.
Not sure if it is due to this error, but new version does not start.
The text was updated successfully, but these errors were encountered: