Hello Everyone,
I am new to ELK stack, I am trying to install elasticsearch and kibana using containers, and can't get kibana to work.
docker run -d --pod elk -e ELASTICSEARCH_HOSTS=http://localhost:9200 --name kibana docker.elastic.co/kibana/kibana:7.6.2
docker run -d --pod elk --name elasticsearch --ulimit=host -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.6.2
- I made sure ES is reachable from the kibana (and from the outside)
curl "http://localhost:9200"
gives
{
"name" : "elk",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "YmAj-PyDQQKE5ikqo0BZQw",
"version" : {
"number" : "7.6.2",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "ef48eb35cf30adf4db14086e8aabd07ef6fb113f",
"build_date" : "2020-03-26T06:34:37.794943Z",
"build_snapshot" : false,
"lucene_version" : "8.4.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
and curl -XGET localhost:9200/_cluster/allocation/explain?pretty
{
"index" : "test-index",
"shard" : 0,
"primary" : false,
"current_state" : "unassigned",
"unassigned_info" : {
"reason" : "CLUSTER_RECOVERED",
"at" : "2020-04-21T16:03:38.658Z",
"last_allocation_status" : "no_attempt"
},
"can_allocate" : "no",
"allocate_explanation" : "cannot allocate because allocation is not permitted to any of the nodes",
"node_allocation_decisions" : [
{
"node_id" : "wrpctUmgQfa8fRO0qEPCnQ",
"node_name" : "elk",
"transport_address" : "10.0.2.100:9300",
"node_attributes" : {
"ml.machine_memory" : "8206983168",
"xpack.installed" : "true",
"ml.max_open_jobs" : "20"
},
"node_decision" : "no",
"deciders" : [
{
"decider" : "same_shard",
"decision" : "NO",
"explanation" : "the shard cannot be allocated to the same node on which a copy of the shard already exists [[test-index][0], node[wrpctUmgQfa8fRO0qEPCnQ], [P], s[STARTED], a[id=dpZ_qktvTEOj36phH37oIw]]"
}
]
}
]
}
The logs give me this:
{"type":"response","@timestamp":"2020-04-21T16:41:09Z","tags":[],"pid":2,"method":"get","statusCode":503,"req":{"url":"/","method":"get","headers":{"host":"localhost:5601","user-agent":"Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate","connection":"keep-alive","upgrade-insecure-requests":"1","dnt":"1"},"remoteAddress":"127.0.0.1","userAgent":"127.0.0.1"},"res":{"statusCode":503,"responseTime":30082,"contentLength":9},"message":"GET / 503 30082ms - 9.0B"}
{"type":"log","@timestamp":"2020-04-21T16:41:49Z","tags":["warning","monitoring","kibana-monitoring"],"pid":2,"message":"Error: Request Timeout after 30000ms\n at /usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:397:9\n at Timeout.<anonymous> (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:429:7)\n at ontimeout (timers.js:436:11)\n at tryOnTimeout (timers.js:300:5)\n at listOnTimeout (timers.js:263:5)\n at Timer.processTimers (timers.js:223:10)"}
{"type":"log","@timestamp":"2020-04-21T16:41:49Z","tags":["warning","monitoring","kibana-monitoring"],"pid":2,"message":"Unable to bulk upload the stats payload to the local cluster"}
{"type":"log","@timestamp":"2020-04-21T16:41:59Z","tags":["warning","monitoring","kibana-monitoring"],"pid":2,"message":"Error: Request Timeout after 30000ms\n at /usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:397:9\n at Timeout.<anonymous> (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:429:7)\n at ontimeout (timers.js:436:11)\n at tryOnTimeout (timers.js:300:5)\n at listOnTimeout (timers.js:263:5)\n at Timer.processTimers (timers.js:223:10)"}
I tried to connect to ES using python and it works fine.