Elasticsearch 5.0.0 as windows service won't start


(chrisinho) #1

Hi,

i want to start elasticsearch as a windows service. I installed it, but when i try to start it then it it doesn't work. This is the stderr.log

2016-12-15 11:53:41 Commons Daemon procrun stderr initialized
Exception in thread "main" ception: Could not resolve placeholder 'HOSTNAME'
    at org.elasticsearch.common.settings.PropertyPlaceholder.parseStringValue(PropertyPlaceholder.java:116)
    at org.elasticsearch.common.settings.PropertyPlaceholder.replacePlaceholders(PropertyPlaceholder.java:69)
    at org.elasticsearch.common.settings.Settings$Builder.replacePropertyPlaceholders(Settings.java:999)
    at org.elasticsearch.common.settings.Settings$Builder.replacePropertyPlaceholders(Settings.java:959)
    at org.elasticsearch.node.internal.InternalSettingsPreparer.initializeSettings(InternalSettingsPreparer.java:137)
    at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:117)
    at org.elasticsearch.bootstrap.Bootstrap.initialEnvironment(Bootstrap.java:207)
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:247)
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:112)
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:103)
    at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96)
    at org.elasticsearch.cli.Command.main(Command.java:62)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:73)
Refer to the log for complete error details.

How can i fix this? I create an environment variable called hostname and try to set hostname in the .bat, but the error occurs again.


#2

If you are using it in .bat file, are you having it as HOSTNAME or %HOSTNAME% ?


(chrisinho) #3

In .bat i tried

SET HOSTNAME=%COMPUTERNAME%


(system) #4

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