Skip to content

Advanced Search Settings page does not load if the ES url is unreachable

Note: The fix for this issue should be backported to %13.11 and %13.12 by applying the appropriate Pick into label on the MR.

Summary

The Advanced Search settings page does a check to see if Elasticsearch is available via the ES client Ping API. The ping call is rescuing from StandardError in an attempt to handle unreachable hosts, but we are still seeing timeouts at the web server level.

Steps to reproduce

  1. Open a rails console
  2. Set the elasticsesarch_url to an impossible IP ApplicationSetting.update(elasticsearch_url: "http://192.0.2.0:9200")
  3. Open the Admin UI - Settings - Advanced Search Settings page
  4. Verify it takes awhile to load then eventually times out and throws an error

What is the current bug behavior?

Page takes a long time to load and eventually times out.

What is the expected correct behavior?

Advanced Search page should load even if Elasticsearch isn't reachable.

Relevant logs and/or screenshots

Some customer tickets (external links)

#299991 (comment 573604337)

#299991 (comment 579529508)

Possible fixes

Shorten the timeout that ping waits before it throws an error.

Edited by Terri Chu