Closed
Description
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:ParallelGCThreads=N
OS: CENTOS7.2
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-b15)
OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode)
failed to start elasticsearch service...
Activity
jasontedor commentedon Dec 17, 2016
Some OpenJDK package maintainers (the RedHat line for sure) decided to start shipping their OpenJDK packages with
-XX:+AssumeMP
enabled by default. Frankly I think that this is a mistake, but that is what leads to the message that you're seeing here. You can disable this by starting the JVM with-XX:-AssumeMP
(either add it toES_JAVA_OPTS
, or add it tojvm.options
if you're on Elasticsearch 5.x (please include the version in future issues)).antboll commentedon Jan 15, 2018
Hi,
I got the same Problem with Elasticsearch 5.x and centOS. Unfortunately I`m not very familiar to Linux. Which Command do I have to add into jvm.options to get the Service startet?
KeithTt commentedon Jan 15, 2018
There is a file named jvm.options at
/etc/elasticsearch/jvm.options
, just add-XX:+AssumeMP
to this file.flyinghawker commentedon Aug 15, 2018
I encounter same issue again and try to follow the idea @KeithTt
but not
/etc/elasticsearch/jvm.options
,elasticsearch-6.3.2/config/jvm.options
instead,adding
-XX:+AssumeMP
. Error still exsits.centos_7_04_64_20G
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
jasontedor commentedon Aug 15, 2018
@flyinghawker You want
-XX:-AssumeMP
, not-XX:+AssumeMP
.flyinghawker commentedon Aug 15, 2018
@jasontedor Thanks for the tricky detail notice. And setting -Xms?? and -Xmx?? also matters for me because my testing server RAM is only 1G, have to reduce to be lower than the free part of it. Thanks.
SaiDesabathina commentedon Nov 18, 2018
How do I add -XX:+AssumeMP if I am using a Docker. Where should I search for files
jasontedor commentedon Nov 18, 2018
@SaiDesabathina I am happy to try to help but first I have some questions:
SaiDesabathina commentedon Nov 18, 2018
@jasontedor Thanks for coming forward to help. I will explain my problem clearly. It should answer your questions. I downloaded elastic search (6.5.0), kibana (6.5.0) and logstash (6.5.0) images from Elastic website. I was successful in launching elastic search and kibana containers and following this I was trying to link logstash with elastic search. I am doing by following a youtube tutorial. To link logstash and elastic search I ran the following command:
docker run -h logstash --name logstash_a --link elasticsearch_1:elasticsearch -it
--rm -v "SPwD":/config-dir logstash:6.5.0 -f /config-dir/logstash.config
This came up with the following error:
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:ParallelGCThreads=N
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c5330000, 986513408, 0) failed; error='Cannot allocate memory' (errno=12)
There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (mmap) failed to map 986513408 bytes for committing reserved memory.
An error report file with more information is saved as:
/usr/share/logstash/hs_err_pid1.log
Could you please help me in launching logstash container and linking it with elastic search. Do you have any tutorial that I can use to learn.
Regards
Sai
jasontedor commentedon Nov 18, 2018
I still can not tell if you’re using the official Elastic Docker images or not. It appears not, but I would prefer to not assume. Ultimately your problem is not related to
-XX:-AssumeMP
. Your problem is that you have insufficient memory. The JVM is trying to reserve 1 GB of heap and you do not have that available, that is what the log message is telling you. We have elastic/stack-docker for help orchestrating a full Elastic Stack via Docker containers. After you have addressed the fact that you have insufficient memory to start the containers that you’re trying to start, I suggest that you look there for ideas on orchestrating a full Elastic Stack via Docker. Finally, we have gotten off track from what this issue is about:-XX:-AssumeMP
. I would ask that if you have further questions that you please use the forums. We reserve GitHub for verified bug reports and feature requests.WilburXu commentedon Jun 27, 2019
thanks!
tvernum commentedon Jun 27, 2019
@WilburXu You want
-XX:-AssumeMP
which turns off this option, (not+AssumeMP
which turns it on).