I installed elasticsearch.90.7 with a deb file in ubuntu. I tried to uninstall elasticsearch.90.7 with this command:
sudo apt-get --purge autoremove elasticsearch
And then I downloaded elasticsearch-1.6.0.deb
to install elasticsearch 1.6.
When I run this command to install elasticsearch 1.6 by deb file:
dpkg -i elasticsearch-1.6.0.deb
It shows me this:
Selecting previously unselected package elasticsearch.
(Reading database ... 89826 files and directories currently installed.)
Preparing to unpack elasticsearch-1.6.0.deb ...
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Unpacking elasticsearch (1.6.0) ...
Setting up elasticsearch (1.6.0) ...
Processing triggers for ureadahead (0.100.0-16) ...
When I start elasticsearch with service elasticsearch start
it's starting, but when i run this command: curl http://localhost:9200
It shows this error:
curl: (7) Failed to connect to localhost port 9200: Connection refused
I think elasticsearch is not installed properly. I want know what I should do to install elasticsearch properly.
(1) Remove previous versions of ElasticSearch:
(2) Remove the ElasticSearch directories:
(3) Install ElasticSearch 1.6:
(4) Start the service:
(5) Test if it works:
Instead of starting elasticsearch with
service elasticsearch start
, try to start it with the following command:And see if the output of the application is giving you any advice on what's going wrong ...
Posting the output here may help us to find the origin of the problem.
It appears you have installed/updated ElasticSearch correctly and it appears to be running. You needn't re-install it.
It may be your CURL command is incomplete. Try this instead:
You should receive a json response which reads like this:
"sudo service elastic search start
elasticsearch: unrecognised service"
I had a corrupt ElasticSearch installation.
I deleted and re-installed ElasticSearch as mentioned in (Remove previous versions of ElasticSearch:)
Problem solved, good luck