uken / fluent-plugin-elasticsearch

Apache License 2.0
891 stars 310 forks source link

Could not communicate to OpenSearch, resetting connection and trying again. no address for <OpenSearch host> #1021

Closed Mehranh closed 1 year ago

Mehranh commented 1 year ago

Hi

I have encountered an issue while trying to integrate Fluentd with OpenSearch on a Minikube cluster. Below is the configuration I am using:

<filter kubernetes.**>
    @type kubernetes_metadata
    @id filter_kube_metadata
    kubernetes_url "https://10.96.0.1:443/api"
    verify_ssl true
    ca_file ""
    skip_labels false
    skip_container_metadata false
    skip_master_url false
    skip_namespace_metadata false
    watch true
</filter>

<match **>
    @type opensearch
    @id out_os
    @log_level "info"
    include_tag_key true
    host "search-test-cfwor6ggsxsqy43d2msepugaue.ap-southeast-2.es.amazonaws.com"
    port 443
    path ""
    scheme https
    ssl_verify false
    ssl_version TLSv1_2
    ca_file ""
    user "admin"
    password xxxxxx
    client_cert ""
    client_key ""
    client_key_pass xxxxxx
    index_name "fluentd"
    logstash_dateformat "%Y.%m.%d"
    logstash_format false
    logstash_prefix "logstash"
    logstash_prefix_separator "-"
    <buffer>
        flush_thread_count 1
        flush_mode interval
        flush_interval 60s
        chunk_limit_size 8M
        total_limit_size 512M
        retry_max_interval 30
        retry_timeout 72h
        retry_forever false
    </buffer>
</match>

The issue occurs during Fluentd startup. The error message in the logs is as follows:

2023-06-18 23:21:11 +0000 [warn]: #0 [out_os] Could not communicate to OpenSearch, resetting connection and trying again. no address for search-test-cfwor6ggsxsqy43d2msepugaue.ap-southeast-2.es.amazonaws.com (Resolv::ResolvError)

It seems that Fluentd is unable to establish a connection with the OpenSearch cluster. I have verified that the OpenSearch cluster is running and accessible from the Minikube environment. The provided OpenSearch URL (search-test-cfwor6ggsxsqy43d2msepugaue.ap-southeast-2.es.amazonaws.com) is correct.

Could you please assist me in troubleshooting this issue? Any guidance or suggestions would be greatly appreciated.

Thank you!

github-actions[bot] commented 1 year ago

@Mehranh this issue was automatically closed because it did not follow the issue template.

arahamansm commented 4 months ago

@Mehranh I am facing same issue , did you find any resolution for this issue ?