This article recording the installation of various common problems encountered in the process es and solutions
table of Contents
2、type [START_OBJECT] but found [VALUE_STRING]];
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
1,. / Elasticsearch-7.6.1 / bin / elasticsearch newspaper started to kill this issue was not only generate additional log gc, according to the log analysis gc allocated memory problems
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.
已杀死
solve:
Editor vi config / jvm.options file
turn up
-Xms1g
-Xmx1g
Modified to your own machine as could afford to 512m
2、type [START_OBJECT] but found [VALUE_STRING]];
[elsearch@k8a elasticsearch-7.6.1]$ ./bin/elasticsearch
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.
Exception in thread "main" 2020-04-02 10:33:21,459 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
SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: ParsingException[Failed to parse object: expecting token of type [START_OBJECT] but found [VALUE_STRING]];
at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1097)
at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1070)
at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:83)
at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:100)
at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:91)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
Caused by: ParsingException[Failed to parse object: expecting token of type [START_OBJECT] but found [VALUE_STRING]]
at org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken(XContentParserUtils.java:78)
at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:617)
at org.elasticsearch.common.settings.Settings.access$400(Settings.java:82)
at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1093)
solve:
This is because the editor vi config / elasticsearch.yml the wrong key and value lead to double-check where you can find the modified problem
Tips, except between the key and value: there are spaces such as: key: (space) value
3、
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts,
Here are three questions
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
ERROR: Elasticsearch did not exit normally - check the logs at /home/elsearch/elasticsearch-7.6.1/logs/elasticsearch.log
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
solve
Edit files with root user
vi /etc/security/limits.conf
Please es modify your user name corresponding to the start elasticsearch
es hard nofile 65536
es soft nofile 65536
Restart the server can restart es
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
solve:
Modify the configuration to root sysctl.conf
vi /etc/sysctl.conf
Add the following configuration:
vm.max_map_count=655360
And execute the command:
sysctl -p
Then, restart elasticsearch, to start successfully.
[3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts,
solve
modify
vi /conf/elasticsearch.yml
The default is annotated to find, after the save remove comments
cluster.initial_master_nodes: ["node-1"]
Es to restart