Xubuntu [SOLVED]: cannot get elasticsearch service to run in ubuntu 17?

Xubuntu [SOLVED]: cannot get elasticsearch service to run in ubuntu 17?

Home Forums Xubuntu Xubuntu [SOLVED]: cannot get elasticsearch service to run in ubuntu 17?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36873

    Anonymous

    QuestionQuestion

    I am following the steps here to install and get elasticsearch to work.

    https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-ubuntu-16-04

    I have a ubuntu 17 and i am logged in as non root user with sudo rights.

    I did the following steps

    sudo apt-get update
    
    wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.1.deb
    
    sudo dpkg -i elasticsearch-6.1.1.deb
    
    sudo systemctl enable elasticsearch.service
    
    sudo systemctl start elasticsearch
    

    Finally when i test using

    curl -X GET 'http://localhost:9200'
    

    I get the following error

    curl: (7) Failed to connect to localhost port 9200: Connection refused
    

    Also when i do

    service --status-all
    

    i donot see elasticsearch service listed in the services list.

    Please note that i have ufw installed and i have the following ports open

    To                         Action      From
    --                         ------      ----
    22/tcp                     ALLOW       Anywhere
    443/tcp                    ALLOW       Anywhere
    80/tcp                     ALLOW       Anywhere
    22/tcp (v6)                ALLOW       Anywhere (v6)
    443/tcp (v6)               ALLOW       Anywhere (v6)
    80/tcp (v6)                ALLOW       Anywhere (v6)
    

    could this be preventing the 9200 port but that doesnt seem likely since internal communications should be allowed.

    UPDATE:

    Here is the output i am getting with sudo journalctl -f

    -- Logs begin at Fri 2017-12-29 10:27:23 +0545. --
    Dec 30 13:31:40  elasticsearch[29595]: #
    Dec 30 13:31:40  elasticsearch[29595]: # There is insufficient memory for the Java Runtime Environment to continue.
    Dec 30 13:31:40  elasticsearch[29595]: # Native memory allocation (mmap) failed to map 986513408 bytes for committing reserved memory.
    Dec 30 13:31:40  elasticsearch[29595]: # An error report file with more information is saved as:
    

    I checked the free memory using free -m command

    enter image description here

    #36874

    Anonymous

    Accepted AnswerAnswer

    First, you should enable journalctl so we can gain some insights about what is going on.

    Since it seems to be a memory issue (you have 1GB on your VPS and ES is pre-configured with 1GB heap), you have two options:

    1. decrease the heap in config/jvm.options
    2. or increase your VPS RAM

    Source: https://stackoverflow.com/questions/48031762/cannot-get-elasticsearch-service-to-run-in-ubuntu-17
    Author: Val
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.