Enterprise-search won't start due to unhandled error: NoMethodError: undefined method `join' for nil:NilClass

After doing a very basic elasticsearch/enterprise-search install (single server, tarballs, elasticsearch running fine) I can't get enterprise search to start. There is an unhandled error in the logs/journal: NoMethodError: undefined method join' for nil:NilClass`

elasticsearch 7.13.3
enterprise-search 7.13.3

Both installed from tarball. elasticsearch is running fine. enterprise-search is also running okay and appears to connect to elasticsearch without issue but 30 seconds into the pre-flight checks there is this unhandled error.

Jul 19 09:44:40 host.example.com enterprise-search[24568]: [2021-07-19T09:44:40.861+00:00][24568][2002][app-server][INFO]: Enterprise Search version=7.13.3, JRuby version=9.2.13.0, Ruby version=2.5.7, Rails version=5.0.7.2
Jul 19 09:44:40 host.example.com enterprise-search[24568]: [2021-07-19T09:44:40.866+00:00][24568][2002][app-server][INFO]: Performing pre-flight checks for Elasticsearch running on http://172.0.0.1:10100...
Jul 19 09:45:11 host.example.com enterprise-search[24568]: Unexpected exception while running Enterprise Search:
Jul 19 09:45:11 host.example.com enterprise-search[24568]: NoMethodError: undefined method `join' for nil:NilClass
Jul 19 09:45:11 host.example.com enterprise-search[24568]:     run! at /opt/enterprise-search/research/enterprise-search-7.13.3/lib/war/shared_togo/lib/shared_togo/cli.class:115
Jul 19 09:45:11 host.example.com enterprise-search[24568]:   <main> at bin/enterprise-search-internal:15
Jul 19 09:45:11 host.example.com systemd[1]: enterprise-search-research.service: Main process exited, code=exited, status=1/FAILURE

Running on ubuntu 20.04 if it matters.

[2021-07-15T14:33:32.315+00:00][764861][2002][app-server][INFO]: Enterprise Search version=7.13.3, JRuby version=9.2.13.0, Ruby version=2.5.7, Rails version=5.0.7.2
[2021-07-15T14:33:32.319+00:00][764861][2002][app-server][INFO]: Performing pre-flight checks for Elasticsearch running on http://172.0.0.1:10100...

The 30 second interval from "pre-check" start to error made me think it could be a timeout, but elasticsearch is up and happy...

# curl http://127.0.0.1:10100
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}

No weird settings other than changing default ports. Very basic setup following the instructions here.

I've checked the elasticsearch log files (logs/*.log) as well as the enterprise-search log (log/app-server) and the systemd journal for both services. No other errors that might give a hint about the origin of this unhandled error.

There is one result that pops up on google related to this error with enterprise-search...so maybe an issue with latest release? Unfortunately no clear solution or explanation of underlying cause in that thread. There are a few mentions of this error under logstash, so I guess it is an unhandled error in a common ruby library.

So all the logstash topics seem to come down to this error being related to not connecting to elastic search (timeout, wrong port, elasticsearch not running, etc).

I (thought I) verified that enterprise-search DOES have the right config and that elasticsearch is running.

Assuming I'm an idiot I decided to double check everything again...

Performing pre-flight checks for Elasticsearch running on http://172.0.0.1:10100...

yeah, that is supposed to be 127 not 172.

It would be cool if these underlying error conditions were handled and told the user what is actually going on...(e.g. "connection timeout trying to connect to 172...") as that would save a lot of guess and check.

2 Likes