Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the kibana error log? Is there a kibana error log?

Tags:

kibana-4

QUESTION: how do I debug kibana? Is there an error log?

  • PROBLEM 1: kibana 4 won't stay up
  • PROBLEM 2: I don't know where/if kibana 4 is logging errors

DETAILS: Here's me starting kibana, making a request to the port, getting nothing, and checking the service again. The service doesn't stay up, but I'm not sure why.

vagrant@default-ubuntu-1204:/opt/kibana/current/config$ sudo service kibana start kibana start/running, process 11774  vagrant@default-ubuntu-1204:/opt/kibana/current/config$ curl -XGET 'http://localhost:5601' curl: (7) couldn't connect to host  vagrant@default-ubuntu-1204:/opt/kibana/current/config$ sudo service kibana status kibana stop/waiting 

Here's the nginx log, reporting when I curl -XGET from port 80, which is forwarding to port 5601:

2015/06/15 17:32:17 [error] 9082#0: *11 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: kibana, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5601/", host: "localhost" 

UPDATE: I may have overthought this a bit. I'm still interested in ways to view the kibana log, however! Any suggestions are appreciated!

I've noticed that when I run kibana from the command-line, I see errors that are more descriptive than a "Connection refused":

vagrant@default-ubuntu-1204:/opt/kibana/current$ bin/kibana {"@timestamp":"2015-06-15T22:04:43.344Z","level":"error","message":"Service Unavailable","node_env":"production","error":{"message":"Service Unavailable","name":"Error","stack":"Error: Service Unavailable\n  at respond (/usr/local/kibana-4.0.2/src/node_modules/elasticsearch/src/lib/transport.js:235:15)\n  at checkRespForFailure (/usr/local/kibana-4.0.2/src/node_modules/elasticsearch/src/lib/transport.js:203:7)\n  at HttpConnector.<anonymous> (/usr/local/kibana-4.0.2/src/node_modules/elasticsearch/src/lib/connectors/http.js:156:7)\n  at IncomingMessage.bound (/usr/local/kibana-4.0.2/src/node_modules/elasticsearch/node_modules/lodash-node/modern/internals/baseBind.js:56:17)\n  at IncomingMessage.emit (events.js:117:20)\n  at _stream_readable.js:944:16\n  at process._tickCallback (node.js:442:13)\n"}} {"@timestamp":"2015-06-15T22:04:43.346Z","level":"fatal","message":"Service Unavailable","node_env":"production","error":{"message":"Service Unavailable","name":"Error","stack":"Error: Service Unavailable\n  at respond (/usr/local/kibana-4.0.2/src/node_modules/elasticsearch/src/lib/transport.js:235:15)\n  at checkRespForFailure (/usr/local/kibana-4.0.2/src/node_modules/elasticsearch/src/lib/transport.js:203:7)\n  at HttpConnector.<anonymous> (/usr/local/kibana-4.0.2/src/node_modules/elasticsearch/src/lib/connectors/http.js:156:7)\n  at IncomingMessage.bound (/usr/local/kibana-4.0.2/src/node_modules/elasticsearch/node_modules/lodash-node/modern/internals/baseBind.js:56:17)\n  at IncomingMessage.emit (events.js:117:20)\n  at _stream_readable.js:944:16\n  at process._tickCallback (node.js:442:13)\n"}} vagrant@default-ubuntu-1204:/opt/kibana/current$ 
like image 387
MonkeyWidget Avatar asked Jun 15 '15 21:06

MonkeyWidget


People also ask

Where do kibana logs go?

OK, so Kibana logs to stdout by default, which depending on how you run it, may actually go to a file or just to stdout, which for a headless process, is effectively nowhere. In kibana. yml, you can configure logging. dest and point to wherever in the filesystem you want your logs to go.

How do I check logs in kibana dashboard?

Now that you have successfully created an Index Pattern you can go to the “Discover” tab in Kibana and view the logs. Under the Discover tab select the created Index Pattern you would be able to view the published logs.

Why kibana logs are not showing?

Resolution. Check whether the Elasticsearch service is up and running by using the command. If the service is not running, restart the elasticsearch service by using the service elasticsearch restart command.


1 Answers

Kibana 4 logs to stdout by default. Here is an excerpt of the config/kibana.yml defaults:

# Enables you specify a file where Kibana stores log output. # logging.dest: stdout 

So when invoking it with service, use the log capture method of that service. For example, on a Linux distribution using Systemd / systemctl (e.g. RHEL 7+):

journalctl -u kibana.service

One way may be to modify init scripts to use the --log-file option (if it still exists), but I think the proper solution is to properly configure your instance YAML file. For example, add this to your config/kibana.yml:

logging.dest: /var/log/kibana.log 

Note that the Kibana process must be able to write to the file you specify, or the process will die without information (it can be quite confusing).

As for the --log-file option, I think this is reserved for CLI operations, rather than automation.

like image 136
Eric Platon Avatar answered Sep 20 '22 19:09

Eric Platon