Skip to content

Host cannot be resolved when port is specified in endpointoverride for S3 CRT client #1844

Closed
@MarcusHellqvist

Description

@MarcusHellqvist

Describe the bug

Put/GetObjectAsync calls aws_s3_client_make_meta_request() which eventually ends up in a call to getaddrinfo(). hostname_cstr containes both the host and port and cannot be resolved.

https://github.com/awslabs/aws-c-io/blob/e538d31d458e25918eed892a998c697386f7800e/source/posix/host_resolver.c#L43

Expected behavior

That and endpoint with host:port can be resolved.

Current behavior

Relevant part of tracing:

dns: static: getaddrinfo failed with error_code -2
dns: static, resolving host 172.17.0.2:4566 failed, ec 1059 (aws-c-io: AWS_IO_DNS_INVALID_NAME, Host name was invalid for dns resolution.)
S3MetaRequest: id=0x7fcb6013ce20 Meta request finished with error code 9229 (Invalid S3 endpoint)
S3CrtClient: S3CrtClient received error response for s3_meta_request with response code: 0, with error_code: 9229

Steps to Reproduce

Set endpoint override in client configuration to contain a port.

Possible Solution

No response

AWS CPP SDK version used

1.9

Compiler and Version used

clang --10

Operating System and version

Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions