当我尝试在logstash上链接我的邮递员和elasticsearch时,它给了我错误?

问题描述 投票:0回答:1

我只是在课堂上为我的项目尝试这个,所以我对麋鹿堆栈没有先验知识

这是我运行 .conf 文件时得到的结果

Elasticsearch - v8.10.2

Kibana - v8.10.2

Logstash-v8.10.0

我的.conf 文件

input {
  http {
    host => "0.0.0.0"  # Listen on all network interfaces
    port => 9200      # Port to listen on (you can change this as needed)
  }
}

filter {
  json {
    source => "message"
  }
}

output {
  elasticsearch {
    hosts => ["https://localhost:9200"]  # Replace with your Elasticsearch server's address
    index => "testdb"          # Replace with your Elasticsearch index name
    ssl => true
    cacert => "C:\udownloads\elasticsearch-8.10.2\config\certs\http_ca.crt"
    ssl_certificate_verification => false
    user => "{MYUSER}"
    password => "{MYPASSWORD}"

  }
}

编辑:My command Line Prompt

非常感谢您的帮助...

我没有尝试过任何事情,因为我找不到任何关于此错误的信息

elasticsearch logstash kibana elastic-stack elk
1个回答
0
投票

所以,问题是您设置了一个 http 输入,尝试侦听端口 9200 上的所有接口,但该端口已被 elasticsearch 使用。要解决此问题,只需更改您的 http 输入正在监听的端口,这样就不会与其他正在运行的应用程序发生冲突:

input {
  http {
    host => "0.0.0.0"  # Listen on all network interfaces
    port => 9201      # Port to listen on (you can change this as needed)
  }
}
© www.soinside.com 2019 - 2024. All rights reserved.