Killed solution after ElasticSearch started

This problem has been plagued me for a long time.It was almost since last week that my ElasticSearch would report this error as soon as it was started, anyway, it was very speechless.

Insert picture description here
Today I have finally solved it. Record it, it may be the following configuration problems:

  1. jvm.options configuration memory parameters
    This is to directly modify the memory allocated by the JVM to elasticSearch.
    It is best to modify these two parameters to the following parameter settings:
修改之前
-Xms1g
-Xmx1g
修改之后
-Xms256m
-Xmx256m

But we may also encounter this problem after starting elasticSearch in the future: if this problem occurs, we also need to add the following code to the file:OpenJDK 64-Bit Server VM warning:If the number of processors is expected to increase from one,then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCTheads=Need

-XX:-AssumeMP
  1. Elasticsearch startup file parameters
    My problem lies here, and this problem is still hidden deep, not so easy to find.
    This is the most biggest pit, generally this part of the information does not exist or it is indeed possible after startup I can read our configuration information about jvm.options, but mine just can't read it, so I can only manually write it to death. When
    we start elasticSearch, the elasticSearch startup file will also introduce some configuration, we need to modify it Part of the configuration:
    Insert picture description here
    My understanding is that when he starts up, he will introduce the relevant information in the jvm.optionsfileJVM内存配置 . But it is obvious that this does not take effect , so we directly configure the memory configuration information for him here and configure it with us in jvm.options The same parameters in the file . So we start our elasticSearch again and it will start normally.

And here is a recommended startup command for elasticSearch:

nohup ./elasticsearch &

We start elasticSearch through the above command, and we can continue to execute our code below on this interface.
Insert picture description here
Here we restart our elasticSearch, and we will find that it has been able to start normally. The
Insert picture description here
code word is not easy, if you think it is helpful to you, you can Pay attention to my public account, the newcomer up needs your support!!!
Insert picture description here
Don't watch it, you are also beautiful!

Keep watching, you look better!

Guess you like

Origin blog.csdn.net/lovely__RR/article/details/111400296