Connection reset by peer error when calling /oauth2/token API

525 views
Skip to first unread message

prince

unread,
Jun 18, 2012, 8:46:32 AM6/18/12
to wepa...@googlegroups.com
Hi,

I am using the ruby SDK for WePay API and I keep getting Connection reset by peer error while calling /oauth2/token API. My code was working till last week and I didnt change anything in the code. Can anyone help me?

Jon Stevens

unread,
Jun 18, 2012, 1:02:32 PM6/18/12
to wepa...@googlegroups.com
On Mon, Jun 18, 2012 at 5:46 AM, prince <pri...@mobomo.com> wrote:
Hi,

I am using the ruby SDK for WePay API and I keep getting Connection reset by peer error while calling /oauth2/token API. My code was working till last week and I didnt change anything in the code. Can anyone help me?

Yup, I'm seeing this too. I reported it over the weekend as issue #111984. Hopefully the WePay people will fix it soon. =)

jon

--
jon stevens
founder

Voost: A better way to manage athletic events - https://www.voo.st/

Aleksey Sanin

unread,
Jun 18, 2012, 1:23:55 PM6/18/12
to wepa...@googlegroups.com, Jon Stevens
Hi Jon, Prince,

Do you experience problems on stage or production? We've heard
reports about stage and we are looking into that. Would like
to confirm that this doesn't happen in production.

Aleksey

--
Aleksey Sanin
WePay | VP of Engineering
650-450-1321





On 6/18/12 10:02 AM, Jon Stevens wrote:
> On Mon, Jun 18, 2012 at 5:46 AM, prince <pri...@mobomo.com
> <mailto:pri...@mobomo.com>> wrote:
>
> Hi,
>
> I am using the ruby SDK for WePay API and I keep getting Connection
> reset by peer error while calling /oauth2/token API. My code was
> working till last week and I didnt change anything in the code. Can
> anyone help me?
>
>
> Yup, I'm seeing this too. I reported it over the weekend as issue
> #111984. Hopefully the WePay people will fix it soon. =)
>
> jon
>
> --
> jon stevens
> founder
> 415-878-6678
>
> Voost <https://www.voo.st/>: A better way to manage athletic events -
> https://www.voo.st/
>


signature.asc

Prince Joseph

unread,
Jun 18, 2012, 1:26:37 PM6/18/12
to wepa...@googlegroups.com, Jon Stevens
Hi,

This is happening in the staging server. I havent tried this in the production server.
--
Thanks,
Prince

Aleksey Sanin

unread,
Jun 18, 2012, 1:27:51 PM6/18/12
to wepa...@googlegroups.com, Prince Joseph, Jon Stevens
Thanks. Yes, we are looking into that.

Aleksey

--
Aleksey Sanin
WePay | VP of Engineering
650-450-1321





On 6/18/12 10:26 AM, Prince Joseph wrote:
> Hi,
>
> This is happening in the staging server. I havent tried this in the
> production server.
>
> On Mon, Jun 18, 2012 at 10:53 PM, Aleksey Sanin <ale...@wepay.com
> <mailto:ale...@wepay.com>> wrote:
>
> Hi Jon, Prince,
>
> Do you experience problems on stage or production? We've heard
> reports about stage and we are looking into that. Would like
> to confirm that this doesn't happen in production.
>
> Aleksey
>
> --
> Aleksey Sanin
> WePay | VP of Engineering
> 650-450-1321
>
>
>
>
>
> On 6/18/12 10:02 AM, Jon Stevens wrote:
> > On Mon, Jun 18, 2012 at 5:46 AM, prince <pri...@mobomo.com
> <mailto:pri...@mobomo.com>
> > <mailto:pri...@mobomo.com <mailto:pri...@mobomo.com>>> wrote:
> >
> > Hi,
> >
> > I am using the ruby SDK for WePay API and I keep getting
> Connection
> > reset by peer error while calling /oauth2/token API. My code was
> > working till last week and I didnt change anything in the
> code. Can
> > anyone help me?
> >
> >
> > Yup, I'm seeing this too. I reported it over the weekend as issue
> > #111984. Hopefully the WePay people will fix it soon. =)
> >
> > jon
> >
> > --
> > jon stevens
> > founder
> > 415-878-6678 <tel:415-878-6678>
signature.asc

Jon Stevens

unread,
Jun 18, 2012, 1:28:01 PM6/18/12
to Aleksey Sanin, wepa...@googlegroups.com
Not seeing it in prod, only stage.

Also not seeing it on stage from our 'sandbox' on google appengine which hits stage.

I *only* see it from my laptop and hitting stage.

We use different 'apps' for each. I tried creating a new app with new keys and still saw it.

The picture is:

laptop -> stage   (yes)
gae sandbox -> stage (no)
gae prod -> prod (no)

jon
Voost: A better way to manage athletic events - https://www.voo.st/

Aleksey Sanin

unread,
Jun 18, 2012, 1:29:46 PM6/18/12
to Jon Stevens, wepa...@googlegroups.com
Thanks, this confirms our observation. We are looking into that.
> 650-450-1321 <tel:650-450-1321>
>
>
>
>
>
> On 6/18/12 10:02 AM, Jon Stevens wrote:
> > On Mon, Jun 18, 2012 at 5:46 AM, prince <pri...@mobomo.com
> <mailto:pri...@mobomo.com>
> > <mailto:pri...@mobomo.com <mailto:pri...@mobomo.com>>> wrote:
> >
> > Hi,
> >
> > I am using the ruby SDK for WePay API and I keep getting
> Connection
> > reset by peer error while calling /oauth2/token API. My code was
> > working till last week and I didnt change anything in the
> code. Can
> > anyone help me?
> >
> >
> > Yup, I'm seeing this too. I reported it over the weekend as issue
> > #111984. Hopefully the WePay people will fix it soon. =)
> >
> > jon
> >
> > --
> > jon stevens
> > founder
> > 415-878-6678 <tel:415-878-6678>
signature.asc

Aleksey Sanin

unread,
Jun 19, 2012, 10:18:44 AM6/19/12
to Jon Stevens, wepa...@googlegroups.com
Jon, Prince,

We believe the issue should be resolved now. Please let us know if you
experience any issues.

Sorry for inconvenience,

Aleksey

--
Aleksey Sanin
WePay | VP of Engineering



On 6/18/12 10:28 AM, Jon Stevens wrote:
> Not seeing it in prod, only stage.
>
> Also not seeing it on stage from our 'sandbox' on google appengine which
> hits stage.
>
> I *only* see it from my laptop and hitting stage.
>
> We use different 'apps' for each. I tried creating a new app with new
> keys and still saw it.
>
> The picture is:
>
> laptop -> stage (yes)
> gae sandbox -> stage (no)
> gae prod -> prod (no)
>
> jon
>
>
> On Mon, Jun 18, 2012 at 10:23 AM, Aleksey Sanin <ale...@wepay.com
> <mailto:ale...@wepay.com>> wrote:
>
> Hi Jon, Prince,
>
> Do you experience problems on stage or production? We've heard
> reports about stage and we are looking into that. Would like
> to confirm that this doesn't happen in production.
>
> Aleksey
>
> --
> Aleksey Sanin
> WePay | VP of Engineering
> 650-450-1321 <tel:650-450-1321>
>
>
>
>
>
> On 6/18/12 10:02 AM, Jon Stevens wrote:
> > On Mon, Jun 18, 2012 at 5:46 AM, prince <pri...@mobomo.com
> <mailto:pri...@mobomo.com>
> > <mailto:pri...@mobomo.com <mailto:pri...@mobomo.com>>> wrote:
> >
> > Hi,
> >
> > I am using the ruby SDK for WePay API and I keep getting
> Connection
> > reset by peer error while calling /oauth2/token API. My code was
> > working till last week and I didnt change anything in the
> code. Can
> > anyone help me?
> >
> >
> > Yup, I'm seeing this too. I reported it over the weekend as issue
> > #111984. Hopefully the WePay people will fix it soon. =)
> >
> > jon
> >
> > --
> > jon stevens
> > founder
> > 415-878-6678 <tel:415-878-6678>
signature.asc

Prince Joseph

unread,
Jun 19, 2012, 10:26:53 AM6/19/12
to wepa...@googlegroups.com, Jon Stevens
Hi Aleksey,

The issue is resolved now. Thanks.
--
Thanks,
Prince

Aleksey Sanin

unread,
Jun 19, 2012, 11:53:21 AM6/19/12
to wepa...@googlegroups.com, Prince Joseph, Jon Stevens
Thank you for confirmation!

Aleksey

--
Aleksey Sanin
WePay | VP of Engineering




> > > 415-878-6678 <tel:415-878-6678> <tel:415-878-6678
> <tel:415-878-6678>>
> > >
> > > Voost <https://www.voo.st/>: A better way to manage athletic
> events -
> > > https://www.voo.st/
> > >
> >
> >
> >
> >
> >
> > --
> > jon stevens
> > founder
> > 415-878-6678 <tel:415-878-6678>
> >
> > Voost <https://www.voo.st/>: A better way to manage athletic events -
> > https://www.voo.st/
> >
>
>
>
>
>
> --
> Thanks,
> Prince
>


signature.asc

Prince Joseph

unread,
Jun 21, 2012, 6:28:06 AM6/21/12
to Aleksey Sanin, wepa...@googlegroups.com, Jon Stevens
Hi Aleksey,

The issue is again back on the staging server. Can you please look into the issue.
--
Thanks,
Prince

Aleksey Sanin

unread,
Jun 21, 2012, 10:22:04 AM6/21/12
to Prince Joseph, wepa...@googlegroups.com, Jon Stevens
Hi Prince,

I can't seem to reproduce it on our end. Could you please run
the following command:

for i in $(seq 1 100); do curl --header "User-Agent: testing" -k
https://stage.wepayapi.com/v2/user; echo "\n"; done

If everything works, you will see 100 json errors

{"error":"access_denied","error_description":"could not parse
authorization header, a valid access_token is required"}\n

If there are problems, then this script will "hang" and then
you will get a timeout error

Thanks,

Aleksey

--
Aleksey Sanin
WePay | VP of Engineering





On 6/21/12 3:28 AM, Prince Joseph wrote:
> Hi Aleksey,
>
> The issue is again back on the staging server. Can you please look into
> the issue.
>
> On Tue, Jun 19, 2012 at 9:23 PM, Aleksey Sanin <ale...@wepay.com
> <mailto:ale...@wepay.com>> wrote:
>
> Thank you for confirmation!
>
> Aleksey
>
> --
> Aleksey Sanin
> WePay | VP of Engineering
>
>
>
>
> On 6/19/12 7:26 AM, Prince Joseph wrote:
> > Hi Aleksey,
> >
> > The issue is resolved now. Thanks.
> >
> > On Tue, Jun 19, 2012 at 7:48 PM, Aleksey Sanin <ale...@wepay.com
> <mailto:ale...@wepay.com>
> <tel:415-878-6678>> <tel:415-878-6678 <tel:415-878-6678>
> > <tel:415-878-6678 <tel:415-878-6678>>>
> > > >
> > > > Voost <https://www.voo.st/>: A better way to manage
> athletic
> > events -
> > > > https://www.voo.st/
> > > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > jon stevens
> > > founder
> > > 415-878-6678 <tel:415-878-6678> <tel:415-878-6678
> <tel:415-878-6678>>
> > >
> > > Voost <https://www.voo.st/>: A better way to manage athletic
> events -
> > > https://www.voo.st/
> > >
> >
> >
> >
> >
> >
> > --
signature.asc

jonmumm

unread,
Jun 30, 2012, 12:19:32 PM6/30/12
to wepa...@googlegroups.com, Prince Joseph, Jon Stevens
I am having this problem on the staging server. I get the following error when making this call from rails console:

HTTParty.post 'https://stage.wepay.com/v2/oauth2/token', :body => { :client_id => ENV['WEPAY_CLIENT_ID'], :client_secret => ENV['WEPAY_CLIENT_SECRET'], :redirect_uri => "http://lvh.me:3000/wepay/auth", :code => "bbcd101c8fa660ee95084bcb8f0ae47197a975ddd8a1ab7ed8" }
Errno::ECONNRESET: Connection reset by peer
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/openssl/buffering.rb:174:in `sysread_nonblock'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/openssl/buffering.rb:174:in `read_nonblock'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/protocol.rb:141:in `rbuf_fill'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:1293:in `request'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:1286:in `block in request'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:745:in `start'
from /Users/mumm/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:1284:in `request'
from /Users/mumm/.rvm/gems/ruby-1.9.3-p0/gems/httparty-0.8.3/lib/httparty/request.rb:76:in `perform'
from /Users/mumm/.rvm/gems/ruby-1.9.3-p0/gems/httparty-0.8.3/lib/HTTParty.rb:400:in `perform_request'
from /Users/mumm/.rvm/gems/ruby-1.9.3-p0/gems/httparty-0.8.3/lib/HTTParty.rb:363:in `post'
from /Users/mumm/.rvm/gems/ruby-1.9.3-p0/gems/httparty-0.8.3/lib/HTTParty.rb:436:in `post'
from (irb):2

jonmumm

unread,
Jun 30, 2012, 12:23:01 PM6/30/12
to wepa...@googlegroups.com, Prince Joseph, Jon Stevens
I am able to POST to other HTTPS services using the same method without problem.

Andrew LeBlanc

unread,
Jun 30, 2012, 12:25:48 PM6/30/12
to wepa...@googlegroups.com
Hi Jon,

All API requests require a User-Agent header. If you specify a User-Agent header you calls should go through fine. I would recommend using our Ruby-SDK if you want to abstract away making the API call: https://github.com/wepay/Ruby-SDK

Andrew

jonmumm

unread,
Jun 30, 2012, 12:41:02 PM6/30/12
to wepa...@googlegroups.com
Hey Andrew,

Thanks for the speedy response. I can confirm, that when I add a User-Agent to my direct HTTP call, I do get a response. I was previously using the WePay-Rails Gem, which was also giving a connection reset by peer, even though it looks like it sets a User Agent (https://github.com/adamthedeveloper/wepay-rails/blob/master/lib/wepay-rails.rb). I will look in to using the Ruby SDK instead.

Thanks,
Jon

jonmumm

unread,
Jun 30, 2012, 12:51:04 PM6/30/12
to wepa...@googlegroups.com
It looks like the Rails gem that is pulled down from bundler is not the same as the version hosted on GitHub. The bundler version does not have the User-Agent addition for the HTTP calls. I've updated my Gemfile to point directly to the GitHub repo, but may want to ask the developer to update the gem.
Reply all
Reply to author
Forward
0 new messages