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

**URL:** <https://discuss.elastic.co/t/enterprise-search-wont-start-due-to-unhandled-error-nomethoderror-undefined-method-join-for-nil-nilclass/279040>\
**Category:** Elastic Search\
**Created:** [July 19, 2021, 9:54am UTC](https://discuss.elastic.co/t/enterprise-search-wont-start-due-to-unhandled-error-nomethoderror-undefined-method-join-for-nil-nilclass/279040 "2021-07-19T09:54:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matp](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@matp](https://discuss.elastic.co/u/matp)\
**Post date:** [July 19, 2021, 9:54am UTC](https://discuss.elastic.co/t/enterprise-search-wont-start-due-to-unhandled-error-nomethoderror-undefined-method-join-for-nil-nilclass/279040/1 "2021-07-19T09:54:34Z")

</div>

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.

```auto
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.

```auto
[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...

```auto
# 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](https://www.elastic.co/downloads/enterprise-search).

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](https://discuss.elastic.co/t/how-to-keep-enterprisesearch-running-all-the-time/274448/22) 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.

---

<div class="post-metadata">

**Author:** ![matp](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@matp](https://discuss.elastic.co/u/matp)\
**Post date:** [July 19, 2021, 10:07am UTC](https://discuss.elastic.co/t/enterprise-search-wont-start-due-to-unhandled-error-nomethoderror-undefined-method-join-for-nil-nilclass/279040/2 "2021-07-19T10:07:13Z")

</div>

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...

```auto
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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 4, 2022, 8:31am UTC](https://discuss.elastic.co/t/enterprise-search-wont-start-due-to-unhandled-error-nomethoderror-undefined-method-join-for-nil-nilclass/279040/3 "2022-11-04T08:31:31Z")

</div>


