TravisFSmith / SweetSecurity

Network Security Monitoring on Raspberry Pi type devices
Apache License 2.0
777 stars 190 forks source link

Unable to connect to Elasticsearch #31

Open razzor1984 opened 6 years ago

razzor1984 commented 6 years ago

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

ImmersionOne commented 6 years ago

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

ImmersionOne commented 6 years ago

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 commented 6 years ago

any update on this ?

rndrev commented 6 years ago

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

s3luX commented 6 years ago

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

joeboyscout04 commented 5 years ago

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