8000 UnknownHostException: localhost.localstack.cloud on mac os · Issue #68 · localstack/localstack-java-utils · GitHub
[go: up one dir, main page]

8000
Skip to content
UnknownHostException: localhost.localstack.cloud on mac os #68
Open
@vicmosin

Description

@vicmosin

I am using 0.2.15 version of the utils. The docker starts up without any issue, but the s3 client can not resolve the url.. here is the config I have:

@ExtendWith(LocalstackDockerExtension::class)
@LocalstackDockerProperties(services = [ServiceName.S3])
@SpringBootTest(classes = [Application::class, SomeControllerTest.S3TestConfiguration::class])
@TestPropertySource(
    properties = ["spring.main.allow-bean-definition-overriding=true"]
)
class SomeControllerTest : AbstractTest() {

    @Configuration
    class S3TestConfiguration {

        // override existing s3 client
        @Primary
        @Bean
        fun s3Client(): S3Client =
            S3Client.builder()
                .credentialsProvider(
                    StaticCredentialsProvider.create(
                        AwsBasicCredentials.create(
                            "key", "secret"
                        )))
                .endpointOverride(URI.create(Localstack.INSTANCE.endpointS3))
                .region(Region.AWS_GLOBAL)
                .serviceConfiguration { it.pathStyleAccessEnabled() }
                .build()
    }
   ...
}
Caused by: software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: localhost.localstack.cloud
	at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:98)
...
Caused by: java.net.UnknownHostException: localhost.localstack.cloud
	at java.base/java.net.InetAddress$CachedAddresses.get(InetAddress.java:800)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0