Cannot Get Enterprise Search Beta1 to work

#1

I have a clean build of Fedora/ELK running with Oracle 8 JDK, but cannot get EES to work - getting the following;

Found java executable in PATH
Java version: 1.8.0_211

Starting the following Elastic Enterprise Search stack components:

  • An application server
  • A pool of background workers
  • A pool of connectors
  • A filebeat instance for indexing logs

forego | starting app-server.1 on port 5000
forego | starting background-worker.1 on port 5100
forego | starting filebeat.1 on port 5300
forego | starting connectors.1 on port 5600
background-worker.1 | ERROR: org.jruby.exceptions.SystemExit: (SystemExit) exit
app-server.1 |
app-server.1 | --------------------------------------------------------------------------------
app-server.1 |
app-server.1 | Invalid config file (/usr/downloads/enterprisesearch-0.1.0-beta1/config/enterprise_search.yml):
app-server.1 | The setting '#/' contains additional properties ["listen_host", "listen_port"] outside of the schema when none are allowed
app-server.1 |
app-server.1 | --------------------------------------------------------------------------------
app-server.1 |
app-server.1 | ERROR: org.jruby.exceptions.SystemExit: (SystemExit) exit
forego | sending SIGTERM to app-server.1
forego | sending SIGTERM to connectors.1
forego | sending SIGTERM to filebeat.1
connectors.1 | ERROR: org.jruby.exceptions.LoadError: (LoadError) load error: /tmp/jruby7238240652883867351extract/frito_togo/lib/frito_togo -- java.lang.NoClassDefFoundError: jnr/constants/platform/linux/Errno$StringTable
filebeat.1 | ERROR: org.jruby.exceptions.LoadError: (LoadError) load error: /tmp/jruby9169685294815892085extract/config/application -- java.lang.NoClassDefFoundError: org/jruby/RubyEnumerable$57

Two things; I set the listen address and port... I also have not yet set up security in the ELK Trial. (I will set up security just to rule it out)

Help! (Thanks!)

(Kellen Evan) #2

Hello @christopher.farmer ~

Welcome to the community! :tada:

I'm wondering if you can show me your config?

I was able to reproduce this error by only commenting out the listen_host and listen_port:

#ent_search:
  listen_host: 127.0.0.1
  listen_port: 3002

Make sure sure that ent_search is not commented out as well, then try again. :slight_smile:

ent_search:
  listen_host: 127.0.0.1
  listen_port: 3002

Kellen

#3

I did comment out all four of those settings (I only had the first two listen values set) and things appear to be running. However, it doesn't help because this is running Fedora server 27. No GUI.

I now get this:

Found java executable in PATH
Java version: 1.8.0_211

Starting the following Elastic Enterprise Search stack components:

  • An application server
  • A pool of background workers
  • A pool of connectors
  • A filebeat instance for indexing logs

forego | starting app-server.1 on port 5000
forego | starting background-worker.1 on port 5100
forego | starting filebeat.1 on port 5300
forego | starting connectors.1 on port 5600
app-server.1 | [2019-05-10T15:25:07.853+00:00][2449][2000][rails][INFO]: Enterprise Search version=0.1.0-beta1, JRuby version=9.2.5.0, Ruby version=2.5.0, Rails version=4.2.11.1
filebeat.1 | [2019-05-10T15:25:07.931+00:00][2451][2000][rails][INFO]: Enterprise Search version=0.1.0-beta1, JRuby version=9.2.5.0, Ruby version=2.5.0, Rails version=4.2.11.1
background-worker.1 | [2019-05-10T15:25:07.854+00:00][2450][2000][rails][INFO]: Enterprise Search version=0.1.0-beta1, JRuby version=9.2.5.0, Ruby version=2.5.0, Rails version=4.2.11.1
connectors.1 | [2019-05-10T15:25:07.836+00:00][2453][2000][rails][INFO]: Enterprise Search version=0.1.0-beta1, JRuby version=9.2.5.0, Ruby version=2.5.0, Rails version=4.2.11.1
background-worker.1 | Creating Filebeat log directory: /usr/downloads/enterprisesearch-0.1.0-beta1/log

Config is now stock...

Thanks,

-Chris

(Kellen Evan) #4

@christopher.farmer It can take some time to get started.

That stack looks good to me!

Kellen

#5

But if I can't set the listen address, won't it default to localhost? I am running a server version - no GUI.

Thanks Kellen,

-Chris

(Kellen Evan) #6

@christopher.farmer

Ahh ~ let's back up a bit.

I think the error above was because the config was commented.

You'd need to have 3 lines uncommented for each network config to ensure the right nesting, eg:

#
# Web application host and port.
#
ent_search:
  listen_host: [MY_LISTEN_HOST]
  listen_port: [MY_LISTEN_PORT]
#
# Web application external_host and external_port. Users will go to this endpoint to access the
# app. This can be any format as long as it is reachable by the user. eg. IP, FQDN, short name
# encoded via /etc/hosts, etc. For simple solutions such as testing, external_host and external_port
# will fall back to listen_host and listen_port, respectively. In practice, it's best for these to
# match whichever URL is exposed to your users.
#
ent_search:
  external_host: [MY_EXTERNAL_HOST]
  external_port: [MY_EXTERNAL_PORT]
#
#7

So let me make sure I have this correct... because both of these fields seem somewhat similar, although I can understand why you would have them. However, if I just wanted to go to http://192.168.30.70:3002 for now and not specify an "external" or as I see it, alternate way in over 80 or 443, I could leave external_host and external_host commented out with no values.

But are you saying I HAVE to fill out all four? Like this:

ent_search:
listen_host: 192.168.30.70
listen_port: 3002

ent_search:
external_host: 192.168.30.70
external_port: 443

So to boil my question down; did it fail because I left external host and port commented out?

Thanks!

-Chris

(Kellen Evan) #8

Hey Chris --

You don't have to fill out all four.

I think the initial failure was because ent_search was still commented, like this:

#ent_search:
  listen_host: [LISTEN_HOST]
  listen_port: [LISTEN_PORT]

Based on what you've provided me, this looks like what you want:

#
# Web application host and port.
#
#ent_search:
#  listen_host: [MY_LISTEN_HOST]
# listen_port: [MY_LISTEN_PORT]
#
# Web application external_host and external_port. Users will go to this endpoint to access the
# app. This can be any format as long as it is reachable by the user. eg. IP, FQDN, short name
# encoded via /etc/hosts, etc. For simple solutions such as testing, external_host and external_port
# will fall back to listen_host and listen_port, respectively. In practice, it's best for these to
# match whichever URL is exposed to your users.
#
ent_search:
  external_host: 192.168.30.70
  external_port: 443
#
#9

Ohhhh! Ha! It’s not a comment. I think I assumed that because Kibana and Elasticsearch have single line values - I blanked out on realizing it was a section header.

Funny. Kinda.

Thanks Kellen…

-Chris

#10

Latest errors...

Found java executable in PATH
Java version: 1.8.0_211

Starting the following Elastic Enterprise Search stack components:

  • An application server
  • A pool of background workers
  • A pool of connectors
  • A filebeat instance for indexing logs

forego | starting app-server.1 on port 5000
forego | starting background-worker.1 on port 5100
forego | starting filebeat.1 on port 5300
forego | starting connectors.1 on port 5600
connectors.1 | ERROR: org.jruby.exceptions.SystemExit: (SystemExit) exit
app-server.1 |
app-server.1 | --------------------------------------------------------------------------------
app-server.1 |
app-server.1 | Invalid config file (/usr/downloads/enterprisesearch-0.1.0-beta1/config/enterprise_search.yml):
app-server.1 | /usr/downloads/enterprisesearch-0.1.0-beta1/config/enterprise_search.yml is not a valid YAML file.
app-server.1 |
app-server.1 | --------------------------------------------------------------------------------
app-server.1 |
app-server.1 | ERROR: org.jruby.exceptions.SystemExit: (SystemExit) exit
filebeat.1 | ERROR: org.jruby.exceptions.SystemExit: (SystemExit) exit
forego | sending SIGTERM to filebeat.1
forego | sending SIGTERM to app-server.1
forego | sending SIGTERM to background-worker.1
background-worker.1 | ERROR: org.jruby.exceptions.LoadError: (LoadError) load error: /tmp/jruby4770862330392161473extract/shared_togo/lib/shared_togo -- java.lang.NoClassDefFoundError: jnr/constants/platform/linux/Errno$StringTable

enterprise_search.yml

## ================== Elastic Enterprise Search Configuration ==================

#

# NOTE: Elastic Enterprise Search comes with reasonable defaults for most settings.

# Before adjusting the configuration, make sure you understand what you

# are trying to accomplish and the consequences.

#

# NOTE: For passwords, the use of environment variables is encouraged

# to keep values from being written to disk, e.g.

# elasticsearch.password: ${ELASTICSEARCH_PASSWORD:changeme}

#

# ---------------------------------- Network ----------------------------------

#

# Web application host and port.

#

#ent_search:

#listen_host: 192.168.30.70

#listen_port: 3002

#

# Web application external_host and external_port. Users will go to this endpoint to access the

# app. This can be any format as long as it is reachable by the user. eg. IP, FQDN, short name

# encoded via /etc/hosts, etc. For simple solutions such as testing, external_host and external_port

# will fall back to listen_host and listen_port, respectively. In practice, it's best for these to

# match whichever URL is exposed to your users.

#

ent_search:

external_host: 192.168.30.70

external_port: 3002

#

# ------------------------------- Elasticsearch -------------------------------

#

# Set the full url to your Elasticsearch cluster.

#

elasticsearch.host: http://192.168.30.70:9200

#

# If you change Elasticsearch credentials, ensure they match here:

#

#elasticsearch:

# username: elastic

# password: changeme

#

# ---------------------------------- Emails -----------------------------------

#

# Enable email settings for Enterprise Search.

# Read more:

# https://swiftype.com/documentation/enterprise-search/guides/smtp-mailer

#

#email.account:

# enabled: false

# smtp:

# auth: plain

# starttls.enable: false

# host: 127.0.0.1

# port: 25

# user:

# password:

# email_defaults:

# from:

# url_host:

#

# ----------------------------------- APIs ------------------------------------

#

# Set to hide product version information from API responses.

#

#hide_version_info: false

#

# ----------------------------- Diagnostics report ----------------------------

#

# Choose the path where diagnostic reports will be generated.

#

#diagnostic_report_directory: diagnostics

#

# ---------------------------------- Logging ----------------------------------

#

# Choose your log export path.

#

#log_directory:

#

# Log level can be: info, warn, error, fatal, or unknown.

#

#log_level: info

#

# Choose your Filebeat logs export path.

#

#filebeat_log_directory: log

#

# ---------------------------------- Session ----------------------------------

#

# Set to persist user sessions through process restarts. The key is generated

# on binary startup.

#

#secret_session_key:

#

# ---------------------------------- Secrets ----------------------------------

# Set to decrypt session information through restarts. Key can be supplied

# by you, or you can use the generated key provided during binary startup.

#

#secret_management:

# encryption_keys:

# -

#

# ---------------------------------- Cluster ----------------------------------

#

# Set this to true and run Elastic Enterprise Search with a "manage" cluster

# permission to allow it to automatically disable index auto-creation using the

# Elasticsearch Cluster Settings API. Otherwise, you will need to manually

# configure your elasticsearch.yml or your cluster settings.

# This is only required for the initial boot, as it will be persisted by the

# Elasticsearch cluster.

# See README.md for more details.

#

allow_es_settings_modification: false

#

# (UNSUPPORTED) Set to ignore our recommended cluster settings and continue at

# your own risk

#

#disable_es_settings_checks: false

Thanks,

-Chris

(Kellen Evan) #11

Chris --

Thanks for your feedback on this. It'll help us smooth out the user experience going forward and highlight places we need better documentation.

This error suggests that something isn't quite right with the YAML file.

Try validating the config within your text editor, or using something like: http://www.yamllint.com, then try again.

Kellen

#12

Update: After letting this run for about 15-20 minutes on the new server, I am now getting an interface via port 3002 in a browser. It may be the security not being set up? (I set xpack.security.enabled: true in all the nodes, reset them, ran bin/elasticsearch-setup-passwords interactive and provided credentials in the enterprise_search.yml configuration). For sanity's sake, let me add that I tried everything on this new server that I did on the previous server and no dice until I set up security.

Thanks Kellen. Since my last post, I cleaned the bits off my primary node and spun up a new server to hash this out on... so I have a clean, three node cluster with Kibana running on the primary node... all seems healthy. I enabled security and now have my configuration files specifying credentials when required... everything seem hunky dory as far as ELK is concerned. I will beat up on EES with this new server - pointing the the ES instance.

So far, I get this on the new server:

[root@intsvr-030-080 enterprisesearch-0.1.0-beta1]# ./bin/enterprise-search 
Found java executable in PATH
Java version: 1.8.0_211

Starting the following Elastic Enterprise Search stack components:
  - An application server
  - A pool of background workers
  - A pool of connectors
  - A filebeat instance for indexing logs

forego              | starting app-server.1 on port 5000
forego              | starting background-worker.1 on port 5100
forego              | starting filebeat.1 on port 5300
forego              | starting connectors.1 on port 5600
filebeat.1          | [2019-05-10T22:34:29.410+00:00][2326][2000][rails][INFO]: Enterprise Search version=0.1.0-beta1, JRuby version=9.2.5.0, Ruby version=2.5.0, Rails version=4.2.11.1
connectors.1        | [2019-05-10T22:34:29.384+00:00][2327][2000][rails][INFO]: Enterprise Search version=0.1.0-beta1, JRuby version=9.2.5.0, Ruby version=2.5.0, Rails version=4.2.11.1
app-server.1        | [2019-05-10T22:34:29.396+00:00][2322][2000][rails][INFO]: Enterprise Search version=0.1.0-beta1, JRuby version=9.2.5.0, Ruby version=2.5.0, Rails version=4.2.11.1
background-worker.1 | [2019-05-10T22:34:31.585+00:00][2324][2000][rails][INFO]: Enterprise Search version=0.1.0-beta1, JRuby version=9.2.5.0, Ruby version=2.5.0, Rails version=4.2.11.1

I am running a new build of Fedora Server 27, Oracle JDK 8 and EES Beta 1

Thanks,

-Chris

#13

Next Hurdle:

Login Name: ent-search@example.com Password: changeme does not work.

Authentication has failed

Please try connecting again
(Nick Erber) #14

I do have these problems as well.
I'm using debian 9.8.

Before I configured Xpack Security and set the passwords, the Enterprise Search always bound itself to 127.0.0.1, no matter which settings I set in listen_host or external_host.
After starting bin/enterprise-search it said:

app-server.1        | Success! Elastic Enterprise Search has started and will soon be accessible.
app-server.1        |
app-server.1        |   * Login by visiting: http://localhost:3002
app-server.1        |   * Default credentials: ent-search@example.com / changeme
app-server.1        |   * Visit the documentation: https://swiftype.com/documentation/enterprise- 
search

netstat told me, that the process was bound to 127.0.0.1:3002
I was able to curl http://localhost:3002 but was not able to reach that page from outside.

After I configured Xpack and set the listen_host to 0.0.0.0, it still tells me to "Login by visiting: http://localhost:3002", but I can connect from my other machine using a browser (chrome and ie) at http://:3002. The first time the site loads pretty slow, it took about 10 minutes, but then I'm redirected to the login-page at http://:3002/login.
Here I enter ent-search@example.com and the password changeme. It prints the following error:
image

Will try it again tomorrow on a clean system.

#15

I just ran through the exact same exercise on a build of Fedora Workstation 27 - I am now able to log in and can proceed to "Getting Started" exercises.

Even though I got it to work on Fedora Workstation - I will still try to figure out why it won't work on Fedora Server 27. Seems like it might be permissions related (because the underlying environment seems the same).

Thanks Kellen!

-Chris

(Nick Erber) #16

Also tested in the desktop environment on debian. When locally connecting to http://localhost:3002 the login works as expected and I'm being redirected to the Enterprise-Search-GUI.

No matter what settings I set for listen_host/port or external_host/port I can't get the GUI to be accessible from another computer.

Maybe it has to do something with the "localhost" in the request_url?

Nick

#17

Update: I re-read what you posted and it appears that my response is just a validation of what you already said. :slight_smile:

I tried the same thing - no dice. Of course "localhost" should resolve to your local machine with an address of 127.0.0.1. So I tried to set the external host and port and that didn't work either. Setting the listen_host and listen_port will let you remotely access the login prompt (like you saw), but not let you actually log in. Setting external_host and external_port will get you nothing. Oddly enough, when setting the external_host and external_port, the output instructs you to use the external address instead of the listen address... so something must be in the works.

-Chris

(Scott Ewing) #18

Hi all,

Throwing in my hat on configuring beta so far. I have EES running in a VM. I am using a new build of Debian 9 with Java 8 running elasticsearch 6.7.1 and is running. Like a lot of you, I have also set my enterprise_search.yml file to use an external IP address and port number. The service appears to start up successfully and it even says the service will be available at http://:3002 in a few mins but is only ever accessible via local host.
Looks to default to localhost:3002 despite my configuration.

app-server.1        | #########################################################
app-server.1        |
app-server.1        | Success! Elastic Enterprise Search has started and will soon be accessible.
app-server.1        |
app-server.1        |   * Login by visiting: http://172.25.0.9:3002
app-server.1        |   * Default credentials: ent-search@example.com / changeme
app-server.1        |   * Visit the documentation: https://swiftype.com/documentation/enterprise-search
app-server.1        |
app-server.1        | Generated a secret session key. Set it in your config file to persist user sessions through process restarts:
app-server.1        |
app-server.1        | secret_session_key: 
app-server.1        |[redacted]
app-server.1        | No secret management encryption keys were provided.
app-server.1        | Your secrets will be stored unencrypted.
app-server.1        | You can use the following generated encryption key in your config file to store new encrypted secrets:
app-server.1        |
app-server.1        | secret_management:
app-server.1        |   encryption_keys:
app-server.1        |     - [redacted]
app-server.1        |
app-server.1        |
app-server.1        | #########################################################
app-server.1        |
app-server.1        |
app-server.1        |
app-server.1        | 2019-05-17 15:27:45.906:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@27ddd392{/,file:/tmp/jetty-127.0.0.1-3002-enterprise-search.war-_-any-2507601881551571428.dir/webapp/,AVAILABLE}{file:/home/elastic/Downloads/enterprisesearch-0.1.0-beta1/lib/enterprise-search.war}
app-server.1        | 2019-05-17 15:27:45.914:WARN:oejsh.RequestLogHandler:main: !RequestLog
app-server.1        | 2019-05-17 15:27:45.937:INFO:oejs.ServerConnector:main: Started ServerConnector@241c860a{HTTP/1.1}{127.0.0.1:3002}
app-server.1        | 2019-05-17 15:27:45.938:INFO:oejs.Server:main: Started @191267ms

Throwing in my config to reference.

## ================== Elastic Enterprise Search Configuration ==================
#
# NOTE: Elastic Enterprise Search comes with reasonable defaults for most settings.
#       Before adjusting the configuration, make sure you understand what you
#       are trying to accomplish and the consequences.
#
# NOTE: For passwords, the use of environment variables is encouraged
#       to keep values from being written to disk, e.g.
#       elasticsearch.password: ${ELASTICSEARCH_PASSWORD:changeme}
#
# ---------------------------------- Network ----------------------------------
#
# Web application host and port.
#
#ent_search:
#  listen_host: 127.0.0.1
#  listen_port: 3002
#
# Web application external_host and external_port. Users will go to this endpoint to access the
# app. This can be any format as long as it is reachable by the user. eg. IP, FQDN, short name
# encoded via /etc/hosts, etc. For simple solutions such as testing, external_host and external_port
# will fall back to listen_host and listen_port, respectively. In practice, it's best for these to
# match whichever URL is exposed to your users.
#
ent_search:
  external_host: 172.25.0.9
  external_port: 3002
#
# ------------------------------- Elasticsearch -------------------------------
#
# Set the full url to your Elasticsearch cluster.
#
elasticsearch.host: http://172.25.0.9:9200
#
# If you change Elasticsearch credentials, ensure they match here:
#
#elasticsearch:
#  username: elastic
#  password: changeme
#
# ---------------------------------- Emails -----------------------------------
#
# Enable email settings for Enterprise Search.
# Read more:
# https://swiftype.com/documentation/enterprise-search/guides/smtp-mailer
#
#email.account:
#  enabled: false
#  smtp:
#    auth: plain
#    starttls.enable: false
#    host: 127.0.0.1
#    port: 25
#    user:
#    password:
#  email_defaults:
#    from:
#    url_host:
#
# ----------------------------------- APIs ------------------------------------
#
# Set to hide product version information from API responses.
#
#hide_version_info: false
#
# ----------------------------- Diagnostics report ----------------------------
#
# Choose the path where diagnostic reports will be generated.
#
#diagnostic_report_directory: diagnostics
#
# ---------------------------------- Logging ----------------------------------
#
# Choose your log export path.
#
#log_directory:
#
# Log level can be: info, warn, error, fatal, or unknown.
#
#log_level: info
#
# Choose your Filebeat logs export path.
#
#filebeat_log_directory: log
#
# ---------------------------------- Session ----------------------------------
#
# Set to persist user sessions through process restarts. The key is generated
# on binary startup.
#
#secret_session_key:
#
# ---------------------------------- Secrets ----------------------------------
# Set to decrypt session information through restarts. Key can be supplied
# by you, or you can use the generated key provided during binary startup.
#
#secret_management:
#  encryption_keys:
#    -
#
# ---------------------------------- Cluster ----------------------------------
#
# Set this to true and run Elastic Enterprise Search with a "manage" cluster
# permission to allow it to automatically disable index auto-creation using the
# Elasticsearch Cluster Settings API. Otherwise, you will need to manually
# configure your elasticsearch.yml or your cluster settings.
# This is only required for the initial boot, as it will be persisted by the
# Elasticsearch cluster.
# See README.md for more details.
#
allow_es_settings_modification: true
#
# (UNSUPPORTED) Set to ignore our recommended cluster settings and continue at
# your own risk
#
#disable_es_settings_checks: false