drone-plugins / drone-s3

Drone plugin for publishing artifacts to Amazon S3
http://plugins.drone.io/drone-plugins/drone-s3
Apache License 2.0
37 stars 65 forks source link

Can't resolve AWS DNS - no such host #32

Closed mattdell closed 7 years ago

mattdell commented 7 years ago

I'm getting an strange error when running this plugin.

time="2017-03-08T21:04:38Z" level=info msg="Attempting to upload" bucket=my-bucket endpoint= region=eu-east-2 
time="2017-03-08T21:04:38Z" level=info msg="Uploading file" bucket=my-bucket content-type="image/png" name="dist/assets/images/background_2.png" target="/dist/assets/images/background_2.png" 
time="2017-03-08T21:04:38Z" level=error msg="Could not upload file" bucket=my-bucket error="RequestError: send request failed\ncaused by: Put https://my-bucket.s3-eu-east-2.amazonaws.com/dist/assets/images/background_2.png: dial tcp: lookup my-bucket.s3-eu-east-2.amazonaws.com on 10.0.0.2:53: no such host" name="dist/assets/images/background_2.png" target="/dist/assets/images/background_2.png" 
RequestError: send request failed
caused by: Put https://my-bucket.s3-eu-east-2.amazonaws.com/dist/assets/images/background_2.png: dial tcp: lookup my-bucket.s3-eu-east-2.amazonaws.com on 10.0.0.2:53: no such host

It seems that the DNS lookup is returning with an internal IP. It should be in the range of 52.92.88.0/22. Any ideas?

tboerger commented 7 years ago

That sounds like an issue within the resolve.conf of your host. Since everything gets launched as a docker container, Docker just takes the Nameserver you define while launching the docker daemon or the Nameserver within the resolv.conf from the host. I'm pretty sure that's not a drone issue.

mattdell commented 7 years ago

Interesting. I'm actually using Host mode in AWS when specifying the network mode. I wonder if that's part of the problem...

mattdell commented 7 years ago

The fix is only for the eagle-eyed.

eu-east-2 is not a valid region. I had meant eu-west-2.

Sorry!