winlin
Goto Top

Ruby und AWS S3 Test

Hallo

ich habe auf meiner RedHat VM Ruby-Rails installiert mit dieser Anleitung:
https://access.redhat.com/documentation/en-us/openshift_container_platfo ...

Wenn ich ein Ruby Skript in der IRB (interactive ruby shell) ausführe dann erhalte ich SSL Proxy Errors obwohl ich
require 'net/http'  
require 'net/https'  

eingegeben habe. Der Fehler ist folgender:

irb(main):004:0> load './connectivity-test.rb'  
/home/user1/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/ssl_socket.rb:142:in `connect_nonblock': SSL_connect returned=1 errno=0 peeraddr=172.23.180.1:8080 state=error: certificate verify failed (unable to get local issuer certificate) (OpenSSL::SSL::SSLError) Unable to verify certificate. This may be an issue with the remote host or with Excon. Excon has certificates bundled, but these can be customized: (Excon::Error::Certificate)  

            `Excon.defaults[:ssl_ca_path] = path_to_certs`
            `ENV['SSL_CERT_DIR'] = path_to_certs`  
            `Excon.defaults[:ssl_ca_file] = path_to_file`
            `ENV['SSL_CERT_FILE'] = path_to_file`  
            `Excon.defaults[:ssl_verify_callback] = callback`
                (see OpenSSL::SSL::SSLContext#verify_callback)
or:
            `Excon.defaults[:ssl_verify_peer] = false` (less secure).
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/ssl_socket.rb:142:in `initialize'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/connection.rb:471:in `new'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/connection.rb:471:in `socket'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/connection.rb:118:in `request_call'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/middlewares/mock.rb:57:in `request_call'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/middlewares/instrumentor.rb:34:in `request_call'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/middlewares/idempotent.rb:19:in `request_call'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/middlewares/base.rb:22:in `request_call'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/middlewares/base.rb:22:in `request_call'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/connection.rb:283:in `request'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/middlewares/idempotent.rb:50:in `error_call'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/middlewares/base.rb:17:in `error_call'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/middlewares/base.rb:17:in `error_call'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/connection.rb:312:in `rescue in request'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/connection.rb:227:in `request'  
        from /home/cloud-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/excon-0.94.0/lib/excon/middlewares/idempotent.rb:50:in `error_call'  
        ... 21 levels...

Welche Classes muss ich noch hinzufügen?

Ich habe auch den Proxy als env variable gesetzt mit:
ENV['http_proxy'] = 'http://172.23.180.1:8080'  
ENV['https_proxy'] = 'http://172.23.180.1:8080'  

Content-Key: 4904551585

Url: https://administrator.de/contentid/4904551585

Printed on: April 27, 2024 at 06:04 o'clock