Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Errno::ECONNRESET(通过对等方重置连接-SSL\U连接)_Ssl_Heroku_Rackspace - Fatal编程技术网

Errno::ECONNRESET(通过对等方重置连接-SSL\U连接)

Errno::ECONNRESET(通过对等方重置连接-SSL\U连接),ssl,heroku,rackspace,Ssl,Heroku,Rackspace,我们的代码在heroku服务器上生成了一个异常,因为最近几个小时。在此之前,它在同一台服务器上用相同的代码工作正常 例外情况是Errno::ECONNRESET(由对等方重置连接-SSL\u connect)heroku服务器 我们得到异常的代码行是: response = http.request(request, json_data) 此异常的可能原因/解决方案是什么 def self.get_response_from_v2(url,json_data) http = Net:

我们的代码在heroku服务器上生成了一个异常,因为最近几个小时。在此之前,它在同一台服务器上用相同的代码工作正常

例外情况是
Errno::ECONNRESET(由对等方重置连接-SSL\u connect)
heroku服务器

我们得到异常的代码行是:

response = http.request(request, json_data) 
此异常的可能原因/解决方案是什么

  def self.get_response_from_v2(url,json_data)
  http = Net::HTTP.new(url.host, 443)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  request = Net::HTTP::Post.new(url.path, {'Content-Type' => 'application/json'})
  request.basic_auth url.user, url.password if url.user
  response = http.request(request, json_data)
  result = JSON.parse(response.body)
  result
end
我们尝试了以下解决方案: