curl -x GET "localhost:9200"
I received an error as following:
Error:curl (7): Failed to connect to localhost port 9200: Connection refused
So what can I do?
Using sudo service elasticsearch status, there is a red light. It tells me there was not insufficient memory for the Java Virtual Machine.
Then modify /etc/elasticsearch/jvm.options file:
# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
#-Xms2g
#-Xms2g
-Xms512m
-Xmx512m
run sudo systemctrl restart elasticsearch again,
check the status: sudo service elasticsearch status. You will see the green light.
No comments:
Post a Comment