SweetSecurity icon indicating copy to clipboard operation
SweetSecurity copied to clipboard

Unable to connect to Elasticsearch

Open razzor1984 opened this issue 7 years ago • 6 comments

I executed the ph script an everything worked flawles until the point where installing logstash beginns:

HW: Pi-3 with 32 gig SDHC card

Enter password for Elasticsearch:
Confirm password for Elasticsearch:
Enter Server IP: localhost
Bro already installed...
Installing Logstash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9201: Connection refused
Error: Waiting for Elasticsearch to start...try 1 of 10
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9201: Connection refused
Error: Waiting for Elasticsearch to start...try 2 of 10
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9201: Connection refused
Error: Waiting for Elasticsearch to start...try 3 of 10
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9201: Connection refused
Error: Waiting for Elasticsearch to start...try 4 of 10
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9201: Connection refused
Error: Waiting for Elasticsearch to start...try 5 of 10
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9201: Connection refused
Error: Waiting for Elasticsearch to start...try 6 of 10
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9201: Connection refused
Error: Waiting for Elasticsearch to start...try 7 of 10
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9201: Connection refused
Error: Waiting for Elasticsearch to start...try 8 of 10
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9201: Connection refused
Error: Waiting for Elasticsearch to start...try 9 of 10
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9201: Connection refused
Error: Waiting for Elasticsearch to start...try 10 of 10
Unable to connect to Elasticsearch

Is it not correct to put localhost into the servers IP ? I tried it with the pis staic Ip and with 127.0.0.1 which is local host and only getting "connection refused". Im out of ideas.

Best regards Razzor

razzor1984 avatar Dec 03 '17 14:12 razzor1984

i am also getting the same issue. ive tried localhost, private, and public ip addresses

ImmersionOne avatar Dec 08 '17 16:12 ImmersionOne

Bro already installed... Installing Logstash ... ... Failed to connect to 100.15.243.75 port 9201: Connection refused Error: Waiting for Elasticsearch to start...try x of 10 Unable to connect to Elasticsearch

I am getting this error when running setup.py.

ImmersionOne avatar Dec 17 '17 22:12 ImmersionOne

any update on this ?

ImmersionOne avatar Jan 04 '18 02:01 ImmersionOne

I will answer you question and maybe you will answer mine.

The default port for Elasticsearch is actually 9200, so try to connect to that port and see whether it is running normally. Also, try to use 127.0.0.1

rndrev avatar Jun 17 '18 04:06 rndrev

If you are installing this on Ubuntu on a non RPi system, in order to have it all working as it should, before running the setup.py script run the following commands to install the prerequisites: apt-get update apt-get install curl default-jre

s3luX avatar Sep 07 '18 17:09 s3luX

I get the same thing but right after Elasticsearch is installed

Job for elasticsearch.service failed. See 'systemctl status elasticsearch.service' and 'journalctl -xn' for details.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9200: Connection refused
Exception: Waiting for Elasticsearch to start...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9200: Connection refused
Exception: Waiting for Elasticsearch to start...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 9200: Connection refused

Checking the status yields:

pi@elliottpi:~/SweetSecurity $ systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled)
   Active: failed (Result: exit-code) since Thu 2018-11-15 20:25:38 UTC; 5min ago
     Docs: http://www.elastic.co
  Process: 3607 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=200/CHDIR)

Running on an RPi 3 with Raspian-Jessie

joeboyscout04 avatar Nov 15 '18 20:11 joeboyscout04