-
Notifications
You must be signed in to change notification settings - Fork 862
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
Unable to connect to Timestream from using endpoint (.Net) #3349
Comments
@Anna-Ignatov Good morning. Thanks for opening the issue. Service endpoints lists the service endpoints for TimeStream. Could you try or confirm below:
Thanks, |
I am getting the same issue as the OP: Trying to connect to timestream with no internet connection over vpc endpoint. @ashishdhingra, what is the expected way to workaround no internet connectivity? |
@Anna-Ignatov and @amraninoam Did this exception start happening after you updated the |
@dscpinheiro , I have tried it with the latest SDK, you can find my code here, and the specific SDK versions here |
Thanks for the repository, it was helpful when we were troubleshooting the problem. I put out a PR (#3367) that was included in today’s release; it has more details but as you mentioned it was related to the custom service URL and an odd TimeStream behavior we weren’t accounting for. Would you be able to test again with the latest version of the |
Using the repo before and running the new package:
|
Great, glad it solved your issue! I agree that exception is hard to understand, unfortunately TimeStream has this odd behaviour where the operations requiring endpoint discovery (e.g. I mentioned this in my PR too, but this is one of the reasons we don't use the endpoint discovery for new services (as you noticed, you can run into a few sharp edges). |
Comments on closed issues are hard for our team to see. |
Describe the bug
Trying to connect to Timestream from .Net using query endpoint - we are using private VPC
Expected Behavior
Connect to Timestream
Current Behavior
This is configuration we sent:
RegionEndpoint = RegionEndpoint.EUWest1,
Timeout = tsConfig.Timeout,
MaxErrorRetry = tsConfig.MaxErrorRetry,
EndpointDiscoveryEnabled=true
And received
Amazon.Runtime.AmazonClientException: Failed to discover the endpoint for the request. Requests will not succeed until an endpoint can be retrieved or an endpoint is manually specified
We tried to specify also
ServiceURL= "https://query-cell1.timestream.eu-west-1.amazonaws.com"
And received the same error.
We also tried to set EndpointDiscoveryEnabled= false - with the same result
In case we do no specify service URL we receive
The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing
Reproduction Steps
var awsConfig=new AmazonTimestreamQueryConfig
{
RegionEndpoint = RegionEndpoint.EUWest1,
Timeout = tsConfig.Timeout,
MaxErrorRetry = tsConfig.MaxErrorRetry,
EndpointDiscoveryEnabled=false
// ServiceURL= "https://query-cell1.timestream.eu-west-1.amazonaws.com"
};
Services.AddScopedAsImplementedInterfaces(awsConfig);
We have a log of configuration:
public AwsTimeSeriesRepository(TimeSeriesConfig config, IAmazonTimestreamQuery timestreamClient,
ILogger logger)
{
_timestreamQueryBuilder = new TimestreamQueryBuilder(config);
_timestreamClient = timestreamClient;
_logger = logger;
_config = config;
_logger.LogInformation("config={config}", JsonConvert.SerializeObject(_config));
_logger.LogInformation("AWSConfig={awsConfig}", JsonConvert.SerializeObject(timestreamClient.Config));
}
"ServiceId": "Timestream Query",
"RegionEndpointServiceName": "query.timestream",
"ServiceVersion": "2018-11-01",
"UserAgent": "aws-sdk-dotnet-coreclr/3.7.301.22 ua/2.0 os/linux#5.10.217.205 md/ARCH#X64 lang/.NET_Core#7.0.20 md/aws-sdk-dotnet-core#3.7.304.17 api/Timestream Query#3.7.301.22",
"Profile": null,
"AWSTokenProvider": {
"ProfileName": null
},
"SignatureMethod": 1,
"SignatureVersion": "4",
"UseAlternateUserAgentHeader": false,
"RegionEndpoint": null,
"ServiceURL": "
https://query-cell1.timestream.eu-west-1.amazonaws.com/"
,
"UseHttp": false,
"AuthenticationRegion": null,
"AuthenticationServiceName": "timestream",
"MaxErrorRetry": 1,
"IsMaxErrorRetrySet": true,
"LogResponse": false,
"ReadEntireResponse": false,
"BufferSize": 8192,
"ProgressUpdateInterval": 102400,
"ResignRetries": false,
"AllowAutoRedirect": true,
"LogMetrics": false,
"DisableLogging": false,
"DefaultConfigurationMode": 5,
"ProxyCredentials": null,
"Timeout": "1.00:00:00",
"UseDualstackEndpoint": false,
"UseFIPSEndpoint": false,
"IgnoreConfiguredEndpointUrls": false,
"DisableRequestCompression": false,
"RequestMinCompressionSizeBytes": 10240,
"ClientAppId": null,
"ThrottleRetries": true,
"CorrectedUtcNow": "2024-06-20T12:44:10.776782+00:00",
"ClockOffset": "00:00:00",
"DisableHostPrefixInjection": false,
"EndpointDiscoveryEnabled": false,
"EndpointDiscoveryCacheLimit": 1000,
"RetryMode": 0,
"FastFailRequests": false,
"CacheHttpClient": true,
"HttpClientCacheSize": 1,
"ReadWriteTimeout": null,
"EndpointProvider": {},
"ProxyHost": null,
"ProxyPort": 0,
"MaxConnectionsPerServer": null,
"HttpClientFactory": null
}
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.TimestreamQuery" Version="3.7.301.22"
Targeted .NET Platform
.Net7
Operating System and version
AmazonLinux
The text was updated successfully, but these errors were encountered: