{"id":1902,"date":"2021-05-08T22:19:00","date_gmt":"2021-05-08T13:19:00","guid":{"rendered":"https:\/\/nobunobu1717.site\/?p=1902"},"modified":"2021-05-08T22:19:00","modified_gmt":"2021-05-08T13:19:00","slug":"post-1902","status":"publish","type":"post","link":"https:\/\/nobunobu1717.site\/?p=1902","title":{"rendered":"\u3010Rails\u3011Heroku\u306eRedis\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u5f8c\u306b\u63a5\u7d9a\u3067\u304d\u306a\u304f\u306a\u3063\u305f\u6642\u306e\u89e3\u6c7a\u30e1\u30e2"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#i\"><span class=\"toc_number toc_depth_1\">1<\/span> \u6982\u8981<\/a><\/li><li><a href=\"#i-2\"><span class=\"toc_number toc_depth_1\">2<\/span> \u80cc\u666f<\/a><\/li><li><a href=\"#i-3\"><span class=\"toc_number toc_depth_1\">3<\/span> \u89e3\u6c7a\u65b9\u6cd5<\/a><\/li><\/ul><\/div>\n<h2><span id=\"i\">\u6982\u8981<\/span><\/h2>\n<p>Heroku\u4e0a\u3067Redis\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u5b9f\u65bd\u5f8c\u306b\u3001Rails\u30a2\u30d7\u30ea\u3067\u63a5\u7d9a\u304c\u4e0d\u53ef\u80fd\u306b\u306a\u3063\u305f\u969b\u306e\u89e3\u6c7a\u30e1\u30e2\u3002<\/p>\n\n\t<p style=\"color:#666;margin-bottom:5px;\">\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af<\/p>\n\t<div class=\"middle-ad\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\n\n<h2><span id=\"i-2\">\u80cc\u666f<\/span><\/h2>\n<p>Heroku\u3067\u306fRedis\u3092\u5229\u7528\u53ef\u80fd\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u63d0\u4f9b\u3055\u308c\u304a\u308a\u3001Rails\u30a2\u30d7\u30ea\u7b49\u3067Redis\u3092\u4f7f\u7528\u53ef\u80fd\u3067\u3059\u3002<br \/>\nHobby Dev\u30d7\u30e9\u30f3\u3068\u3044\u3063\u305f\u7121\u6599\u3067\u4f7f\u7528\u53ef\u80fd\u306a\u30d7\u30e9\u30f3\u3082\u63d0\u4f9b\u3055\u308c\u3066\u304a\u308a\u3001\u3061\u3087\u3063\u3068\u3057\u305fWEB\u30b5\u30a4\u30c8\u3067\u4f7f\u7528\u3059\u308b\u5206\u306b\u306f\u554f\u984c\u306a\u3044\u30ec\u30d9\u30eb\u3067\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<br \/>\nHobby Dev\u30d7\u30e9\u30f3\u306eRedis\u306b\u95a2\u3057\u3066\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30d0\u30fc\u30b8\u30e7\u30f34\u30685\u306e\u30b5\u30dd\u30fc\u30c8\u505c\u6b62\u304c\u30a2\u30ca\u30a6\u30f3\u30b9\u3055\u308c\u3066\u304a\u308a\u30d0\u30fc\u30b8\u30e7\u30f36\u3078\u306e\u79fb\u884c\u304c\u30a2\u30ca\u30a6\u30f3\u30b5\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\nhttps:\/\/devcenter.heroku.com\/articles\/heroku-redis-hobby-deprecation<\/p>\n<p>\u4eca\u56de\u3001\u30d0\u30fc\u30b8\u30e7\u30f36\u3078\u306e\u79fb\u884c\u3092\u884c\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u79fb\u884c\u5f8c\u306b\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304cRails\u306e\u30ed\u30b0\u306b\u51fa\u529b\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u3001Redis\u306b\u63a5\u7d9a\u304c\u51fa\u6765\u3066\u3044\u306a\u3044\u4e8b\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true \" >error accepting a client connection: error:1408f10b:ssl routines:ssl3_get_record:wrong version number<\/pre>\n\n\t<p style=\"color:#666;margin-bottom:5px;\">\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af<\/p>\n\t<div class=\"middle-ad\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\n\n<h2><span id=\"i-3\">\u89e3\u6c7a\u65b9\u6cd5<\/span><\/h2>\n<p>\u3069\u3046\u3084\u3089\u3001Redis6\u304b\u3089TLS\u3067\u306e\u63a5\u7d9a\u304c\u8981\u6c42\u3055\u308c\u308b\u3088\u3046\u306b\u5909\u308f\u3063\u305f\u3088\u3046\u3067\u3059\u3002<br \/>\n\u3067\u3059\u304c\u3001Heroku\u5185\u90e8\u3067\u306fSSL\u3092\u7121\u52b9\u5316\u3057\u3066HTTP\u306b\u30d5\u30a9\u30a2\u30ef\u30fc\u30c9\u3057\u3066\u63a5\u7d9a\u3057\u3066\u3044\u308b\u305f\u3081\u3001SSL\u3067\u306e\u63a5\u7d9a\u3092OFF\u306b\u3057\u3066\u63a5\u7d9a\u3059\u308c\u3070\u826f\u3044\u3088\u3046\u3067\u3059\u3002<br \/>\nhttps:\/\/stackoverflow.com\/questions\/65834575\/how-to-enable-tls-for-redis-6-on-sidekiq<\/p>\n<p>\u3068\u3044\u3046\u4e8b\u3067\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306bssl_params\u3092\u8ffd\u52a0\u3057\u3066\u5b9f\u65bd\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true \" >  config.cache_store = :redis_cache_store, { url: ENV[\"REDIS_URL\"], ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } }\r\n<\/pre>\n<p>\u7d50\u679c\u3068\u3057\u3066\u3001\u6b8b\u5ff5\u306a\u304c\u3089\u75c7\u72b6\u304c\u5909\u308f\u3089\u305a\u3002<br \/>\n\u516c\u5f0f\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u898b\u308b\u3068\u3001\u3069\u3046\u3084\u3089\u3053\u308c\u3060\u3051\u3067\u306f\u8db3\u3089\u306a\u3044\u3088\u3046\u3067\u3059\u3002<br \/>\nhttps:\/\/devcenter.heroku.com\/ja\/articles\/securing-heroku-redis<\/p>\n\n\t<p style=\"color:#666;margin-bottom:5px;\">\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af<\/p>\n\t<div class=\"middle-ad\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\n\n<p>\u8981\u7d04\u3059\u308b\u3068\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<ul>\n<li>URL\u306fredis\u3067\u306f\u306a\u304f\u3001rediss\u3068\u3059\u308b\u3002<\/li>\n<li>\u4f7f\u7528\u3059\u308bRedis\u306e\u30dd\u30fc\u30c8\u306b+1\u3057\u305f\u756a\u53f7\u3092\u4f7f\u7528\u3059\u308b\u3002<\/li>\n<\/ul>\n<p>heroku config | grep REDIS\u3000\u3067REDIS\u95a2\u4fc2\u306eURL\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b\u3068\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true \" >HEROKU_REDIS_CYAN_TLS_URL: rediss:\/\/:xxxx@ec2-xxxx.compute-1.amazonaws.com:13890\r\nHEROKU_REDIS_CYAN_URL:     redis:\/\/:xxxx@ec2-xxxx.compute-1.amazonaws.com:13889\r\nREDIS_URL:                 redis:\/\/:xxxx@ec2-xxxx.compute-1.amazonaws.com:13890<\/pre>\n<p>Reids\u95a2\u4fc2\u306e\u74b0\u5883\u5909\u6570\u306f\u3001Redis\u4f5c\u6210\u6642\u306b\u81ea\u52d5\u3067\u8a2d\u5b9a\u3055\u308c\u308b\u3088\u3046\u3067\u3001\u8272\u306e\u540d\u524d(CYAN)\u304c\u4ed8\u3044\u305f\u3082\u306e\u304c\u81ea\u52d5\u3067\u4f5c\u6210\u3055\u308c\u308b\u3088\u3046\u3067\u3059\u3002<br \/>\nHEROKU_REDIS_CYAN_TLS_URL\u304c\u305d\u306e\u307e\u307e\u4f7f\u3048\u305d\u3046\u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u4f7f\u3046\u304bREDIS_URL\u3092\u66f8\u304d\u63db\u3048\u3066\u3001rediss\u3067\u63a5\u7d9a\u3059\u308b\u3088\u3046\u306b\u3059\u308c\u3070\u826f\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\n\n\t<p style=\"color:#666;margin-bottom:5px;\">\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af<\/p>\n\t<div class=\"middle-ad\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\n\n<p>\u4e0a\u8a18\u306e\u901a\u308a\u6b63\u3057\u3044URL\u3068ssl_params\u3092\u8a2d\u5b9a\u3059\u308b\u4e8b\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u305b\u305a\u306b\u63a5\u7d9a\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contents1 \u6982\u89812 \u80cc\u666f3 \u89e3\u6c7a\u65b9\u6cd5 \u6982\u8981 Heroku\u4e0a\u3067Redis\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u5b9f\u65bd\u5f8c\u306b\u3001Rails\u30a2\u30d7\u30ea\u3067\u63a5\u7d9a\u304c\u4e0d\u53ef\u80fd\u306b\u306a\u3063\u305f\u969b\u306e\u89e3\u6c7a\u30e1\u30e2\u3002 \u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af \u80cc\u666f Heroku\u3067 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":1278,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[33,32],"tags":[],"_links":{"self":[{"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/posts\/1902"}],"collection":[{"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1902"}],"version-history":[{"count":1,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/posts\/1902\/revisions"}],"predecessor-version":[{"id":1904,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/posts\/1902\/revisions\/1904"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/media\/1278"}],"wp:attachment":[{"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}