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
Ruby FTPS错误,带有双包FTPS_Ruby_Ssl_Ftps - Fatal编程技术网

Ruby FTPS错误,带有双包FTPS

Ruby FTPS错误,带有双包FTPS,ruby,ssl,ftps,Ruby,Ssl,Ftps,我正在尝试使用以下代码使用Ruby gem double_bag_FTPS连接到FTPS服务器 require 'double_bag_ftps' ftps = DoubleBagFTPS.new ftps.ssl_context = DoubleBagFTPS.create_ssl_context(:verify_mode => OpenSSL::SSL::VERIFY_NONE) ftps.connect('xx.xx.xx.xx') ftps.login('user', 'passw

我正在尝试使用以下代码使用Ruby gem double_bag_FTPS连接到FTPS服务器

require 'double_bag_ftps'
ftps = DoubleBagFTPS.new
ftps.ssl_context = DoubleBagFTPS.create_ssl_context(:verify_mode => OpenSSL::SSL::VERIFY_NONE)
ftps.connect('xx.xx.xx.xx')
ftps.login('user', 'password')
files = ftps.nlst
puts files.length
尝试连接时出现以下错误

/home/indika/.rvm/gems/ruby-1.9.3-p0@global/gems/double-bag-ftps-0.1.0/lib/double_bag_ftps.rb:148:in `connect': Broken pipe - SSL_connect (Errno::EPIPE)
        from /home/msc22/.rvm/gems/ruby-1.9.3-p0@global/gems/double-bag-ftps-0.1.0/lib/double_bag_ftps.rb:148:in `ssl_socket'
        from /home/msc22/.rvm/gems/ruby-1.9.3-p0@global/gems/double-bag-ftps-0.1.0/lib/double_bag_ftps.rb:125:in `transfercmd'
        from /home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/ftp.rb:478:in `block (2 levels) in retrlines'
        from /home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/ftp.rb:178:in `with_binary'
        from /home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/ftp.rb:477:in `block in retrlines'
        from /home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
        from /home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/ftp.rb:476:in `retrlines'
        from /home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/ftp.rb:703:in `nlst'
        from backup_collector.rb:8:in `<main>'
/home/indika/.rvm/gems/ruby-1.9.3-p0@global/gems/double-bag-ftps-0.1.0/lib/double-bag-ftps.rb:148:in'connect':断管-SSL\u connect(Errno::EPIPE)
from/home/msc22/.rvm/gems/ruby-1.9.3-p0@global/gems/double-bag-ftps-0.1.0/lib/double-bag-ftps.rb:148:in'ssl\u socket'
from/home/msc22/.rvm/gems/ruby-1.9.3-p0@global/gems/double-bag-ftps-0.1.0/lib/double_-bag_-ftps.rb:125:in'transfercmd'
from/home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/ftp.rb:478:in`block(2层)in retrline'
from/home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/ftp.rb:178:in'with_binary'
from/home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/ftp.rb:477:in'block in retrline'
from/home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in'mon_synchronize'
from/home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/ftp.rb:476:in'retrline'
from/home/msc22/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/ftp.rb:703:in'nlst'
从备份收集器.rb:8:in`'

非常感谢您的帮助。

您使用的是什么ruby版本?如果您使用的是ruby 2.4,请点击这里:您使用的是什么ruby版本?如果您使用的是ruby 2.4,请点击此处: