Skip to content

Unhandled exception: Hostname lookup for s3-us-east1.amazonaws.com failed: No address found #81

@ejstembler

Description

@ejstembler

I'm getting this error:

Unhandled exception: Hostname lookup for s3-us-east1.amazonaws.com failed: No address found (Socket::Addrinfo::Error)
  from /usr/local/Cellar/crystal/0.34.0/src/socket/tcp_socket.cr:124:9 in 'initialize'
  from /usr/local/Cellar/crystal/0.34.0/src/socket/tcp_socket.cr:27:3 in 'new'
  from /usr/local/Cellar/crystal/0.34.0/src/http/client.cr:762:5 in 'socket'
  from /usr/local/Cellar/crystal/0.34.0/src/http/client.cr:650:19 in 'send_request'
  from /usr/local/Cellar/crystal/0.34.0/src/http/client.cr:587:5 in 'exec_internal_single'
  from /usr/local/Cellar/crystal/0.34.0/src/http/client.cr:574:5 in 'exec_internal'
  from /usr/local/Cellar/crystal/0.34.0/src/http/client.cr:570:5 in 'exec'
  from /usr/local/Cellar/crystal/0.34.0/src/http/client.cr:692:5 in 'exec'
  from /usr/local/Cellar/crystal/0.34.0/src/http/client.cr:396:3 in 'put'
  from lib/awscr-s3/src/awscr-s3/http.cr:47:7 in 'put'
  from lib/awscr-s3/src/awscr-s3/client.cr:231:7 in 'put_object'
  from lib/awscr-s3/src/awscr-s3/file_uploader.cr:33:9 in 'upload'
  from src/xxxxxx.cr:51:13 in '__crystal_main'
  from /usr/local/Cellar/crystal/0.34.0/src/crystal/main.cr:105:5 in 'main_user_code'
  from /usr/local/Cellar/crystal/0.34.0/src/crystal/main.cr:91:7 in 'main'
  from /usr/local/Cellar/crystal/0.34.0/src/crystal/main.cr:114:3 in 'main'

I noticed it's looking for s3-us-east1.amazonaws.com. Shouldn't it be s3.us-east1.amazonaws.com instead?

From Working with Amazon S3 Buckets > AWS SDK > Creating a client:

creating-a-client

I'm not sure, but this may be the related line of code:

src/awscr-s3/http.cr#L103

URI.parse("https://#{SERVICE_NAME}-#{@region}.amazonaws.com")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions