# Service stop each 15 or 20 minutes

**URL:** <https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765>\
**Category:** Elasticsearch\
**Created:** [May 15, 2015, 5:45pm UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765 "2015-05-15T17:45:14Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_felipe\_urrego\_m](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@john\_felipe\_urrego\_m](https://discuss.elastic.co/u/john_felipe_urrego_m)\
**Post date:** [May 15, 2015, 5:45pm UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765/1 "2015-05-15T17:45:14Z")

</div>

274.9 MB of 2 GB Used / 1.73 GB Free

And each 20 minutes i need do this:

sudo /etc/init.d/elasticsearch start  
curl -XGET 'localhost:9200'

Please give me instructions  
Tnks

---

<div class="post-metadata">

**Author:** ![tylerjl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylerjl/32/44965_2.png) [@tylerjl](https://discuss.elastic.co/u/tylerjl)\
**Post date:** [May 15, 2015, 8:18pm UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765/2 "2015-05-15T20:18:13Z")

</div>

Hi there!

The first step here would be to find information regarding why elasticsearch is stopping. Look in `/var/log/elasticsearch` for logs, you should find logs that match your cluster name. Start at the most recent logs and you should find information regarding why elasticsearch stopped.

Also, what Linux distribution are you running, and are you running this machine locally or with a cloud provider like Amazon EC2?

---

<div class="post-metadata">

**Author:** ![john\_felipe\_urrego\_m](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@john\_felipe\_urrego\_m](https://discuss.elastic.co/u/john_felipe_urrego_m)\
**Post date:** [May 18, 2015, 6:16pm UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765/3 "2015-05-18T18:16:45Z")

</div>

/var/log/elasticsearch/elasticsearch.log:

[2015-05-15 13:41:59,546][INFO][node] [Polaris] version[1.5.2], pid[24783], build[62ff986/2015-04-27T09:21:06Z]  
[2015-05-15 13:41:59,649][INFO][node] [Polaris] initializing ...  
[2015-05-15 13:41:59,702][INFO][plugins] [Polaris] loaded [], sites []  
[2015-05-15 13:42:13,185][INFO][node] [Polaris] initialized  
[2015-05-15 13:42:13,186][INFO][node] [Polaris] starting ...  
[2015-05-15 13:42:13,482][INFO][transport] [Polaris] bound\_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish\_address {inet[/198.38.86.148:9300]}  
[2015-05-15 13:42:13,740][INFO][discovery] [Polaris] elasticsearch/zk4QOPRzTx-jkIAnofS0iw  
[2015-05-15 13:42:17,519][INFO][cluster.service] [Polaris] new\_master [Polaris][zk4QOPRzTx-jkIAnofS0iw][vps][inet[/198.38.86.148:9300]], reason: zen-disco-join (elected\_as\_master)  
[2015-05-15 13:42:17,578][INFO][http] [Polaris] bound\_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish\_address {inet[/198.38.86.148:9200]}  
[2015-05-15 13:42:17,578][INFO][node] [Polaris] started  
[2015-05-15 13:42:18,852][INFO][gateway] [Polaris] recovered [2] indices into cluster\_state

/var/log/elasticsearch/elasticsearch.log.2015-05-14:

[2015-05-14 14:04:47,459][INFO][node] [Shard] version[1.5.2], pid[15066], build[62ff986/2015-04-27T09:21:06Z]  
[2015-05-14 14:04:47,460][INFO][node] [Shard] initializing ...  
[2015-05-14 14:04:47,473][INFO][plugins] [Shard] loaded [], sites []  
[2015-05-14 14:05:23,613][INFO][node] [Shard] initialized  
[2015-05-14 14:05:23,614][INFO][node] [Shard] starting ...  
[2015-05-14 14:05:24,053][INFO][transport] [Shard] bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/198.38.86.148:9301]}  
[2015-05-14 14:05:24,073][INFO][discovery] [Shard] elasticsearch/av4OPSwvQj6OQ0t-rCGfcw  
[2015-05-14 14:05:27,162][INFO][cluster.service] [Shard] detected\_master [Carlos Lobo][FpOGGoj6RGyFGZT2-qOpLg][vps][inet[/198.38.86.148:9300]], added {[Carlos Lobo][FpOGGoj6RGyFGZT2-qOpLg][vps][inet[/198.38.86.148:9300]],}, reason: zen-disco-receive(from master [[Carlos Lobo][FpOGGoj6RGyFGZT2-qOpLg][vps][inet[/198.38.86.148:9300]]])  
[2015-05-14 14:05:27,177][INFO][http] [Shard] bound\_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish\_address {inet[/198.38.86.148:9200]}  
[2015-05-14 14:05:27,181][INFO][node] [Shard] started  
[2015-05-14 21:20:43,419][INFO][node] [Scanner] version[1.5.2], pid[19203], build[62ff986/2015-04-27T09:21:06Z]  
[2015-05-14 21:20:43,436][INFO][node] [Aleksei Sytsevich] version[1.5.2], pid[19188], build[62ff986/2015-04-27T09:21:06Z]  
[2015-05-14 21:20:43,527][INFO][node] [Scanner] initializing ...  
[2015-05-14 21:20:43,527][INFO][node] [Aleksei Sytsevich] initializing ...  
[2015-05-14 21:20:43,605][INFO][plugins] [Scanner] loaded [], sites []  
[2015-05-14 21:20:43,605][INFO][plugins] [Aleksei Sytsevich] loaded [], sites []  
[2015-05-14 21:20:51,293][INFO][node] [Scanner] initialized  
[2015-05-14 21:20:51,294][INFO][node] [Scanner] starting ...  
[2015-05-14 21:20:51,323][INFO][node] [Aleksei Sytsevich] initialized  
[2015-05-14 21:20:51,324][INFO][node] [Aleksei Sytsevich] starting ...  
[2015-05-14 21:20:51,704][INFO][transport] [Aleksei Sytsevich] bound\_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish\_address {inet[/198.38.86.148:9300]}  
[2015-05-14 21:20:51,713][INFO][transport] [Scanner] bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/198.38.86.148:9301]}  
[2015-05-14 21:20:51,843][INFO][discovery] [Scanner] elasticsearch/WsMtHcI9S6mvvmw68bAGgQ  
[2015-05-14 21:20:51,844][INFO][discovery] [Aleksei Sytsevich] elasticsearch/iDNXQbGaSQCbtDBgVISQCg  
[2015-05-14 21:20:54,902][INFO][cluster.service] [Scanner] new\_master [Scanner][WsMtHcI9S6mvvmw68bAGgQ][vps][inet[/198.38.86.148:9301]], reason: zen-disco-join (elected\_as\_master)  
[2015-05-14 21:20:54,908][INFO][cluster.service] [Scanner] added {[Aleksei Sytsevich][iDNXQbGaSQCbtDBgVISQCg][vps][inet[/198.38.86.148:9300]],}, reason: zen-disco-receive(join from node[[Aleksei Sytsevich][iDNXQbGaSQCbtDBgVISQCg][vps][inet[/198.38.86.148:9300]]])  
[2015-05-14 21:20:54,925][INFO][cluster.service] [Aleksei Sytsevich] detected\_master [Scanner][WsMtHcI9S6mvvmw68bAGgQ][vps][inet[/198.38.86.148:9301]], added {[Scanner][WsMtHcI9S6mvvmw68bAGgQ][vps][inet[/198.38.86.148:9301]],}, reason: zen-disco-receive(from master [[Scanner][WsMtHcI9S6mvvmw68bAGgQ][vps][inet[/198.38.86.148:9301]]])  
[2015-05-14 21:20:54,929][INFO][http] [Scanner] bound\_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish\_address {inet[/198.38.86.148:9200]}  
[2015-05-14 21:20:54,929][INFO][node] [Scanner] started  
[2015-05-14 21:20:54,951][INFO][http] [Aleksei Sytsevich] bound\_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish\_address {inet[/198.38.86.148:9201]}  
[2015-05-14 21:20:54,952][INFO][node] [Aleksei Sytsevich] started  
[2015-05-14 21:20:56,635][INFO][gateway] [Scanner] recovered [1] indices into cluster\_state  
[2015-05-14 21:22:23,128][INFO][cluster.metadata] [Scanner] [sayit] deleting index  
[2015-05-14 21:22:23,419][INFO][cluster.metadata] [Scanner] [sayit] creating index, cause [api], templates [], shards [5]/[1], mappings []  
[2015-05-14 21:22:23,952][INFO][cluster.metadata] [Scanner] [sayit] create\_mapping [modelresult]  
[2015-05-14 21:22:24,483][INFO][cluster.metadata] [Scanner] [sayit] update\_mapping [modelresult] (dynamic)  
[2015-05-14 21:23:16,356][INFO][cluster.metadata] [Scanner] [sayit\_write] creating index, cause [api], templates [], shards [5]/[1], mappings []  
[2015-05-14 21:23:16,994][INFO][cluster.metadata] [Scanner] [sayit\_write] create\_mapping [modelresult]  
[2015-05-14 21:23:17,455][INFO][cluster.metadata] [Scanner] [sayit\_write] update\_mapping [modelresult] (dynamic)  
[2015-05-14 22:57:31,374][INFO][discovery.zen] [Aleksei Sytsevich] master\_left [[Scanner][WsMtHcI9S6mvvmw68bAGgQ][vps][inet[/198.38.86.148:9301]]], reason [transport disconnected]  
[2015-05-14 22:57:31,390][WARN][discovery.zen] [Aleksei Sytsevich] master left (reason = transport disconnected), current nodes: {[Aleksei Sytsevich][iDNXQbGaSQCbtDBgVISQCg][vps][inet[/198.38.86.148:9300]],}  
[2015-05-14 22:57:31,391][INFO][cluster.service] [Aleksei Sytsevich] removed {[Scanner][WsMtHcI9S6mvvmw68bAGgQ][vps][inet[/198.38.86.148:9301]],}, reason: zen-disco-master\_failed ([Scanner][WsMtHcI9S6mvvmw68bAGgQ][vps][inet[/198.38.86.148:9301]])  
[2015-05-14 22:57:35,286][INFO][cluster.service] [Aleksei Sytsevich] new\_master [Aleksei Sytsevich][iDNXQbGaSQCbtDBgVISQCg][vps][inet[/198.38.86.148:9300]], reason: zen-disco-join (elected\_as\_master)

---

<div class="post-metadata">

**Author:** ![john\_felipe\_urrego\_m](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@john\_felipe\_urrego\_m](https://discuss.elastic.co/u/john_felipe_urrego_m)\
**Post date:** [May 18, 2015, 6:23pm UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765/4 "2015-05-18T18:23:10Z")

</div>

felipe@vps:~$ lsb\_release -a  
No LSB modules are available.  
Distributor ID: Ubuntu  
Description: Ubuntu 14.04.1 LTS  
Release: 14.04  
Codename: trusty

---

<div class="post-metadata">

**Author:** ![john\_felipe\_urrego\_m](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@john\_felipe\_urrego\_m](https://discuss.elastic.co/u/john_felipe_urrego_m)\
**Post date:** [May 19, 2015, 4:09pm UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765/5 "2015-05-19T16:09:15Z")

</div>

Hello @tylerjl, please help me to solve this issue

---

<div class="post-metadata">

**Author:** ![tylerjl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylerjl/32/44965_2.png) [@tylerjl](https://discuss.elastic.co/u/tylerjl)\
**Post date:** [May 19, 2015, 7:15pm UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765/6 "2015-05-19T19:15:14Z")

</div>

The root cause isn't immediately apparent from the logs, so some additional questions to consider:

- Are you using a cloud hosting provider? If you are and you have not modified your configuration file to disable multicast, then your cluster may be communicating with other clusters, causing problems. This could be the cause of the messages about masters leaving the cluster in your logs.
- What is your cluster topology? That is, how many nodes do you have, and where are they? If you are only running one machine, the logs indicate more than one is in the cluster, which is a problem (your cluster is communicating with the outside world)
- If there really are no stack traces or error messages in the elasticsearch logs, you may want to look in `/var/log/syslog` to see if there are any messages about the kernel killing elasticsearch for some reason (OOM killer, etc.)

---

<div class="post-metadata">

**Author:** ![john\_felipe\_urrego\_m](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@john\_felipe\_urrego\_m](https://discuss.elastic.co/u/john_felipe_urrego_m)\
**Post date:** [May 21, 2015, 3:36am UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765/8 "2015-05-21T03:36:11Z")

</div>

@tylerjl i do this nothing more:  
apt-get install git curl nano  
git clone [https://gist.github.com/8265589463915837429d.git](https://gist.github.com/8265589463915837429d.git)  
clone this [https://gist.github.com/ricardo-rossi/8265589463915837429d](https://gist.github.com/ricardo-rossi/8265589463915837429d)  
cd 8265589463915837429d/  
./ElasticSearch.sh 1.5.2

I have Droplets in digitalocean:  
Name Status Memory Disk Region  
actasfelipe Active 2 GB 40 GB nyc3

I dont disable multicast only ./ElasticSearch.sh 1.5.2

---

<div class="post-metadata">

**Author:** ![tylerjl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylerjl/32/44965_2.png) [@tylerjl](https://discuss.elastic.co/u/tylerjl)\
**Post date:** [May 21, 2015, 4:08pm UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765/9 "2015-05-21T16:08:05Z")

</div>

The script you used to install elasticsearch is from a third-party and installing elasticsearch in an unsupported way (it's using scripts from a repository that is marked as deprecated.) At this point it's hard to tell what state elasticsearch is in because everything the scripts have done.

It's probably best to start fresh and follow the [guide for installing with APT repos](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html), as that's the way we distribute elasticsearch for Linux distributions. I would use new machines, as the previous installation may have done things oddly and could possibly conflict in some way.

Follow that guide to install elasticsearch, then please read the documentation on [important configuration changes](https://www.elastic.co/guide/en/elasticsearch/guide/master/_important_configuration_changes.html) before proceeding. There's some important items in there, particularly disabling multicast: if you do not take that step, elasticsearch will send broadcasts advertising its presence and cluster with anyone that replies, which exposes your machine to (possibly) malicious outsiders.

---

<div class="post-metadata">

**Author:** ![john\_felipe\_urrego\_m](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@john\_felipe\_urrego\_m](https://discuss.elastic.co/u/john_felipe_urrego_m)\
**Post date:** [May 23, 2015, 9:10pm UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765/10 "2015-05-23T21:10:58Z")

</div>

@tylerjl only set discovery.zen.ping.multicast.enabled: false?

---

<div class="post-metadata">

**Author:** ![tylerjl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylerjl/32/44965_2.png) [@tylerjl](https://discuss.elastic.co/u/tylerjl)\
**Post date:** [May 26, 2015, 4:49pm UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765/11 "2015-05-26T16:49:03Z")

</div>

That is how to disable multicast, yes. But please consider installing elasticsearch in [the supported way for APT distributions](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html) if you still encounter problems.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:11am UTC](https://discuss.elastic.co/t/service-stop-each-15-or-20-minutes/765/12 "2017-07-06T00:11:51Z")

</div>


