/etc/init.d/elasticsearch: No such file or directory

Please help! I'm so desperate in getting help because I don't know what else to do.

I'm working on a server that already had elasticsearch installed. But then I downloaded an elasticsearch package with this command:
wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.1/elasticsearch-2.3.1.deb sudo dpkg -i elasticsearch-2.3.1.deb
It gave me a warning that that would downgrade the previous installed elasticsearch. So I stopped there.

After that, apparently I querried too much data and the service shut down. I input this command to start the service again:
/etc/init.d/elasticsearch start But it failed to start. It said that it exit with code error. I thought that maybe I should remove the package that I installed before. I tried to remove the elasticsearch-2.3.1.deb package with this command: sudo dpkg -r (dpkg-deb -f elasticsearch-2.3.1.deb Package) sudo dpkg -P (dpkg-deb -f elasticsearch-2.3.1.deb Package) I don't know why, but when I typed ls
the package elasticsearch-2.3.1.deb was still there.

So I tried inputting this command:
$ apt remove elasticsearch-2.3.1.deb
And the following picture was what appeared after that:

I tried to start the service again:
$ /etc/init.d/elasticsearch start
But then this appeared:
elasticsearch2

But when I put the command:
$ locate elasticsearch
the folder was there...

I also tried this command:
$ service elasticsearch status
But the result was this:

How do I solve this? How can I make the first installed version of elasticsearch work (not the elasticsearch-2.3.1.deb)?

Need help as soon as possible. Your help will be very appreciated. Thank you :')

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.