简体   繁体   English

使用Savon over HTTPS的Rails:对等重置连接

[英]Rails with Savon over HTTPS: Connection reset by peer

I am using Savon to connect to a web service endpoint via HTTP without issue. 我正在使用Savon通过HTTP连接到Web服务端点而没有问题。 I can do this via SoapUI and via Savon. 我可以通过SoapUI和Savon做到这一点。 I now have to hit an HTTPS endpoint. 我现在必须命中一个HTTPS端点。 I was able to do this with SoapUI (without providing any additional authentication credentials), but when I attempt to connect via Savon, I am getting a "SocketError: Connection reset by peer". 我可以使用SoapUI来做到这一点(不提供任何其他身份验证凭据),但是当我尝试通过Savon连接时,出现“ SocketError:对等重置连接”。 My code is simple: 我的代码很简单:

client = Savon.client(wsdl: "/ws/services/mainservice?wsdl") 客户端= Savon.client(wsdl:“ / ws / services / mainservice?wsdl”)

client.operations 客户运作

As you can see I am simply trying to display the available operations. 如您所见,我只是试图显示可用的操作。 Am I missing something here? 我在这里想念什么吗? Is SoapUI doing somthing "under the covers" that I need to do to the Savon client object? SoapUI是否正在对Savon客户端对象做“需要做的事情”?

Note: One thing to note is that when I point SoapUI to the wsdl, all is correct save for the endpoint on an individual request. 注意:需要注意的一件事是,当我将SoapUI指向wsdl时,对于单个请求上的端点,所有设置都是正确的。 This is "Http" rather than "https". 这是“ Http”而不是“ https”。 Changing this though makes things work as expected, still without implicitly providing credentials. 更改此设置虽然可使事情按预期工作,但仍未隐式提供凭据。

I guess the client tries to verify the SSL certificate. 我猜客户端会尝试验证SSL证书。 Hence you haven't given one it fails. 因此,您没有给出失败的答案。 You might try this: 您可以尝试以下方法:

client = Savon.client(wsdl: "/ws/services/mainservice?wsdl",
                      ssl_verify_mode: :none)

client.operations

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 nginx,unicorn和rails通过对等错误重置连接 - connection reset by peer error with nginx, unicorn and rails Rails 3.1:ECONNRESET(对等方重置连接 - Rails 3.1: ECONNRESET (Connection reset by peer 104:通过对等方重置连接:nginx +彩虹+超过1 mb的上传 - 104: Connection reset by peer: nginx + rainbows + over 1 mb uploads 由Heroku上的对等方重置连接 - Connection reset by peer on Heroku Bluehost上的Rails:“由对等方重置连接” mod_fcgid错误 - Rails on Bluehost: “Connection reset by peer” mod_fcgid error Rails 3.0发送电子邮件错误:Errno :: ECONNRESET(对等连接重置) - Rails 3.0 Sending Email Error: Errno::ECONNRESET (Connection reset by peer) Redis / SideKiq / Rails连接被同级重置-SSL_connect - Redis/SideKiq/Rails Connection reset by peer - SSL_connect Errno::ECONNRESET:Rails 中的对等方使用 rest-client 重置连接 - Errno::ECONNRESET: Connection reset by peer in Rails using rest-client Errno :: ECONNRESET:对等重置连接 - Errno::ECONNRESET: Connection reset by peer rails db:migrate导致Errno :: ECONNRESET,在capistrano部署期间由对等方重置连接 - rails db:migrate causing Errno::ECONNRESET, Connection reset by peer during capistrano deployment
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM