Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pelligrag/e1e0384f3da02240a70d2870d00bf4af to your computer and use it in GitHub Desktop.
Save pelligrag/e1e0384f3da02240a70d2870d00bf4af to your computer and use it in GitHub Desktop.

Revisions

  1. @dragonfire1119 dragonfire1119 created this gist Dec 18, 2019.
    21 changes: 21 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    1) Edit elasticsearch service unit file using the following command

    sudo systemctl edit elasticsearch.service
    This command will create a file

    /etc/systemd/system/elasticsearch.service.d/override.conf
    2) Now, add the following lines in the unit file.

    [Service]
    Restart=always
    3) Save the file .

    ctrl+x > Y > Enter
    4) Refresh the unit file using command

    sudo systemctl daemon-reload
    5) Can check the changes using command

    sudo systemctl cat elasticsearch.service

    Link: https://stackoverflow.com/questions/52624720/how-to-auto-restart-elasticsearch-search-once-crashed-on-linux-server