How to fix " Failed starting 'elasticsearch-service-x64' service"

Trying to install the Elasticsearch + logstash + Kibana + Beats in Windows 10 64bit
--.1 Installed Java Jdk 12 ok.
--.2 Downloaded 'Windows sha' from https://www.elastic.co/downloads/elasticsearch
--.3 Unzipped elasticsearch-7.0.0-windows-x86_64 to my elastic stack directory. D:\elasticsearch-stack

-- 4. In PowerShell Administrator mode, trying to install the Elasticsearch-service as follows:

Invoke-Expression -command "D:\elasticsearch-stack\elasticsearch-7.0.0-windows-x86_64\elasticsearch-7.0.0.\bin\service install"
--. 5 Results:

D:\elasticsearch-stack\elasticsearch-7.0.0-windows-x86_64\elasticsearch-7.0.0.\bin\service : The term
'D:\elasticsearch-stack\elasticsearch-7.0.0-windows-x86_64\elasticsearch-7.0.0.\bin\service' is not recognized as the
name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1

  • D:\elasticsearch-stack\elasticsearch-7.0.0-windows-x86_64\elasticsear ...
  •   + CategoryInfo          : ObjectNotFound: (D:\elasticsearc....0.\bin\service:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

--.6 Troubleshooting:
Then typed as follows:
D:\elasticserarch-stack\elasticsearch-7.0.0-windows-x86_64\elasticsearch-7.0.0\bin> .\elasticsearch-service.bat start

--.7 Results:
"Failed starting 'elasticsearch-service-x64' service"

Just to be clear, you need to be downloading from this link - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.0.0-windows-x86_64.zip

Not the SHA.

Thanks @warkolm I downloaded it from your link. Repeated the steps as listed earlier. Get the same results. No progress :frowning:

@warkolm Thank you for your help.
Problem Fixed. Solution as follows:
Note: quotes and vertical bars below are for illustration purposes, no need to enter. And the vertical bar, is list the sequence of commands:
--. In Windows 10, navigate to System Variables: Control Panel | | System | Advanced System- Settings | System Properties | Environmental Variables (button):
--. Added a system variable:
Variable name: JAVA_HOME
Variable value: C:\Program Files\Java\jdk-12.0.1
Press 'OK"
-- Add environmental variable:
Click on 'New" button
Added this: "C:\Program Files\Java\jdk--12.0.1\bin
Press "OK" button
Press "OK" in System Properties window.

Verify as follows:
--. Using Windows Dos-command: Type
java version

Results displayed:
"java version "12.0.1" 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)"

--. or use PowerShell, type (this vertical must be type:
"Get-Command java | Select-Object version"
Results displayed:
" Version
12.0.1.0"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.