# Initial attempt at installing Elasticsearch not going well - Windows Server 2016

**URL:** <https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923>\
**Category:** Elasticsearch\
**Created:** [January 20, 2019, 4:54am UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923 "2019-01-20T04:54:31Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamuzz](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kamuzz](https://discuss.elastic.co/u/kamuzz)\
**Post date:** [January 20, 2019, 4:54am UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/1 "2019-01-20T04:54:31Z")

</div>

Am trying to perform my first install of Elasticsearch; and I can't get the service to start.

We always put our OS and programs on one drive and then the bulk of the data on a second drive. So in this case Windows and Program Files\Elastic\Elasticsearch are on C. And then on E we have Elastic\Elasticsearch\Config; Elastic\Elasticsearch\Data; and Elastic\Elasticsearch\Logs.

Trying to start elasticsearch from the command line returns:  
Error opening log file 'logs/gc.log': No such file or directory.

And then I found a bunch of posts talking about not being able to use different drives, but they were quite old. Is this still an issue? Or do I have to change config somewhere?

elasticsearch.yml looks correct:  
path.logs: E:\Elastic\Elasticsearch\Logs

Thanks

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [January 20, 2019, 4:43pm UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/2 "2019-01-20T16:43:10Z")

</div>

I have seen this error when trying to run Elasticsearch with a 32 bit JVM. Elasticsearch requires a 64 bit JVM. Make sure you have installed a 64 bit JVM and that the `JAVA_HOME` environment variable points to that 64 bit JVM. If the `JAVA_HOME` points to a directory that has `(x86)` in its name, then you are trying to use a 32 bit JVM.

---

<div class="post-metadata">

**Author:** ![kamuzz](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kamuzz](https://discuss.elastic.co/u/kamuzz)\
**Post date:** [January 20, 2019, 8:41pm UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/3 "2019-01-20T20:41:22Z")

</div>

Hi abdon,

Can't find any trace of 32 bit Java on that server. (It is a brand new one that I created specifically for this purpose.)

Maybe something is not correct with the Java ? Here is the output from elasticsearch.exe --debug-env

* * *

## Java

Java paths

- current = C:\Program Files\Java\jdk-11.0.2\bin\java.exe  
Java Candidates (in order of precedence)
- JavaHomeProcessVariable = C:\Program Files\Java\jdk-11.0.2
- JavaHomeUserVariable =
- JavaHomeMachineVariable = C:\Program Files\Java\jdk-11.0.2
- JdkRegistry64 = C:\Program Files\Java\jdk-11.0.2
- JreRegistry64 =
- JdkRegistry32 =
- JreRegistry32 =  
Java checks
- Using32BitJava = False
- JAVA\_HOME as machine and user variable = False

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [January 20, 2019, 9:34pm UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/4 "2019-01-20T21:34:36Z")

</div>

I think you are hitting this issue: [https://github.com/elastic/windows-installers/issues/249](https://github.com/elastic/windows-installers/issues/249)

Can you try configuring GC logging directory in the `jvm.options` configuration file? There should be a header `# JDK 9+ GC logging` in the file. Just below that, change the `logs` in the path `logs/gc.log` into your log directory.

---

<div class="post-metadata">

**Author:** ![kamuzz](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kamuzz](https://discuss.elastic.co/u/kamuzz)\
**Post date:** [January 21, 2019, 2:05am UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/5 "2019-01-21T02:05:24Z")

</div>

Well, this file path seems to work  
file=/E/Elastic/Elasticsearch/Logs/gc.log

And the error I get now is

[Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.  
0.005s][error][logging] Error opening log file '/E/Elastic/Elasticsearch/Logs/gc.log': No such file or directory

Unhandled Exception:  
C:\Program Files\Elastic\Elasticsearch\6.5.4\bin\>file=/E/Elastic/Elasticsearch/Logs/gc.log

Both the data and logs directories are empty. Is this expected after an install?

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [January 21, 2019, 9:52am UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/6 "2019-01-21T09:52:23Z")

</div>

Can you try configuring `file=E:\Elastic\Elasticsearch\Logs\gc.log` instead?

---

<div class="post-metadata">

**Author:** ![kamuzz](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kamuzz](https://discuss.elastic.co/u/kamuzz)\
**Post date:** [January 21, 2019, 9:25pm UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/7 "2019-01-21T21:25:03Z")

</div>

Good morning. Ready to start again? 🙂

file=E:\Elastic\Elasticsearch\Logs\gc.log gives me:

Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

[0.004s][error][logging Invalid -Xlog option '-Xlog:gc\*,gc+age=trace,safepoint:file=E:\Elastic\Elasticsearch\Logs\gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.  
] Invalid decorator '\Elastic\Elasticsearch\Logs\gc.log'.

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [January 25, 2019, 4:50pm UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/8 "2019-01-25T16:50:56Z")

</div>

Here's one more thing to try: surrounding the path by escaped quotes: `\"`. Like this:

```auto
file=\"E:\Elastic\Elasticsearch\Logs\gc.log\"

```

---

<div class="post-metadata">

**Author:** ![kamuzz](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kamuzz](https://discuss.elastic.co/u/kamuzz)\
**Post date:** [January 29, 2019, 3:17am UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/9 "2019-01-29T03:17:33Z")

</div>

Delayed response due to the public holiday yesterday.

This is what I get now:

Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.  
Java HotSpot(TM) 64-Bit Server VM warning: UseAVX=2 is not supported on this CPU, setting it to UseAVX=1  
2019-01-29 13:27:01,991 main ERROR No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See [https://logging.apache.org/log4j/2.x/manual/configuration.html](https://logging.apache.org/log4j/2.x/manual/configuration.html) for instructions on how to configure Log4j 2  
Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: MarkedYAMLException[while scanning an alias  
in 'reader', line 14, column 27:  
\*  
^  
expected alphabetic or numeric character, but found  
in 'reader', line 14, column 28:  
\*  
^

at [Source: sun.nio.ch.ChannelInputStream@9ebe38b; line: 14, column: 25]]; nested: ScannerException[while scanning an alias  
in 'reader', line 14, column 27:  
\*  
^  
expected alphabetic or numeric character, but found  
in 'reader', line 14, column 28:  
\*  
^  
];  
at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1216)  
at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1189)  
at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:100)  
at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:95)  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)  
at org.elasticsearch.cli.Command.main(Command.java:90)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86)  
Caused by: com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException: while scanning an alias  
in 'reader', line 14, column 27:  
\*  
^  
expected alphabetic or numeric character, but found  
in 'reader', line 14, column 28:  
\*  
^

at [Source: sun.nio.ch.ChannelInputStream@9ebe38b; line: 14, column: 25]  
at com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException.from(MarkedYAMLException.java:27)  
at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:343)  
at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:53)  
at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:724)  
at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:699)  
at org.elasticsearch.common.settings.Settings.access$500(Settings.java:84)  
at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1212)  
... 8 more  
Caused by: while scanning an alias  
in 'reader', line 14, column 27:  
\*  
^  
expected alphabetic or numeric character, but found  
in 'reader', line 14, column 28:  
\*  
^

```
    at org.yaml.snakeyaml.scanner.ScannerImpl.scanAnchor(ScannerImpl.java:1439)
    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchAlias(ScannerImpl.java:918)
    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:366)
    at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226)
    at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingValue.produce(ParserImpl.java:585)
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:157)
    at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:167)
    at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:340)
    ... 13 more
```

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [January 29, 2019, 6:41am UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/10 "2019-01-29T06:41:02Z")

</div>

Alright - we're making progress. This new error is related to another configuration file: the `elasticsearch.yml` file. Apparently something is misconfigured on line 14. Can you maybe paste the contents of that file here? (The file should be in E:\Elastic\Elasticsearch\Config)

---

<div class="post-metadata">

**Author:** ![kamuzz](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kamuzz](https://discuss.elastic.co/u/kamuzz)\
**Post date:** [January 30, 2019, 11:16pm UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/11 "2019-01-30T23:16:59Z")

</div>

Here we go:

E:\Elastic\Elasticsearch\Config\elasticsearch.yml contents:

bootstrap.memory\_lock: false  
cluster.name: elasticsearch  
http.port: 9200  
node.data: true  
node.ingest: true  
node.master: true  
node.max\_local\_storage\_nodes: 1  
node.name: RNELASTIC  
path.data: E:\Elastic\Elasticsearch\Data  
path.logs: E:\Elastic\Elasticsearch\Logs  
transport.tcp.port: 9300  
xpack.license.self\_generated.type: basic  
xpack.security.enabled: true  
action.auto\_create\_index: \*

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [January 31, 2019, 6:52am UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/12 "2019-01-31T06:52:15Z")

</div>

You can try removing the last line from that file:

```auto
action.auto_create_index: *

```

That should resolve this issue.

---

<div class="post-metadata">

**Author:** ![kamuzz](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kamuzz](https://discuss.elastic.co/u/kamuzz)\
**Post date:** [January 31, 2019, 11:01pm UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/13 "2019-01-31T23:01:29Z")

</div>

Thanks Abdon

That line was there because the documentation called for it to be added if you didn't know how many indexes you would need.

Removing it did seem to do the trick.

---

<div class="post-metadata">

**Author:** ![codebrain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/codebrain/32/20351_2.png) [@codebrain](https://discuss.elastic.co/u/codebrain)\
**Post date:** [February 15, 2019, 1:03am UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/14 "2019-02-15T01:03:32Z")

</div>

As @abdon has mentioned, this looks very much like this issue:

> <https://github.com/elastic/windows-installers/issues/249>

This is being worked on currently, along with merging in this branch: [https://github.com/elastic/windows-installers/tree/fix/remove-32bit](https://github.com/elastic/windows-installers/tree/fix/remove-32bit) - which will remove 32bit Java support.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 15, 2019, 1:03am UTC](https://discuss.elastic.co/t/initial-attempt-at-installing-elasticsearch-not-going-well-windows-server-2016/164923/15 "2019-03-15T01:03:40Z")

</div>

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