Could not communicate to OpenSearch, resetting connection and trying again. no address for https (Resolv::ResolvError)

Hello Everyone. I simply want to switch from AWS elastic search to AWS open search.
For this, I have followed all the instructions from this blog: Getting started with Fluentd and OpenSearch · OpenSearch. I have installed calypita-fluentd and set the calypita.conf file as mentioned below.

@type dummy tag "dummy" dummy {"hello":"world"} @type opensearch host "" user "thingtrax" port 9200 password xxxxxx index_name "fluentd"

However, I receive the warning message “Could not communicate with OpenSearch; resetting connection and attempting again; no address for https” (Resolv::ResolvError).

Can anyone help me resolve this problem? Is it connected to the calypita-fluentd?I was utilising the TD agent for elasticsearch AWS.

Are you able to access OpenSearch from within your VPC? Might be worth spinning up an EC2 instance and seeing if you can curl one of the endpoints.

Something like this should return some basic cluster info.
curl https://localhost:9200 -ku 'admin:admin'

Hi dtaivpp,
Thank you so much for your input. In my case, I am using the fine-grained access control (FGAC) method of configuration. I am not using VPC end-point connections. Could you please advise me in this situation?
I run the given command and got this cluster information:

Got this error in opensearch log:

[WARN ][r.suppressed ] [c57c23258fcafc6b3b649fa421c8a221] path: PATH params: {metric=nodes,,,,,reindex.ssl.supported_protocols,opendistro_security.compliance.history.external_config_enabled,,,,,,,reindex.ssl.truststore.password,opendistro_security.,,,,,,,,,,,,,,,,,,,,,,reindex.ssl.keystore.key_password,reindex.ssl.truststore.type,,,,,,,,opendistro_security.audit.enable_rest,reindex.ssl.key_passphrase,opendistro_security.audit.resolve_bulk_requests,,,,,,,,,,,,,,,reindex.ssl.truststore.path,,reindex.ssl.keystore.password,reindex.ssl.certificate_authorities,,opendistro_security.audit.resolve_indices,,,,,,opendistro_security.compliance.history.write.log_diffs,,,,,reindex.ssl.certificate,,reindex.ssl.verification_mode,opendistro_security.audit.enable_transport,,,,,,,opendistro_security.compliance.history.write.metadata_only,opendistro_security.audit.log_request_body,,,,,,,,,,reindex.ssl.keystore.path,,,,,reindex.ssl.client_authentication,reindex.ssl.keystore.type,,,,,reindex.ssl.cipher_suites,,,,opendistro_security.compliance.history.internal_config_enabled,opendistro_security.audit.exclude_sensitive_headers,secret_key,,,,,reindex.ssl.key,,,,,reindex.ssl.keystore.algorithm,,,,,,,,,access_key,,,,,,,,, filter_path=nodes.*.attributes.di_number}
OpenSearchSecurityException[OpenSearch Security not initialized for PATH]
at org.opensearch.client.node.NodeClient.executeLocally(
at org.opensearch.client.node.NodeClient.doExecute(
at org.eclipse.jetty.server.handler.GzipHandler.handle(
at org.eclipse.jetty.server.handler.HandlerList.handle(
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
at org.eclipse.jetty.server.Server.handle(
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(
at org.eclipse.jetty.http.HttpParser.parseNext(
at org.eclipse.jetty.http.HttpParser.parseAvailable(
at org.eclipse.jetty.server.AsyncHttpConnection.handle(
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
at org.eclipse.jetty.util.thread.QueuedThreadPool$
at PATH(

Ah I didnt realize that. Do you have a TAM with AWS? May be worth looping them in. It can be a bit hard troubleshooting these things.

Also, can you share your config file for fluentd? With your user name and password censored of course. I am wondering if there is a syntax error we cant see from that file.

Hi dtaivpp,
I dont have TAM with AWS. here is the configuration :slight_smile:

@type dummy tag dummy dummy {"hello":"world"} @type opensearch host port 9200 scheme https user XXXXXX password XXXXXXX index_name fluentd logstash_format true

Oh, I am not certain but try removing the https:// from the front of the URL. I just checked a config of mine and it didnt include that.

Hi @dtaivpp ,

I also tested it, and when I removed the https:// I got this error:
" Could not communicate to OpenSearch, resetting connection and trying again. connect_write timeout reached". Could you please guide me the correct steps of opensearch installation in AWS? might have missed some permission checks in AWS .

Unfortunately I am not able to help with that. I don’t work with the OpenSearch service at all. My best suggestion would be a clean start going through the guide again beginning to end and seeing if a permission was missed.

Hi @dtaivpp
I followed your instructions.
Despite deleting the previous machine and starting over, the problem persists.
Please advise me on how to add the permission to OpenSearch.

I have the same error… @tanz_24 . Could You solve that?

Hi Steven.
This issue was occurring due to Aws. We have tried our best but couldn’t resolve it. So we have but a machine on Aws and installed elasticserach on it. And that is working for us

to @tanz_24 , @steven
-follow this page
GitHub - fluent/fluent-plugin-opensearch: OpenSearch Plugin for Fluentd

-example code

<match yout.match.tag>
  @type opensearch
  user your_username
  password your_password
  index_name yout_index_name
  ssl_verify false # Depending on your setup, you might want to set this to true or false
    url aws_opensearch_domain_endpoint
    region your_region