Kibana sometimes refuses connection behind nginx

I am running Kibana 4.1.2 behind nginx 1.8.0. I am also running Icinga 2 which checks if Kibana is running. In my nginx error log there is (for each check) this error:

2015/09/22 09:22:38 [error] 10626#0: *186124 connect() failed (111: Connection refused) while connecting to upstream, client:, server:, request: "GET / HTTP/1.1", upstream: "http://[::1]:5601/", host: ""

My nginx config (mostly consisting of stuff I found on the internet when I tried to fix Kibana):

upstream kibana {
    server localhost:5601 fail_timeout=5;
    keepalive 64;

server {
    listen 443;
    listen [::]:443;

    location / {
        proxy_pass http://kibana;
        proxy_set_header  Connection "Keep-Alive";
        proxy_set_header  Proxy-Connection "Keep-Alive";
        proxy_set_header  Connection "";
        proxy_set_header  X-Real-IP  $remote_addr;
        proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header  Host $http_host;
        proxy_pass_header Access-Control-Allow-Origin;
        proxy_pass_header Access-Control-Allow-Methods;
        proxy_hide_header Access-Control-Allow-Headers;
        add_header        Access-Control-Allow-Headers 'X-Requested-With, Content-Type';
        add_header        Access-Control-Allow-Credentials true;

Proxying other applications does not give these errors, so I suspect Kibana (or my configuration) to be the problem.

What can I do in this case?

I'm not sure what is meant by this.

Just fixed it. It was supposed to mean Icinga 2.

Could you provide details of the fix? I'm hitting a similar issue. Thanks!

With "fixed" i meant my message. Haven't fixed Kibana. Abandoned it.

Ah, I see -- my apologies for the misread. Thanks for following up.