I’m having issues with the API. I always get a ‘Connection reset by peer’. For everyone else I asked to test my code it’s working. What went wrong? I’m very sure we tested always the same code.
Could you use something like Wireshark to intercept the packets and compare the cURL one against the Ruby one. The stack trace isn’t really giving you enough information here.
Does this also contain the browser/cURL request? Also, what happens if you replace https with http in the jruby script? Do you get the “Requests must be made over SSL” error or do you still get Connection Reset.
I first did the curl, then a ping to heise (to see the change better) and then the jruby…
If I try to access the API via jruby with out SSL I get the error message… {"error"=>"Bad Request", "status"=>400, "message"=>"Requests must be made over SSL"}
The issue is clearly with the SSL, you can see the full handshake on top which is missing from the jruby one. And it’s confirmed by that second test. Unfortunately I don’t know enough about jruby or SSL handshake to help you with this, but that gives you specific keywords to google and hopefully fix your installation.
If I had to guess, this is because your jruby is not negotiating SSL using high enough encryption. Make sure that jruby is connecting with TLS1.2, which should fix this issue.