Nginx file for hosting kibana 5.3.2 not working


(Luvpreet Singh) #1

I am having trouble on hosting kibana 5.3.2

The same file is working on 1 machine but not on another,

upstream kibana {
    server 127.0.0.1:5601;
}

server {
    listen 80;
    server_name x.y.z.a; # here it is the IP

    location / {
             proxy_pass http://kibana;
             proxy_http_version 1.1;
             proxy_set_header Connection "Keep-Alive";
             proxy_set_header Proxy-Connection "Keep-Alive";

            access_log /var/log/nginx/access-80.log;
            error_log  /var/log/nginx/error-80.log;

    }

It is working on my local machine, but not on server


(Shaunak Kashyap) #2

Can you SSH to your server, and run curl -v http://127.0.0.1:5601 from the command line? What do you get back?

Also, when you say it's not working, exactly what symptoms are you seeing?


(Luvpreet Singh) #3
monitoring-server@monitoring-server:~$ curl -v http://127.0.0.1:5601
* Rebuilt URL to: http://127.0.0.1:5601/
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 5601 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1:5601 
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< kbn-name: kibana
< kbn-version: 5.3.2
< cache-control: no-cache 
< content-type: text/html; charset=utf-8
< content-length: 231
< accept-ranges: bytes
< Date: Mon, 08 May 2017 07:24:26 GMT
< Connection: keep-alive
< 
<script>var hashRoute = '/kibana/app/kibana';
var defaultRoute = '/kibana/app/kibana';

var hash = window.location.hash;
if (hash.length) {
  window.location = hashRoute + hash;
} else {
  window.location = defaultRoute;
* Connection #0 to host 127.0.0.1 left intact
 }</script>
monitoring-server@monitoring-server:~$ 

This is what I get.


(Shaunak Kashyap) #4

That output from curl looks good. It tells us that your server is able to connect to Kibana (upstream) and get back the expected response.

So the issue now must be somewhere with the nginx layer. When you say that it is not working, exactly what are you seeing? Are there any messages in your browser? What about in the nginx access and error logs?


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.