# Problems creating a single node cluster

**URL:** <https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984>\
**Category:** Elasticsearch\
**Created:** [February 19, 2020, 2:23pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984 "2020-02-19T14:23:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![waynesmallman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/waynesmallman/32/18596_2.png) [@waynesmallman](https://discuss.elastic.co/u/waynesmallman)\
**Post date:** [February 19, 2020, 2:23pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/1 "2020-02-19T14:23:06Z")

</div>

Hi!

I've managed to get Elastic 7.6 running on Ubuntu 18.04 LTS in AWS, I have access to it via a REST client using port tunnelling in a SSH connection, and while it is accessible (returning the standard "status" message from `curl -XGET 'localhost:8881/'`), there are errors, which — after discussing with someone more qualified than myself — appear related to Elastic struggling with nodes:

> [2020-02-19T09:23:35,746][WARN][o.e.c.c.ClusterFormationFailureHelper] [ip-172-31-14-190] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [52.2.0.8] to bootstrap a cluster: have discovered [{ip-172-31-14-190}{ECULpkNnST6lEdrAJfp5Yg}{n3DpWCldST6GxNn0sHUAHw}{localhost}{127.0.0.1:9300}{dilm}{ml.machine\_memory=4086390784, xpack.installed=true, ml.max\_open\_jobs=20}]; discovery will continue using [127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9300, [::1]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{ip-172-31-14-190}{ECULpkNnST6lEdrAJfp5Yg}{n3DpWCldST6GxNn0sHUAHw}{localhost}{127.0.0.1:9300}{dilm}{ml.machine\_memory=4086390784, xpack.installed=true, ml.max\_open\_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0

So, as advised, I edited: "elasticsearch.yml" and added:

`discovery.type: single-node`

… but get the following errors after running the command `journalctl -xe`:

> ## -- The result is RESULT. Feb 19 09:50:13 ip-172-31-14-190 sudo[9133]: ubuntu : TTY=pts/0 ; PWD=/etc/elasticsearch ; USER=root ; COMMAND=/bin/nano elasticsearch.yml Feb 19 09:50:13 ip-172-31-14-190 sudo[9133]: pam\_unix(sudo:session): session opened for user root by ubuntu(uid=0) Feb 19 09:50:16 ip-172-31-14-190 sshd[9135]: Received disconnect from [IP\_ADDRESS] port 60385:11: [preauth] Feb 19 09:50:16 ip-172-31-14-190 sshd[9135]: Disconnected from authenticating user root [IP\_ADDRESS] port 60385 [preauth] Feb 19 09:50:40 ip-172-31-14-190 sudo[9133]: pam\_unix(sudo:session): session closed for user root Feb 19 09:53:57 ip-172-31-14-190 sshd[9138]: Received disconnect from [IP\_ADDRESS] port 52178:11: [preauth] Feb 19 09:53:57 ip-172-31-14-190 sshd[9138]: Disconnected from authenticating user root [IP\_ADDRESS] port 52178 [preauth] Feb 19 09:55:02 ip-172-31-14-190 sudo[9140]: ubuntu : TTY=pts/0 ; PWD=/etc/elasticsearch ; USER=root ; COMMAND=/bin/nano elasticsearch.yml Feb 19 09:55:02 ip-172-31-14-190 sudo[9140]: pam\_unix(sudo:session): session opened for user root by ubuntu(uid=0) Feb 19 09:55:04 ip-172-31-14-190 sshd[9142]: Received disconnect from [IP\_ADDRESS] port 39241:11: Bye Bye [preauth] Feb 19 09:55:04 ip-172-31-14-190 sshd[9142]: Disconnected from [IP\_ADDRESS] port 39241 [preauth] Feb 19 09:55:53 ip-172-31-14-190 sudo[9140]: pam\_unix(sudo:session): session closed for user root Feb 19 09:55:58 ip-172-31-14-190 polkitd(authority=local)[866]: Registered Authentication Agent for unix-process:9145:6837580 (system bus name :1.73 [/usr/bin/pkttyagent --notify-fd 5 --fallback], obj Feb 19 09:56:02 ip-172-31-14-190 polkitd(authority=local)[866]: Unregistered Authentication Agent for unix-process:9145:6837580 (system bus name :1.73, object path /org/freedesktop/PolicyKit1/Authenti Feb 19 09:56:02 ip-172-31-14-190 polkitd(authority=local)[866]: Operator of unix-process:9145:6837580 FAILED to authenticate to gain authorization for action org.freedesktop.systemd1.manage-units for Feb 19 09:56:05 ip-172-31-14-190 sudo[9153]: ubuntu : TTY=pts/0 ; PWD=/etc/elasticsearch ; USER=root ; COMMAND=/bin/systemctl restart elasticsearch.service Feb 19 09:56:05 ip-172-31-14-190 sudo[9153]: pam\_unix(sudo:session): session opened for user root by ubuntu(uid=0) Feb 19 09:56:05 ip-172-31-14-190 systemd[1]: Starting Elasticsearch... -- Subject: Unit elasticsearch.service has begun start-up -- Defined-By: systemd -- Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)
> 
> ## -- Unit elasticsearch.service has begun starting up. Feb 19 09:56:06 ip-172-31-14-190 elasticsearch[9156]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. Feb 19 09:56:15 ip-172-31-14-190 systemd-timesyncd[538]: Network configuration changed, trying to establish connection. Feb 19 09:56:15 ip-172-31-14-190 systemd-timesyncd[538]: Synchronized to time server [IP\_ADDRESS] ([ntp.ubuntu.com](http://ntp.ubuntu.com)). Feb 19 09:56:24 ip-172-31-14-190 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE Feb 19 09:56:24 ip-172-31-14-190 systemd[1]: elasticsearch.service: Failed with result 'exit-code'. Feb 19 09:56:24 ip-172-31-14-190 systemd[1]: Failed to start Elasticsearch. -- Subject: Unit elasticsearch.service has failed -- Defined-By: systemd -- Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)
> 
> ## -- Unit elasticsearch.service has failed.
> 
> -- The result is RESULT.  
> Feb 19 09:56:24 ip-172-31-14-190 sudo[9153]: pam\_unix(sudo:session): session closed for user root  
> Feb 19 09:56:39 ip-172-31-14-190 sudo[9299]: ubuntu : TTY=pts/0 ; PWD=/etc/elasticsearch ; USER=root ; COMMAND=/bin/nano elasticsearch.yml  
> Feb 19 09:56:39 ip-172-31-14-190 sudo[9299]: pam\_unix(sudo:session): session opened for user root by ubuntu(uid=0)  
> Feb 19 09:57:19 ip-172-31-14-190 sudo[9299]: pam\_unix(sudo:session): session closed for user root

I don't remember having these problems with Elastic 6.x in production, or installing 7.x on the development Mac, so I'm at a loss here.

At this point, it's not as important to me what the problem is as it is getting Elastic up, running, and stable.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 19, 2020, 2:54pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/2 "2020-02-19T14:54:58Z")

</div>

Unfortunately the `journalctl` logs are not really of any use here beyond telling us that Elasticsearch started and then stopped, and whatever needs adjusting will be detailed in the Elasticsearch logs. You have shared a single line from Elasticsearch logs from before setting `discovery.type: single-node` (the message from `o.e.c.c.ClusterFormationFailureHelper`); can you share the same logs from after adjusting this setting?

---

<div class="post-metadata">

**Author:** ![waynesmallman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/waynesmallman/32/18596_2.png) [@waynesmallman](https://discuss.elastic.co/u/waynesmallman)\
**Post date:** [February 19, 2020, 3:03pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/3 "2020-02-19T15:03:31Z")

</div>

Hi @DavidTurner, I ran the command `sudo systemctl start elasticsearch` and got:

> Job for elasticsearch.service failed because the control process exited with error code.
> 
> See "systemctl status elasticsearch.service" and "journalctl -xe" for details.

In a separate session, I had the command running: `tail -f elasticsearch.log` but nothing appeared when Elastic failed.

What else would I need to do?

---

<div class="post-metadata">

**Author:** ![rameshkr1994](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rameshkr1994/32/59029_2.png) [@rameshkr1994](https://discuss.elastic.co/u/rameshkr1994)\
**Post date:** [February 19, 2020, 3:22pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/4 "2020-02-19T15:22:33Z")

</div>

Hi @waynesmallman.

this ' `curl -XGET 'localhost:8881/`' is working with AWS machine?

or you are are running the same curl command out of aws machine?

case 01:- if you are able to run that command with aws machine then fine if not then some issue with your elastic.yml file  
case :02 if you are running this curl command out of aws machine then you need to map host with localhost of aws machine.

`Please check ?`

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/e/1ecc479b34455cc4197cf4ba2f17f57420422e50.png)

Thanks  
HadoopHelp

---

<div class="post-metadata">

**Author:** ![waynesmallman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/waynesmallman/32/18596_2.png) [@waynesmallman](https://discuss.elastic.co/u/waynesmallman)\
**Post date:** [February 19, 2020, 3:28pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/5 "2020-02-19T15:28:50Z")

</div>

Hi @rameshkr1994, as I said the curl command is working — I swapped the port number based on advice regarding [the ELK stack and how to secure it](https://logz.io/blog/securing-elk-nginx/).

So, to be clear — running the curl command works both from the REST client and on Ubuntu.

---

<div class="post-metadata">

**Author:** ![rameshkr1994](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rameshkr1994/32/59029_2.png) [@rameshkr1994](https://discuss.elastic.co/u/rameshkr1994)\
**Post date:** [February 19, 2020, 3:42pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/6 "2020-02-19T15:42:04Z")

</div>

Hi @waynesmallman .

may be i am not getting your issue nut i tried to understand as below :- command getting error in culr:-

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1cc7b0143ef84992bc57366cdaa1514f47647922.png)

---

<div class="post-metadata">

**Author:** ![waynesmallman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/waynesmallman/32/18596_2.png) [@waynesmallman](https://discuss.elastic.co/u/waynesmallman)\
**Post date:** [February 19, 2020, 6:45pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/7 "2020-02-19T18:45:52Z")

</div>

Hi @rameshkr1994, I don't think you do understand — please read the original message again, as it answers the questions you're asking me.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 19, 2020, 7:09pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/8 "2020-02-19T19:09:01Z")

</div>

> [@waynesmallman](#):
>
> What else would I need to do?

As with [your previous thread](https://discuss.elastic.co/t/elastic-failing-on-ubuntu-18-on-aws/219531), it's hard to give any concrete suggestions without seeing the Elasticsearch logs. I don't really understand why you cannot see them, sorry, but without them we're kinda stuck. I tried again to reproduce this (see my post in your earlier thread, a clean installation on a brand-new Ubuntu 18.04 instance) and `sudo tail -f /var/log/elasticsearch/elasticsearch.log` shows the logs we need.

Have you adjusted the logging config from the default? If so, can you put it back to how it was? There's certainly been some customisation because `this node must discover master-eligible nodes [52.2.0.8] to bootstrap a cluster` is not how an empty installation behaves.

---

<div class="post-metadata">

**Author:** ![waynesmallman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/waynesmallman/32/18596_2.png) [@waynesmallman](https://discuss.elastic.co/u/waynesmallman)\
**Post date:** [February 19, 2020, 8:46pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/9 "2020-02-19T20:46:30Z")

</div>

Hi @DavidTurner, I am now able to see the logs (I had to add "ubuntu" to the "elasticsearch" group, which Elastic itself created).

I've been running more tests:

> ubuntu@ip-172-31-14-190:~$ systemctl status elasticsearch.service  
> ● elasticsearch.service - Elasticsearch  
> Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)  
> Active: active (running) since Wed 2020-02-19 19:50:06 UTC; 48min ago  
> Docs: [http://www.elastic.co](http://www.elastic.co)  
> Main PID: 10812 (java)  
> Tasks: 65 (limit: 4647)  
> CGroup: /system.slice/elasticsearch.service  
> ├─10812 /usr/share/elasticsearch/jdk/bin/java -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=  
> └─10929 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86\_64/bin/controller
> 
> Feb 19 19:49:14 ip-172-31-14-190 systemd[1]: Starting Elasticsearch...  
> Feb 19 19:49:15 ip-172-31-14-190 elasticsearch[10812]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.  
> Feb 19 19:50:06 ip-172-31-14-190 systemd[1]: Started Elasticsearch.

And it appears that Elastic is running:

> ubuntu@ip-172-31-14-190:~$ curl -XGET 'localhost:8881/'  
> {  
> "name" : "ip-172-31-14-190",  
> "cluster\_name" : "under-cloud",  
> "cluster\_uuid" : "_na_",  
> "version" : {  
> "number" : "7.5.2",  
> "build\_flavor" : "default",  
> "build\_type" : "deb",  
> "build\_hash" : "8bec50e1e0ad29dad5653712cf3bb580cd1afcdf",  
> "build\_date" : "2020-01-15T12:11:52.313576Z",  
> "build\_snapshot" : false,  
> "lucene\_version" : "8.3.0",  
> "minimum\_wire\_compatibility\_version" : "6.8.0",  
> "minimum\_index\_compatibility\_version" : "6.0.0-beta1"  
> },  
> "tagline" : "You Know, for Search"  
> }

… and — as explained — I'm able to run the Curl request from both the REST client and from within Ubuntu.

But note: `"cluster_uuid" : "_na_"`

When I run a PUT request for: "[http://localhost:9000/notes\_en\_v2](http://localhost:9000/notes_en_v2)" which has a JSON object to create an index, one that I've used on both Elastic 6.x and 7.x in development, it hangs on this staging environment, and I get the following in Insomnia:

> {  
> "error": {  
> "root\_cause": [  
> {  
> "type": "master\_not\_discovered\_exception",  
> "reason": null  
> }  
> ],  
> "type": "master\_not\_discovered\_exception",  
> "reason": null  
> },  
> "status": 503  
> }

… but there's no corresponding error in the logs.

David, something's wrong with this installation of Elastic, and I have followed the instructions to the letter, as I have done with the last umpteen installations of Elastic.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 19, 2020, 9:36pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/10 "2020-02-19T21:36:06Z")

</div>

> [@waynesmallman](#):
>
> I am now able to see the logs

Great. Can you share them here? Ideally everything from the node starting up for at least 5 minutes.

---

<div class="post-metadata">

**Author:** ![waynesmallman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/waynesmallman/32/18596_2.png) [@waynesmallman](https://discuss.elastic.co/u/waynesmallman)\
**Post date:** [February 19, 2020, 9:36pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/11 "2020-02-19T21:36:22Z")

</div>

In the end, I had to comment out the `cluster.initial_master_nodes` option in the "elasticsearch.yml" file.

---

<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:** [March 18, 2020, 9:40pm UTC](https://discuss.elastic.co/t/problems-creating-a-single-node-cluster/219984/12 "2020-03-18T21:40:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
