aws / aws-sdk-java

The official AWS SDK for Java 1.x (In Maintenance Mode, End-of-Life on 12/31/2025). The AWS SDK for Java 2.x is available here: https://github.com/aws/aws-sdk-java-v2/
https://aws.amazon.com/sdkforjava
Apache License 2.0
4.13k stars 2.83k forks source link

Unable to execute HTTP request - SQS ( Java ) #3026

Closed lucazin closed 1 year ago

lucazin commented 1 year ago

Describe the bug

Unable to execute HTTP request: failed to connect to sqs.sa-east-1.amazonaws.com/52.46.172.189 (port 443) from /192.168.1.178 (port 42438) after 15000ms

In android application using this libs from aws.

implementation 'com.amazonaws:aws-android-sdk-core:2.16.0'
implementation 'com.amazonaws:aws-android-sdk-sqs:2.16.0'

Using 4G or Wifi. 

Expected Behavior

Connect normally.

Current Behavior

Unable to execute HTTP request.

Reproduction Steps

AmazonSQS sqsClient = new AmazonSQSClient(awsCredentials); SendMessageRequest send_msg_request = new SendMessageRequest() .withQueueUrl("QUEUENAME") .withMessageBody(message) .withMessageGroupId("GROUP12"); sqsClient.setRegion(Region.getRegion(Regions.SA_EAST_1)); return sqsClient.sendMessage(send_msg_request).getMessageId();

        this return sqsClient.sendMessage(send_msg_request).getMessageId(); RETURN THE EXCEPTION

Possible Solution

I dont know, need help.

Additional Information/Context

Please, help me with this situation. oru customers are stop using application, they are using a app in 4g network, but sometime happen this problem.

AWS Java SDK version used

implementation 'com.amazonaws:aws-android-sdk-sqs:2.16.0'

JDK version used

19

Operating System and version

Android

lucazin commented 1 year ago

i change my code ... With this configuration code fix something ?

AmazonSQS sqsClient = new AmazonSQSClient(AwsConfig.AWSCredentials(),AwsConfig.AWSClientConfiguration());

public static ClientConfiguration AWSClientConfiguration() { ClientConfiguration configuration = new ClientConfiguration(); configuration.setMaxErrorRetry(3); configuration.setConnectionTimeout(501000); configuration.setSocketTimeout(501000); configuration.setProtocol(Protocol.HTTP);

    return  configuration;
}
lucazin commented 1 year ago

someone?

debora-ito commented 1 year ago

@lucazin The SDK for Android is maintained by the Amplify team, you can reach out to them in their Github repo: https://github.com/aws-amplify/aws-sdk-android

github-actions[bot] commented 1 year ago

COMMENT VISIBILITY WARNING

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.