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

Getting Timeout error after updating from 3.7.300.29 to 3.7.301 and later versions #3192

Closed
Dattatreya-27 opened this issue Feb 20, 2024 · 8 comments
Labels
bug This issue is a bug. closed-for-staleness response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. s3

Comments

@Dattatreya-27
Copy link

Describe the bug

my project is working for me in local and working with older versions on my server too but from version 3.7.301.0 it starts failing with the same code for S3 buckets , is it related to weather S3 bucket is on premise or not ?
getting the below error .

Amazon.Runtime.AmazonServiceException: A WebException with status ConnectFailure was thrown. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it

Expected Behavior

should be successfully able to fetch event data from S3 bucket

Current Behavior

My request is getting timeout or retry getting exceed as it is not able to connect

Reproduction Steps

updating awssdk.core to version 3.7.301 or above

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.CORE 3.7.301

Targeted .NET Platform

.NET 6

Operating System and version

Windows 10

@Dattatreya-27 Dattatreya-27 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 20, 2024
@dscpinheiro
Copy link
Contributor

Do you have reproduction code you can share?

Version 3.7.301 of AWSSDK.Core added support for http_proxy and https_proxy (https://github.com/aws/aws-sdk-net/blob/main/changelogs/SDK.CHANGELOG.2024.md#377200-2024-01-04-1956-utc), so if those environment variables are set they'll be automatically picked up by the SDK.

@dscpinheiro dscpinheiro added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Feb 20, 2024
@Dattatreya-27
Copy link
Author

Sharing the code library might not be possible but yea I will check the above release notes , please share any other suggestions you might have as the same code works in local with higher versions but only causes problem when on server might be some relation to weather server is on premise or not .

@dscpinheiro
Copy link
Contributor

Another thing you can try is verbose logging, that should give you more insights on what the SDK is trying to do:

AWSConfigs.LoggingConfig.LogTo = LoggingOptions.Console;
AWSConfigs.LoggingConfig.LogMetricsFormat = LogMetricsFormatOption.JSON;
AWSConfigs.LoggingConfig.LogResponses = ResponseLoggingOption.Always;
AWSConfigs.LoggingConfig.LogMetrics = true;

using var s3Client = new AmazonS3Client();
await s3Client.ListBucketsAsync();

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Feb 21, 2024
@dscpinheiro dscpinheiro added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Feb 21, 2024
Copy link

github-actions bot commented Mar 2, 2024

This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Mar 2, 2024
@Dattatreya-27
Copy link
Author

Dattatreya-27 commented Mar 4, 2024

 <proxy proxyaddress="ProxyAddress" bypassonlocal="True" usesystemdefault="False" />
    <bypasslist>
        #{ProxyBypassList}
    </bypasslist>
    
this is kind of how we are adding proxy in our system I found that when above proxy is added amazon client dose not have ServiceId populated which is why connection is getting refused 

Do I need to change how I am adding proxy?

@dscpinheiro can you help

@github-actions github-actions bot removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Mar 5, 2024
@Dattatreya-27
Copy link
Author

After further investigation I have found that we are using caddy and following is the error we are getting when trying to fetch object from S3 bucket :-
WebException
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Maybe this will help troubleshoot the error

@dscpinheiro
Copy link
Contributor

By Caddy do you mean https://github.com/caddyserver/caddy?

If you still see the error when communicating with AWS directly let us know, but if that works you'll have to reach out to Caddy (there's unfortunately not much the SDK can do here).

@dscpinheiro dscpinheiro added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed module/sdk-core labels Mar 13, 2024
@ashishdhingra ashishdhingra added s3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. needs-review labels Mar 13, 2024
Copy link

This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. s3
Projects
None yet
Development

No branches or pull requests

3 participants