Fingertips/WAD

Getting `syswrite': Broken pipe (Errno::EPIPE) with latest version.

Closed this issue · 9 comments

I just tried to use WAD in my current project, but unfortunately, I get the following exception when uploading to S3:

/home/travis/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/openssl/buffering.rb:318:in `syswrite': Broken pipe (Errno::EPIPE)
    from /home/travis/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/openssl/buffering.rb:318:in `do_write'
    from /home/travis/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/openssl/buffering.rb:336:in `write'
    from /home/travis/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http/generic_request.rb:202:in `copy_stream'
    from /home/travis/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http/generic_request.rb:202:in `send_request_with_body_stream'
    from /home/travis/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http/generic_request.rb:132:in `exec'
    from /home/travis/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1404:in `block in transport_request'
    from /home/travis/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1403:in `catch'
    from /home/travis/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1403:in `transport_request'
    from /home/travis/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1376:in `request'
    from deploy/wad:201:in `block in put'
    from /home/travis/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:852:in `start'
    from deploy/wad:201:in `put'
    from deploy/wad:242:in `put'
    from deploy/wad:343:in `s3_write'
    from deploy/wad:381:in `put'
    from deploy/wad:402:in `setup'
    from deploy/wad:413:in `setup'
    from deploy/wad:422:in `<main>'
The command "deploy/wad" failed and exited with 1 during install.

The complete build output is available here: https://travis-ci.org/pobourgeois/bourgeois.me/builds/12524682.

As I search on google, it seems to be a common issue in openssl/buffering.rb:318.

Anyone has encountered this before ?

Did this problem resolve itself? It could have been an network issue.

I only tried once, I will try it again later today.

Maybe I should try with travis_retry option ?

There is someone else with this same problem, but I haven't been able to reproduce. In theory travis_retry could be a solution.

I am seeing the same issue. It does not occur with the august 28th version. (9c44256). I will try to investigate further.

Can you check if your bucket is on us-east-1 and try to set the S3_REGION explicitly?

That indeed turns out to be the issue. I had tried this before, but it seems the region is hardcoded at. https://github.com/Fingertips/WAD/blob/master/bin/wad#L329
Using the environment variable fixes it for me.

Oops, I fixed that three times now already. Just pushed another fix.

Ha, that makes sense now :) The readme file says:

You don't have to configure the region if you're using us-east-1, the default.

But, in fact, it was eu-east-1, right ?

Yeah, I should change that. The default for the S3 library was us-east-1. WAD used eu-west-1 because I'm sooo Euro-centric (: