Skip to content

Prevent crashing from incompatible nodes without http when logging#9181

Merged
jbudz merged 2 commits intoelastic:masterfrom
jbudz:warning-nodes-http-publish
Nov 23, 2016
Merged

Prevent crashing from incompatible nodes without http when logging#9181
jbudz merged 2 commits intoelastic:masterfrom
jbudz:warning-nodes-http-publish

Conversation

@jbudz
Copy link
Contributor

@jbudz jbudz commented Nov 22, 2016

Incompatible nodes without http enabled fail with the error cannot find publish_address of undefined because the check expects the http object to be defined when writing to server logs.

To test, add a node to your cluster with http.enabled: false that has a patch version mismatch(warning) or major/minor version mismatch (error) with kibana.

This adds a commit on top of the original PR, #8982

@tylersmalley
Copy link
Member

LGTM

Brought up a two node cluster:

  • bin/elasticsearch -E node.max_local_storage_nodes=5
  • bin/elasticsearch -E node.max_local_storage_nodes=5 -E node.master=false -E node.data=true -E http.enabled=false

Verified only one node had http enabled:
http://localhost:9200/_nodes?filter_path=nodes.*.name,nodes.*.http.publish_address

Before this PR:
log [16:56:22.595] [error][status][plugin:elasticsearch@6.0.0-alpha1] Status changed from red to red - Cannot read property 'publish_address' of undefined

With this PR:
This version of Kibana requires Elasticsearch v6.0.0-alpha1 on all nodes. I found the following incompatible nodes in your cluster: v5.0.1 @ 127.0.0.1:9200 (127.0.0.1), v5.0.1 @ (127.0.0.1)

@tylersmalley tylersmalley removed their assignment Nov 23, 2016
Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jbudz jbudz added the v5.2.0 label Nov 23, 2016
@jbudz jbudz merged commit 0e7b5c7 into elastic:master Nov 23, 2016
jbudz added a commit that referenced this pull request Nov 23, 2016
Backports PR #9181

**Commit 1:**
Do not crash for warning and error nodes without http published address

* Original sha: 89e6ded
* Authored by Daniel Hodan <danielhodan@avocode.com> on 2016-11-04T19:15:02Z
* Committed by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T15:16:47Z

**Commit 2:**
[es version check] Prevent failure on incompatible nodes without http

* Original sha: 020dfd3
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T16:20:23Z
jbudz added a commit that referenced this pull request Nov 23, 2016
Backports PR #9181

**Commit 1:**
Do not crash for warning and error nodes without http published address

* Original sha: 89e6ded
* Authored by Daniel Hodan <danielhodan@avocode.com> on 2016-11-04T19:15:02Z
* Committed by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T15:16:47Z

**Commit 2:**
[es version check] Prevent failure on incompatible nodes without http

* Original sha: 020dfd3
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T16:20:23Z
jbudz added a commit that referenced this pull request Nov 23, 2016
Backports PR #9181

**Commit 1:**
Do not crash for warning and error nodes without http published address

* Original sha: 89e6ded
* Authored by Daniel Hodan <danielhodan@avocode.com> on 2016-11-04T19:15:02Z
* Committed by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T15:16:47Z

**Commit 2:**
[es version check] Prevent failure on incompatible nodes without http

* Original sha: 020dfd3
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T16:20:23Z
jbudz pushed a commit that referenced this pull request Nov 23, 2016
…9209)

Backports PR #9181

**Commit 1:**
Do not crash for warning and error nodes without http published address

* Original sha: 89e6ded
* Authored by Daniel Hodan <danielhodan@avocode.com> on 2016-11-04T19:15:02Z
* Committed by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T15:16:47Z

**Commit 2:**
[es version check] Prevent failure on incompatible nodes without http

* Original sha: 020dfd3
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T16:20:23Z
jbudz pushed a commit that referenced this pull request Nov 23, 2016
…9207)

Backports PR #9181

**Commit 1:**
Do not crash for warning and error nodes without http published address

* Original sha: 89e6ded
* Authored by Daniel Hodan <danielhodan@avocode.com> on 2016-11-04T19:15:02Z
* Committed by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T15:16:47Z

**Commit 2:**
[es version check] Prevent failure on incompatible nodes without http

* Original sha: 020dfd3
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T16:20:23Z
epixa pushed a commit that referenced this pull request Nov 24, 2016
…9208)

Backports PR #9181

**Commit 1:**
Do not crash for warning and error nodes without http published address

* Original sha: 89e6ded
* Authored by Daniel Hodan <danielhodan@avocode.com> on 2016-11-04T19:15:02Z
* Committed by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T15:16:47Z

**Commit 2:**
[es version check] Prevent failure on incompatible nodes without http

* Original sha: 020dfd3
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T16:20:23Z
@LeeDr
Copy link

LeeDr commented Nov 28, 2016

I started up 1 5.0.2 Elasticsearch node with bin/elasticsearch -E node.max_local_storage_nodes=5

and 1 5.0.0 Elasticsearch node with bin/elasticsearch -E node.max_local_storage_nodes=5 -E node.master=false -E node.data=true -E http.enabled=false

Both of my nodes have x-pack installed. I got this red status from Monitoring which looks like the "before" message Tyler tested;

[plugin:monitoring@5.0.2] Status changed from yellow to red - Cannot read property 'publish_address' of undefined

More of the log including that message;

D:\5.0.2\kibana>bin\kibana.bat
  log   [16:56:22.948] [info][status][plugin:kibana@5.0.2] Status changed from uninitialized to green - Ready
  log   [16:56:22.985] [info][status][plugin:elasticsearch@5.0.2] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [16:56:23.009] [info][status][plugin:xpack_main@5.0.2] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [16:56:23.249] [warning] You're running Kibana 5.0.2 with some different versions of Elasticsearch. Update Kibana or Elasticsearch to the same version to prevent compatibility issues: v5.0.0 @ (127.0.0.1)
  log   [16:56:23.260] [info][status][plugin:graph@5.0.2] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [16:56:23.267] [info][status][plugin:elasticsearch@5.0.2] Status changed from yellow to green - Kibana index ready
  log   [16:56:23.284] [info][license][xpack] Imported license information from Elasticsearch: mode: trial | status: active | expiry date: 2016-12-28T09:44:42-06:00
  log   [16:56:23.347] [info][status][plugin:monitoring@5.0.2] Status changed from uninitialized to yellow - Waiting for Monitoring Health Check
  log   [16:56:23.359] [info][status][plugin:xpack_main@5.0.2] Status changed from yellow to green - Ready
  log   [16:56:23.362] [info][status][plugin:graph@5.0.2] Status changed from yellow to green - Ready
  log   [16:56:23.370] [info][status][plugin:reporting@5.0.2] Status changed from uninitialized to green - Ready
  log   [16:56:23.441] [info][status][plugin:security@5.0.2] Status changed from uninitialized to green - Ready
  log   [16:56:23.444] [warning][security] Session cookies will be transmitted over insecure connections. This is not recommended.
  log   [16:56:23.515] [info][status][plugin:console@5.0.2] Status changed from uninitialized to green - Ready
  log   [16:56:23.527] [error][status][plugin:monitoring@5.0.2] Status changed from yellow to red - Cannot read property 'publish_address' of undefined
  log   [16:56:25.193] [info][status][plugin:timelion@5.0.2] Status changed from uninitialized to green - Ready
  log   [16:56:25.200] [info][listening] Server running at http://localhost:5601
  log   [16:56:25.202] [info][status][ui settings] Status changed from uninitialized to green - Ready

@LeeDr
Copy link

LeeDr commented Nov 28, 2016

OK, there's an x-plugins PR for the similar issue with Monitoring. So this PR is verified in 5.0.2.

@epixa epixa added v5.1.1 and removed v5.1.1 labels Dec 8, 2016
@epixa epixa removed the v5.1.0 label Dec 8, 2016
airow pushed a commit to airow/kibana that referenced this pull request Feb 16, 2017
…lastic#9208)

Backports PR elastic#9181

**Commit 1:**
Do not crash for warning and error nodes without http published address

* Original sha: 89e6ded
* Authored by Daniel Hodan <danielhodan@avocode.com> on 2016-11-04T19:15:02Z
* Committed by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T15:16:47Z

**Commit 2:**
[es version check] Prevent failure on incompatible nodes without http

* Original sha: 020dfd3
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-22T16:20:23Z

Former-commit-id: 5c10f03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments