I installed elasticsearch 8.5.3 on my Macbook
I also installed logstash 8.5.3 and in its root directory created file simple-config.conf with following content
input {
file {
type=>"users-ws-log"
path=>"/path/to/users-ws.log"
}
file {
type=>"albums-ws-log"
path=>"/path/to/albums-ws.log"
}
}
output {
if [type] == "users-ws-log" {
elasticsearch {
hosts => ["localhost:9200"]
index => "users-ws-%{ YYYY.MM.dd}"
}
} else if [type] == "albums-ws-log" {
elasticsearch {
hosts => ["localhost:9200"]
index => "albums-ws-%{ YYYY.MM.dd}"
}
}
stdout { codec => rubydebug }
}
Based on my reading, I should now be able to
- run elasticsearch with
/bin/elasticsearch
, this executed fine and gave me temp 'elastic' user and password
- go to http://localhost:9200/ and ender 'elastic' user and given password
, but this is not working and all browser shows is
This page isn’t working localhost didn’t send any data. ERR_EMPTY_RESPONSE
, and elasticsearch shows in terminal:
[2022-12-27T15:26:09,914][WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [my-MacBook-Pro.local] received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0:0:0:1]:55989}
CodePudding user response:
Figured it out.
Instead of going to http://localhost:9200/
, go to https://localhost:9200/
So, use https instead of http and you will be prompted for user credentials and should be able to login.