{"id":32,"date":"2020-02-21T20:15:25","date_gmt":"2020-02-21T19:15:25","guid":{"rendered":"https:\/\/www.famille-lafay.fr\/wordpress\/?p=32"},"modified":"2022-04-28T18:37:20","modified_gmt":"2022-04-28T16:37:20","slug":"a-test-of-impatience","status":"publish","type":"post","link":"https:\/\/www.famille-lafay.fr\/wordpress\/?p=32","title":{"rendered":"A test of (im)patience"},"content":{"rendered":"\n<p>Among the qualities that help someone working intensively with computers, one that I&#8217;m definitely <strong>not<\/strong> short of is impatience. So when, as I was investigating an issue with the ELK stack, I had seemingly random long freezes of Kibana, I couldn&#8217;t simply live with it&#8230;<\/p>\n\n\n\n<p>I had a simple local setup to try to reproduce my problem : out-of-the-zip elasticsearch and kibana servers, and nginx in front, proxying <code>\/kibana<\/code> to <code>localhost:5601<\/code>. While changing the configuration of kibana to account for nginx, I set <code>server.basePath<\/code> (to <code>\/kibana<\/code>), but also <code>server.host<\/code> to <code>0.0.0.0<\/code>, matching the real environment (where nginx may be on another machine).<\/p>\n\n\n\n<p>When checking the network tab in Chrome&#8217;s DevTools, I was seeing some more or less random calls taking almost exactly one minute to complete, very far from the usual few tens of milliseconds. The logs of nginx gave it away : sometimes, nginx would try both the ipv4 and ipv6 looopback addresses, starting with the ipv6 one. I would have guessed that since kibana was only listening on the ipv4 addresses, that would immediately fail, but as it happens, it only timeouts, after (of course !) exactly one minute. Then nginx tries the <code>127.0.0.1<\/code> address, which works normally, and keeps using it for a while, until it deems a good idea to check again if there is now someone listening on <code>[::1]:5601<\/code>, and bam, another (very) long call. The fix is either to configure nginx to send to <code>127.0.0.1:5601<\/code> instead of <code>localhost:5601<\/code>, or to set <code>server.host<\/code> to <code>::0<\/code> in kibana&#8217;s config.<\/p>\n\n\n\n<p>And the issue I had in the first place ? It turned out to be an <a href=\"https:\/\/github.com\/elastic\/kibana\/pull\/57986\">actual bug<\/a> in kibana, which was much easier to find without constantly losing focus because of the one minute pauses.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Among the qualities that help someone working intensively with computers, one that I&#8217;m definitely not short of is impatience. So when, as I was investigating an issue with the ELK stack, I had seemingly random long freezes of Kibana, I couldn&#8217;t simply live with it&#8230; I had a simple local setup to try to reproduce &hellip; <a href=\"https:\/\/www.famille-lafay.fr\/wordpress\/?p=32\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">A test of (im)patience<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.famille-lafay.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/32"}],"collection":[{"href":"https:\/\/www.famille-lafay.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.famille-lafay.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.famille-lafay.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.famille-lafay.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32"}],"version-history":[{"count":1,"href":"https:\/\/www.famille-lafay.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":33,"href":"https:\/\/www.famille-lafay.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions\/33"}],"wp:attachment":[{"href":"https:\/\/www.famille-lafay.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.famille-lafay.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.famille-lafay.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}