1

이미지를 업로드하는 데 fog-google을 사용하려고합니다. 내 Google 클라우드 저장 공간. 내 코드는 다음과 같습니다 : 연결이 성공적으로 설정되지 않은 것처럼 Excon::Error::Socket: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A (OpenSSL::SSL::SSLError)Excon :: Error :: Socket :: SSL_connect SYSCALL 반환 된 값 = 5 errno = 0 상태 = SSLv2/v3 읽기 서버 안녕하세요 (OpenSSL :: SSL :: SSLError)

이 보인다 :

config.paperclip_defaults = { 
    storage: :fog, 
    fog_host: "https://#{ENV.fetch('GOOGLE_STORAGE_BUCKET')}.storage.googleapis.com", 
    fog_credentials: { 
     google_storage_access_key_id: ENV.fetch('GOOGLE_STORAGE_ID'), 
     google_storage_secret_access_key: ENV.fetch('GOOGLE_STORAGE_SECRET'), 
     provider: 'Google' }, 
    fog_directory: ENV.fetch('GOOGLE_STORAGE_BUCKET') } 

그러나, 나는 항상이 오류가 발생합니다. 여기

오류 로그입니다 :

당신이 URL은 https를 도달하는 것을 시도하고 귀하의 경우 SSL을 확인하는 데 실패 때문입니다
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.59.0/lib/excon/ssl_socket.rb:117:in `connect_nonblock' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.59.0/lib/excon/ssl_socket.rb:117:in `initialize' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.59.0/lib/excon/connection.rb:404:in `new' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.59.0/lib/excon/connection.rb:404:in `socket' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.59.0/lib/excon/connection.rb:101:in `request_call' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.59.0/lib/excon/middlewares/mock.rb:48:in `request_call' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.59.0/lib/excon/middlewares/instrumentor.rb:26:in `request_call' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.59.0/lib/excon/middlewares/base.rb:16:in `request_call' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.59.0/lib/excon/middlewares/base.rb:16:in `request_call' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.59.0/lib/excon/middlewares/base.rb:16:in `request_call' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.59.0/lib/excon/connection.rb:250:in `request' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-core-1.45.0/lib/fog/core/connection.rb:81:in `request' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-xml-0.1.3/lib/fog/xml/connection.rb:9:in `request' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-google-0.6.0/lib/fog/storage/google_xml/real.rb:103:in `request' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-google-0.6.0/lib/fog/storage/google_xml/requests/head_object.rb:36:in `head_object' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-google-0.6.0/lib/fog/storage/google_xml/models/files.rb:81:in `head' 
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/paperclip-5.1.0/lib/paperclip/storage/fog.rb:65:in `exists?' 
+0

프록시를 사용할 수 있습니까? 대부분의 경우 프록시는 이러한 종류의 문제를 초래할 수있는 핸드 셰이크를 방해합니다. – geemus

답변

0

Windows에서 Linux로 전환 할 때 작동합니다.

0

.

시도 OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

편집을 추가 - 중간 공격

에서 남자에 대한 귀하의 우려 또한 당신은 다음과 SSL 인증서를 추가하여 응용 프로그램을 확인할 수는

    단계
  • https://curl.haxx.se/ca/cacert.pem을 path_to_file \ cacert.pem에 다운로드하십시오. 텍스트 파일이 아닌 .pem 파일로 저장하십시오.

  • 설정 환경 변수 : SSL_CERT_FILE = path_to_file\cacert.pem

  • 다시 모든 루비/레일 응용 프로그램과 지금 접근 재시도.

+0

나는 이것이 좋은 생각이라고 생각하지 않는다. 나는 중간 공격에서 사람을 막고 싶다. – SwordW

+0

그러면 응용 프로그램 ssl을 확인해보십시오. –

+0

내 응용 프로그램에서 excon – SwordW