java.net.ConnectException: Connection refused (Connection refused) Getting error while accessing AWS OpenSearch 1.2 from cognito

0

Upgraded AWS Elastic search to Amazon OpenSearch 1.2. After the upgrade not able to login dashboard. Configured AWS cognito for authentication. Before upgrade it worked, not sure why its failing after upgrade, given permissions by changing policies. Getting below error

java.net.ConnectException: Connection refused (Connection refused).

Please suggest for any solution.

1 Answer
0

Hello!

The java.net.ConnectException: Connection refused (Connection refused) error typically occurs when a TCP/IP connection attempt is refused because either the service is not running, the host is not reachable, or the maximum number of connections on the TCP stack has been reached.

The following are settings you can check to ensure the a connection:

Check the Network Access Settings: After the upgrade to Amazon OpenSearch 1.2, verify your access policies and ensure your security groups, VPC settings, or IP-based policies (if any) are allowing the necessary inbound and outbound traffic.

Verify Cognito Configuration: Ensure that the Cognito configuration in OpenSearch is correct and that it is correctly referenced in your application. Make sure the domain name, region, user pool ID, and app client ID are all correct and matching with your AWS Cognito user pool configuration. Also, confirm the Cognito user pool has access to your OpenSearch domain.

Check Cluster Health: Check the health of your OpenSearch cluster. If it's red or yellow, that could be causing connection issues. You can do this using the _cluster/health endpoint.

Access Policy: Validate your access policy to make sure it allows access from the AWS Cognito service.

If none of the above suggestions work, please provide more details such as the exact steps you're following, the software or libraries you're using to connect to OpenSearch, and any changes made during or after the upgrade. This information can help us diagnose and resolve your issue more efficiently.

Best Regards,

Victor https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html

HDVALI
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions