0

I have installed Elastisearch 2.1.0 and kibana 4.3.0 in single machine. Kibana.yml Configurations :

# Kibana is served by a back end server. This controls which port to use.
  server.port: 5601
# The host to bind the server to.
  server.host: "IP"
# A value to use as a XSRF token. This token is sent back to the server on each request
# and required if you want to execute requests from other clients (like curl).
# server.xsrf.token: ""
# If you are running kibana behind a proxy, and want to mount it at a path,
# specify that path here. The basePath can't end in a slash.
# server.basePath: ""
# The Elasticsearch instance to use for all your queries.
  elasticsearch.url: "http://IP:9200/"
# preserve_elasticsearch_host true will send the hostname specified in `elasticsearch`. If you set it to false,
# then the host you use to connect to *this* Kibana instance will be sent.
  elasticsearch.preserveHost: true
# Kibana uses an index in Elasticsearch to store saved searches, visualizations
# and dashboards. It will create a new index if it doesn't already exist.
  kibana.index: ".kibana"
# The default application to load.
  kibana.defaultAppId: "discover"
# If your Elasticsearch is protected with basic auth, these are the user credentials
# used by the Kibana server to perform maintenance on the kibana_index at startup. Your Kibana
# users will still need to authenticate with Elasticsearch (which is proxied through
# the Kibana server)
# elasticsearch.username: "user"
# elasticsearch.password: "pass"
# SSL for outgoing requests from the Kibana Server to the browser (PEM formatted)
# server.ssl.cert: /path/to/your/server.crt
# server.ssl.key: /path/to/your/server.key
# Optional setting to validate that your Elasticsearch backend uses the same key files (PEM formatted)
# elasticsearch.ssl.cert: /path/to/your/client.crt
# elasticsearch.ssl.key: /path/to/your/client.key
# If you need to provide a CA certificate for your Elasticsearch instance, put
# the path of the pem file here.
# elasticsearch.ssl.ca: /path/to/your/CA.pem
# Set to false to have a complete disregard for the validity of the SSL
# certificate.
  elasticsearch.ssl.verify: true
# Time in milliseconds to wait for elasticsearch to respond to pings, defaults to
# request_timeout setting
# elasticsearch.pingTimeout: 1500
# Time in milliseconds to wait for responses from the back end or elasticsearch.
# This must be > 0
# elasticsearch.requestTimeout: 300000
# Time in milliseconds for Elasticsearch to wait for responses from shards.
# Set to 0 to disable.
# elasticsearch.shardTimeout: 0
# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying
# elasticsearch.startupTimeout: 5000
# Set the path to where you would like the process id file to be created.
  pid.file: /var/run/kibana.pid
# If you would like to send the log output to a file you can set the path below.
  logging.dest: /var/log/kibana/kibana.log
# Set this to true to suppress all logging output.
# logging.silent: false
# Set this to true to suppress all logging output except for error messages.
# logging.quiet: true
# Set this to true to log all events, including system usage information and all requests.
# logging.verbose: true

While I am doing curl -IP:5601 , I am getting this output:

**HTTP/1.1 200 OK
x-app-name: kibana
x-app-version: 4.3.0
cache-control: no-cache
content-type: text/html
content-length: 217
accept-ranges: bytes
Date: Wed, 20 Jan 2016 15:28:35 GMT
Connection: keep-alive
<script>var hashRoute = '/app/kibana';
var defaultRoute = '/app/kibana';
var hash = window.location.hash;
if (hash.length) {
  window.location = hashRoute + hash;
} else {
  window.location = defaultRoute;
</script>

Elasticsearch and kibana both are up and running still I am not able to access Kibana GUI from the browser. It is not displaying the page.

I checked the configurations of elasticsearch.yml too.The host and IP is correct there. Curl command is giving this output for elasticsearch [Command :curl http://IP:9200/]

{
  "name" : "node-1",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "2.1.0",
    "build_hash" : "72cd1f1a3eee09505e036106146dc1949dc5dc87",
    "build_timestamp" : "2015-11-18T22:40:03Z",
    "build_snapshot" : false,
    "lucene_version" : "5.3.1"
  },
  "tagline" : "You Know, for Search"
}

Could anybody tell what could be the issue.

Lovika
  • 577
  • 2
  • 10
  • 21
  • Are you running your curl on the same host as ES and Kibana? In your `elasticsearch.yml` configuration file, what do you have for `network.bind_host`? – Val Jan 20 '16 at 10:15
  • yes I am running curl on the same host as ES and kibana and network.bind_host is the IP of the host where ES and kibana is installed – Lovika Jan 20 '16 at 10:41
  • Is that a private IP address, i.e. `10.x.y.z`? – Val Jan 20 '16 at 10:41
  • No it is not a private IP address – Lovika Jan 20 '16 at 11:47
  • What do you see if you run this from your local machine: `curl -v IP:5601`? – Val Jan 20 '16 at 11:48
  • GET / HTTP/1.1 User-Agent: curl/7.29.0 Host: 10.155.153.74:5601 Accept: */* > < HTTP/1.1 200 OK < x-app-name: kibana < x-app-version: 4.3.0 < cache-control: no-cache < content-type: text/html < content-length: 217 < accept-ranges: bytes < Date: Wed, 20 Jan 2016 17:19:57 GMT < Connection: keep-alive < – Lovika Jan 20 '16 at 11:51
  • This is the value which I got when I run curl -v IP:5601 – Lovika Jan 20 '16 at 11:52
  • And if you open the developer tools of your browser, do you see any Javascript errors in the console when loading Kibana? What do you see instead of the Kibana home page? – Val Jan 20 '16 at 11:52
  • No just that "This page can't be displayed" – Lovika Jan 20 '16 at 11:54
  • Ok, one more, what does this yield when run from your local machine: `curl -v IP:5601/app/kibana` ? – Val Jan 20 '16 at 11:55
  • > GET / HTTP/1.1 > ost: 10.155.153.74:5601 Accept: */* > < HTTP/1.1 200 OK < x-app-name: kibana < x-app-version: 4.3.0 < cache-control: no-cache < content-type: text/html < content-length: 217 < accept-ranges: bytes < Date: Wed, 20 Jan 2016 17:19:57 GMT < Connection: keep-alive < – Lovika Jan 20 '16 at 11:57
  • Kibanawindow.__KBN__ = {"app – Lovika Jan 20 '16 at 11:58
  • ":{"id":"kibana","title":"Kibana","description":"the kibana you know and love","main":"plugins/kibana/kibana","url":"/app/kibana"},"nav":[{"id":"kibana","title":"Kibana","description":"the kibana you know and love","main":"plugins/kibana/kibana","url":"/app/kibana"}],"version":"4.3.0","buildNum":9369,"buildSha":"e32749e1fa442853975ce2abd5ac2fd88a2dcf58","basePath":"","vars":{"kbnDefaultAppId":"discover","kbnIndex":".kibana","esShardTimeout":0," – Lovika Jan 20 '16 at 11:58
  • esApiVersion":"2.0"},"xsrfToken":"b2a66f292320f4139d1436d3b6061c714d0fd4561ad59089e93981e80e8bad17"}; – Lovika Jan 20 '16 at 11:58
  • dom.setAttribute('src', file); dom.addEventListener('load', next); document.head.appendChild(dom); } else { dom.setAttribute('rel', 'stylesheet'); dom.setAttribute('href', file); document.head.appendChild(dom); next(); } }()); This is the end part of the output – Lovika Jan 20 '16 at 11:58
  • And you're running a [supported browser](https://www.elastic.co/support/matrix#matrix_browsers), not some IE crap, right? – Val Jan 20 '16 at 12:01
  • yes I tried to open the URL in chrome – Lovika Jan 20 '16 at 12:02
  • Ok, since it's a public IP, would you share it so I can test from here? I understand if you don't want to, but you can remove the comment afterwards. – Val Jan 20 '16 at 12:03
  • I checked httpd service also, that is is active state – Lovika Jan 20 '16 at 12:03
  • I suppose you can't use it.. it starts with 10 so I guess its a private IP – Lovika Jan 20 '16 at 12:04
  • There you go! That's probably why. You can still make it work if you can set up a SSH tunnel between your local machine and that host though. – Val Jan 20 '16 at 12:07
  • ohkay how do I do that? more over the local machine which I am using to load kibana has private IP – Lovika Jan 20 '16 at 12:08
  • `ssh -L 9200:10.x.y.z:9200 user@10.x.y.z` (make sure to replace user and IP), then open `http://localhost:9200` in your browser and that should do it. http://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html – Val Jan 20 '16 at 12:10
  • shouldn't I use the FQDN which I mentioned in kibana.yml instead of localhost? – Lovika Jan 20 '16 at 12:12
  • This command is giving me error "channel_setup_fwd_listener: cannot listen to port: 9200" – Lovika Jan 20 '16 at 12:13
  • With SSH tunneling, you're accessing a private IP through a port on your local machine, so that should work. You might need to set up SSH keys though. The link I gave should explain it in more details. – Val Jan 20 '16 at 12:14
  • okay but why is it saying that cannot listen to port :9200, just checked with cat /etc/services | grep 9200 got this output "wap-wsp 9200/tcp # WAP connectionless session service wap-wsp 9200/udp # WAP connectionless session service " – Lovika Jan 20 '16 at 12:18
  • while I tried curl -v IP:5601/app/kibana at end this line came "* Connection #0 to host tvmatp326579d.ad.infosys.com left intact " does it mean it is not able to listen to port or something? – Lovika Jan 20 '16 at 12:53

2 Answers2

0

Did you install elasticsearch and kibana on your local machine, I mean your laptop or computer that you are workng on? Or is it running on a separate server?

If you are running it on the same machine that you are accessing the browser, then you could just access it as localhost:port

  • I checked in kibana log file I got this error "{"type":"log","@timestamp":"2016-01-22T18:03:07+00:00","tags":["status","plugin:elasticsearch","error"],"pid":7147,"name":"plugin:elasticsearch","state":"red","message":"Status changed from green to red - Service Unavailable","prevState":"green","prevMsg":"Kibana index ready"} {"type":"log","@timestamp":"2016-01-22T18:03:09+00:00","tags":["status","plugin:elasticsearch","error"],"pid":7147,"name":"plugin:elasticsearch","state":"red","message":"Status changed from red to red - Elasticsearch is still initializing the kibana index... – Lovika Jan 22 '16 at 12:46
  • Trying again in 2.5 second.","prevState":"red","prevMsg":"Service Unavailable"} {"type":"log","@timestamp":"2016-01-22T18:03:22+00:00","tags":["error","elasticsearch"],"pid":7147,"message":"Request error, retrying -- connect ECONNREFUSED"} {"type":"log","@timestamp":"2016-01-22T18:03:22+00:00","tags":["warning","elasticsearch"],"pid":7147,"message":"Unable to revive connection: " Can somebody tell me how to resolve this error? As when i try to do curl -v IP:9200 for elasticsearch it is working perfectly fine – Lovika Jan 22 '16 at 12:46
0

As your error includes the status

Elasticsearch is still initializing the kibana index, I would recommend you to try the steps mentioned in this page:-

Elasticsearch is still initializing the kibana index

Community
  • 1
  • 1
Yuvraj Gupta
  • 2,475
  • 16
  • 26