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?
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.
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.
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
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 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
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)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.