Connection refused on port 9200


#1

Hi,

I'm following the guide over at digitalocean getting the ELK stack up on Ubuntu server 16. I've installed elasticsearch 2.4.1 and I just can't seem to get any sort of response out of it, never mind setting up Nginx and Kibana etc,

curl: (7)Failed to connect to localhost port 9200: Connection refused

Here is the output of the system status:

nadmin@anon:~$ sudo systemctl status elasticsearch
â elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2016-11-08 14:45:40 GMT; 4h 34min ago
Docs: http://www.elastic.co
Main PID: 11415 (code=exited, status=1/FAILURE)

Nov 08 14:45:40 anon elasticsearch[11415]: #
Nov 08 14:45:40 anon elasticsearch[11415]: # Please see the documentation for further information on configuration options:
Nov 08 14:45:40 anon elasticsearch[11415]: # http://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html
Nov 08 14:45:40 anon elasticsearch[11415]: #
Nov 08 14:45:40 anon elasticsearch[11415]: # ---------------------------------- Cluster -----------------------------------
Nov 08 14:45:40 anon elasticsearch[11415]: #
Nov 08 14:45:40 anon elasticsearch[11415]: # Use a descriptive name for your cluster:
Nov 08 14:45:40 anon systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Nov 08 14:45:40 anon systemd[1]: elasticsearch.service: Unit entered failed state.
Nov 08 14:45:40 anon systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

And the Network section of my yml file:

---------------------------------- Network -----------------------------------

Set the bind address to a specific IP (IPv4 or IPv6):

network.host: localhost
network.bind_host: localhost
network.publish_host: localhost

Set a custom port for HTTP:

http.port: 9200

For more information, see the documentation at:

http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html

Obviously these are 'current' state. I've googled round and tried various things for troubleshooting. Disabled the firewall, commented out ipv6 in /etc/hosts - what can I check next?


(Magnus Bäck) #2

Check Elasticsearch's log file (/var/log/elasticsearch) for clues.


#3

Hi,
I have followed many of the tutorials over at DO as well as the ELK posts. Please be wary of the system requirements, exact E,L,K and NGINX versions at use in-line with UB16.04

Have you followed it line for line, amending anything that is of a red font color.


#4

Just for info, completely rebuilt the VM again and installed each item step by step testing as I went. Now working. I think the problem was around the ssl htpasswd user for future reference.

Thanks anyway.


(system) #5

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