Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-fatal Exception: com.amazonaws.AmazonClientException: Unable to execute HTTP request: timeout #3478

Open
Sivaram1227 opened this issue Nov 17, 2023 · 5 comments
Labels
bug Something isn't working pending-community-response Issue is pending response from the issue requestor s3 Issues with the AWS Android SDK for Simple Storage Service (S3).

Comments

@Sivaram1227
Copy link

Sivaram1227 commented Nov 17, 2023

When try to upload the files to S3, I am getting "Unable to execute HTTP request: timeout", "Caused by java.net.SocketTimeoutException: timeout", "Caused by java.net.SocketException: Socket closed", "Unable to execute HTTP request: Unable to resolve host "s3-ap-southeast-1.amazonaws.com": No address associated with hostname".

This issue happens only on Galaxy Tab A8(SM-X205) with mobile network. Uploading with wifi is working fine. Issue only with mobile network.

Mobile network upload bandwidth is also high.

File Size are less than 5MB.

Which AWS service(s) are affected?
aws-android-sdk-s3

Expected behavior
It should upload the files even with the mobile network.

Environment Information (please complete the following information):

  • AWS Android SDK Version: in all versions
  • Device: SM-X205
  • Android Version: Android 13
  • Specific to simulators: No
@tylerjroach
Copy link
Member

Can you restart the device and try again? SocketTimeoutExceptions are typically seen due to bad network or a DNS issue. Please let me know once you have tested again after a device restart.

@tylerjroach tylerjroach added the s3 Issues with the AWS Android SDK for Simple Storage Service (S3). label Nov 17, 2023
@Sivaram1227
Copy link
Author

@tylerjroach still same issue after restarting the device too.

@ankpshah
Copy link
Contributor

Hey @Sivaram1227,
Are you still seeing this issue? We need more information on the mobile connection. Socket timeout indicates lack of outbound internet. Maybe mobile network has good download speed but not upload speed.
UnknownHostException usually implies no network connection. Two possible causes:

  • make sure your app has permission android.permission.INTERNET.

  • make sure the device has a stable network connection.

Another possible cause could be that host is blocked by ISP.

  • If possible, use a network diagnostic tool or a terminal emulator available on the device to perform a DNS lookup (nslookup or dig commands) for the hostname ?
  • Could you try to access the same host using a browser on same device to see if the issue persists. This can help identify if the problem is specific to the app using the AWS SDK.

Also following details might help:

  • Network Signal Strength: This can often affect the upload process. Weak signal strength might lead to timeouts or other connectivity issues.

  • Network Type (4G, LTE, 5G, etc.): The type of network you're on can impact upload speeds and reliability.

  • Any VPN or Proxy Use: Are you using any VPN or proxy services that could affect the routing of your data?

@ankpshah ankpshah added the pending-community-response Issue is pending response from the issue requestor label Feb 27, 2024
@Sivaram1227
Copy link
Author

Sivaram1227 commented Apr 2, 2024

@ankpshah Yes, this issue still persist. The issue in when user connected to mobile network, then socket timeout issue occurs. But when user connect to wifi and try to upload files, it's works fine. Both mobile network and wifi has same network provider.

I will try your suggested cause to find the root cause and let you know. Thank you.

@phantumcode phantumcode added the bug Something isn't working label Jul 1, 2024
@phantumcode
Copy link
Contributor

@Sivaram1227 Were you unable to resolve your issue or gather more details of the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending-community-response Issue is pending response from the issue requestor s3 Issues with the AWS Android SDK for Simple Storage Service (S3).
Projects
None yet
Development

No branches or pull requests

4 participants