Unable to connect to Elasticsearch. Error: Request Timeout after 30000ms

hi,
I've been trying to simulate a Kibana to Elastic Connection. (As per the Link it was related to Kibana OSS, but I tried both Kibana and Kibana-oss, but still no luck.)

./bin/kibana --version
7.6.2

cat custom/config/kibana.yml

---
################################
# kibana_build_config_items
################################

server.name: kibana
server.host: "192.168.56.107"
elasticsearch.hosts: [ "http://192.168.56.103:9200" ]

and Starting using
./bin/kibana -c custom/config/kibana.yml

  log   [10:13:13.746] [info][plugins-system] Setting up [21] plugins: [usageCollection,metrics,timelion,apm_oss,uiActions,data,navigation,status_page,share,newsfeed,kibana_legacy,management,dev_tools,inspector,expressions,visualizations,embeddable,dashboard_embeddable_container,home,eui_utils,bfetch]
  log   [10:13:13.754] [info][plugins][usageCollection] Setting up plugin
  log   [10:13:13.757] [info][metrics][plugins] Setting up plugin
  log   [10:13:13.757] [info][plugins][timelion] Setting up plugin
  log   [10:13:13.758] [info][apm_oss][plugins] Setting up plugin
  log   [10:13:13.758] [info][data][plugins] Setting up plugin
  log   [10:13:13.763] [info][plugins][share] Setting up plugin
  log   [10:13:13.765] [info][home][plugins] Setting up plugin
  log   [10:13:13.770] [info][bfetch][plugins] Setting up plugin
  log   [10:13:13.775] [info][savedobjects-service] Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations...
  log   [10:13:13.803] [info][savedobjects-service] Starting saved objects migrations
  log   [10:13:43.803] [warning][savedobjects-service] Unable to connect to Elasticsearch. Error: Request Timeout after 30000ms

I can reach the ElasticURL correctly from the Kibana installed location using curl.

{
  "name" : "my_elastichost",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "_na_",
  "version" : {
    "number" : "7.6.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "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"
}

Not sure why its so hard to setup a simple elastic/kibana combination :frowning:

Can you explain more about it.

Sorry, i thought I put all the details in the OP. The error I'm getting and the configs I'm using etc.

Hello,

Where did you get that -c param for /bin/kibana? I don't remember that ever being available. Kibana should only load settings from the /config/kibana.yml file

Kibana can load from external config using -c
https://discuss.elastic.co/t/quick-question-how-to-start-kibana-with-custom-config-file/123247

Configuration at Elasticsearch.yml is

# ======================== Elasticsearch Custom Configuration =========================


## Modify this and make it dynamic later##
cluster.name: "my-cluster"
network.host: 0.0.0.0
discovery.seed_hosts: []

## X-Pack settings
## see https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-xpack.html
#
xpack.license.self_generated.type: trial
xpack.security.enabled: true
xpack.monitoring.collection.enabled: true

The only error at ElasticSearch end is:

[2020-05-05T11:03:51,163][WARN ][r.suppressed             ] [myserver] path: /.kibana, params: {index=.kibana}
org.elasticsearch.discovery.MasterNotDiscoveredException: null
	at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.onTimeout(TransportMasterNodeAction.java:220) [elasticsearch-7.6.2.jar:7.6.2]
	at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:325) [elasticsearch-7.6.2.jar:7.6.2]
	at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:252) [elasticsearch-7.6.2.jar:7.6.2]
	at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:598) [elasticsearch-7.6.2.jar:7.6.2]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:633) [elasticsearch-7.6.2.jar:7.6.2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:830) [?:?]
[2020-05-05T11:03:51,167][WARN ][r.suppressed             ] [myserver] path: /.kibana_task_manager, params: {index=.kibana_task_manager}
org.elasticsearch.discovery.MasterNotDiscoveredException: null
	at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.onTimeout(TransportMasterNodeAction.java:220) [elasticsearch-7.6.2.jar:7.6.2]
	at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:325) [elasticsearch-7.6.2.jar:7.6.2]
	at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:252) [elasticsearch-7.6.2.jar:7.6.2]
	at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:598) [elasticsearch-7.6.2.jar:7.6.2]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:633) [elasticsearch-7.6.2.jar:7.6.2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:830) [?:?]

At last found the problem !!

Put in following setting in elasticsearch.yml and it worked.

network.host: 0.0.0.0
discovery.type: single-node

That config setting only works for development version of Kibana (when you run it from source). Changing that to 0.0.0.0 worked because the default kibana.yml looks for elasticsearch on localhost (or 0.0.0.0).

oh. I didn't run from source. I ran from the binary and it worked

I could put network.host any value within the network segment and it works. (theoritically it was working before as well). The key setting was single-node for development/basic purposes.

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