Ruby Net::OpenTimeout: execution expired

后端 未结 3 1314
借酒劲吻你
借酒劲吻你 2021-02-20 04:53

I\'m consistently getting this error on several hosts on my machine, e.g.:

require \'open-uri\'
open(\'https://google.com\').read


Net::OpenTimeout: execution e         


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-20 05:19

    Looks like it's a an issue with how Ruby resolves DNS.

    Added require 'resolv-replace' and now it's opening connections immediately.

    Sources: https://stackoverflow.com/a/27485369/116925 https://github.com/ruby/ruby/pull/597#issuecomment-40507119

提交回复
热议问题