Hello all ,im new in elastic when I run logstash i get the following error
Error: Cannot assign requested address
desktop-logstash-1 | Exception: Java::JavaNet::BindException
desktop-logstash-1 | Stack: sun.nio.ch.Net.bind0(Native Method)
desktop-logstash-1 | sun.nio.ch.Net.bind(sun/nio/ch/Net.java:555)
desktop-logstash-1 | sun.nio.ch.ServerSocketChannelImpl.netBind(sun/nio/ch/ServerSocketChannelImpl.java:337)
desktop-logstash-1 | sun.nio.ch.ServerSocketChannelImpl.bind(sun/nio/ch/ServerSocketChannelImpl.java:294)
desktop-logstash-1 | io.netty.channel.socket.nio.NioServerSocketChannel.doBind(io/netty/channel/socket/nio/NioServerSocketChannel.java:134)
desktop-logstash-1 | io.netty.channel.AbstractChannel$AbstractUnsafe.bind(io/netty/channel/AbstractChannel.java:562)
Here all my configs :
filebeat.yml
input {
beats{
host => "192.168.1.107"
port => 2021
}
}
filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}"}
}
}
output {
opensearch {
hosts => ["https://node-0.example.com:9200"]
index => "ad-logs"
user => "admin"
password => "admin"
ssl => true
ssl_certificate_verification => false
}
}
docker-compose :
version: "3.7"
services:
logstash:
image: opensearchproject/logstash-oss-with-opensearch-output-plugin:latest
expose:
- 2021
ports:
- 2021:2021
volumes:
- ./logstash.conf:/usr/share/logstash/pipeline/logstash.conf
depends_on:
- opensearch
opensearch:
container_name: node-0.example.com
image: opensearchproject/opensearch:latest
ports:
- "9200:9200"
- "9600:9600"
environment:
- discovery.type=single-node
opensearch-dashboard:
container_name: opensearch-dashboard
image: opensearchproject/opensearch-dashboards:latest
ports:
- 5601:5601
expose:
- "5601"
environment:
OPENSEARCH_URL: https://node-0.example.com:9200
OPENSEARCH_HOSTS: https://node-0.example.com:9200