Status 503 in elasticsearch

I get the status 503 error when running the elasticsearch. It was working fine till yesterday, suddenly i am getting this error now.

 status: 503,
 name: "My First Node",
 cluster_name: "Mycluster1",
 version: {
   number: "1.7.2",
   build_hash: "e43676b1385b8125d647f593f7202acbd816e8ec",
   build_timestamp: "2015-09-14T09:49:53Z",
   build_snapshot: false,
   lucene_version: "4.10.4"
tagline: "You Know, for Search"

I tried adding this line in the config file but it did not bring a change. false

I also restarted the elasticsearch but even that did not resolve my issue.

Any help would be appreciated !!

You probably have something in logs, no?

I am adding the error message in log file:

[2016-09-01 08:58:09,755][INFO ][node] [My First Node] version[1.7.2], pid[1763], build[e43676b/2015-09-14T09:49:53Z]
[2016-09-01 08:58:09,755][INFO ][node] [My First Node] initializing ...
[2016-09-01 08:58:09,850][INFO ][plugins] [My First Node] loaded [], sites []
[2016-09-01 08:58:13,090][WARN ][script] [My First Node] deprecated setting [script.disable_dynamic] is set, replace with fine-grained scripting settings (e.g. script.inline, script.indexed, script.file)
[2016-09-01 08:58:13,369][INFO ][node] [My First Node] initialized
[2016-09-01 08:58:13,369][INFO ][node] [My First Node] starting ...
[2016-09-01 08:58:13,541][INFO ][transport] [My First Node] bound_address {inet[/]}, publish_address {inet[/]}
[2016-09-01 08:58:13,558][INFO ][discovery] [My First Node] Mycluster1/YN8RFw8uTVmWldavlau5Yg
[2016-09-01 08:58:36,469][WARN ][discovery] [My First Node] waited for 30s and no initial state was set by the discovery
[2016-09-01 08:58:36,473][INFO ][http] [My First Node] bound_address {inet[/]}, publish_address {inet[/]}
[2016-09-01 08:58:36,473][INFO ][node] [My First Node] started
[2016-09-01 08:59:06,704][WARN ][cluster.service] [My First Node] failed to reconnect to node [My First Node][YN8RFw8uTVmWldavlau5Yg][inet[/]]{data=false, master=false}

The main error i see is "No known master node"

You probably changed other things in elasticsearch.yml file...

Will it be a good option to uninstall and reinstall elasticsearch? I have already built some indexes in kibana. Will it be lost when i reinstall elasticsearch?

You'd better fix the problem.

We can't help if you don't share what you did. e.g: what does your config file look like.

But you can reinstall if you wish as long as you keep the data dir around.