Unable to start Elastic.service 'setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node]'

I am trying to set up a SIEM HOME LAB environment and install the latest Elastic and kibana on Ubuntu, but the service is not starting up, and am receiving the following errors:

messi@fifa:~/Desktop$ sudo systemctl restart elasticsearch
Job for elasticsearch.service failed because the control process exited with error code.
See "systemctl status elasticsearch.service" and "journalctl -xeu elasticsearch.service" for details.
messi@fifa:~/Desktop$ sudo systemctl status elasticsearch
× elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2022-09-14 12:02:54 IST; 8s ago
       Docs: https://www.elastic.co
    Process: 5170 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
   Main PID: 5170 (code=exited, status=1/FAILURE)
        CPU: 36.760s

Sep 14 12:02:32 fifa systemd[1]: Starting Elasticsearch...
Sep 14 12:02:54 fifa systemd-entrypoint[5170]: ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/elasticsearch.log
Sep 14 12:02:54 fifa systemd-entrypoint[5170]: ERROR: Elasticsearch exited unexpectedly
Sep 14 12:02:54 fifa systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Sep 14 12:02:54 fifa systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Sep 14 12:02:54 fifa systemd[1]: Failed to start Elasticsearch.
Sep 14 12:02:54 fifa systemd[1]: elasticsearch.service: Consumed 36.760s CPU time.

the elasticsearch.log file:

[2022-09-14T11:39:38,542][INFO ][o.e.n.Node               ] [fifa] version[8.4.1], pid[4061], build[deb/2bd229c8e56650b42e40992322a76e7914258f0c/2022-08-26T12:11:43.232597118Z], OS[Linux/5.15.0-47-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/18.0.2/18.0.2+9-61]
[2022-09-14T11:39:38,546][INFO ][o.e.n.Node               ] [fifa] JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]
[2022-09-14T11:39:38,547][INFO ][o.e.n.Node               ] [fifa] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -Djava.security.manager=allow, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-12840986860521235875, -XX:+HeapDumpOnOutOfMemoryError, -XX:+ExitOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Xms970m, -Xmx970m, -XX:MaxDirectMemorySize=508559360, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.distribution.type=deb, --module-path=/usr/share/elasticsearch/lib, --add-modules=jdk.net, -Djdk.module.main=org.elasticsearch.server]
[2022-09-14T11:39:41,322][INFO ][c.a.c.i.j.JacksonVersion ] [fifa] Package versions: jackson-annotations=2.13.2, jackson-core=2.13.2, jackson-databind=2.13.2.2, jackson-dataformat-xml=2.13.2, jackson-datatype-jsr310=2.13.2, azure-core=1.27.0, Troubleshooting version conflicts: https://aka.ms/azsdk/java/dependency/troubleshoot
[..snip..]
Djdk.module.main=org.elasticsearch.server]
[2022-09-14T11:41:39,514][INFO ][c.a.c.i.j.JacksonVersion ] [fifa] Package versions: jackson-annotations=2.13.2, jackson-core=2.13.2, jackson-databind=2.13.2.2, jackson-dataformat-xml=2.13.2, jackson-datatype-jsr310=2.13.2, azure-core=1.27.0, Troubleshooting version conflicts: https://aka.ms/azsdk/java/dependency/troubleshoot
[2022-09-14T11:41:40,996][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [aggs-matrix-stats]
[2022-09-14T11:41:40,996][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [analysis-common]
[2022-09-14T11:41:40,996][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [constant-keyword]
[2022-09-14T11:41:40,997][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [data-streams]
[2022-09-14T11:41:40,997][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [frozen-indices]
[2022-09-14T11:41:40,997][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-attachment]
[2022-09-14T11:41:40,997][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-common]
[2022-09-14T11:41:40,997][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-geoip]
[2022-09-14T11:41:40,998][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-user-agent]
[2022-09-14T11:41:40,998][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [kibana]
[2022-09-14T11:41:40,998][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [lang-expression]
[2022-09-14T11:41:40,998][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [lang-mustache]
[2022-09-14T11:41:40,999][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [lang-painless]
[2022-09-14T11:41:40,999][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [legacy-geo]
[2022-09-14T11:41:40,999][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [mapper-extras]
[2022-09-14T11:41:40,999][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [mapper-version]
[2022-09-14T11:41:41,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [old-lucene-versions]
[2022-09-14T11:41:41,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [parent-join]
[2022-09-14T11:41:41,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [percolator]
[2022-09-14T11:41:41,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [rank-eval]
[2022-09-14T11:41:41,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [reindex]
[2022-09-14T11:41:41,001][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repositories-metering-api]
[2022-09-14T11:41:41,001][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repository-azure]
[2022-09-14T11:41:41,001][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repository-encrypted]
[2022-09-14T11:41:41,001][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repository-gcs]
[2022-09-14T11:41:41,002][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repository-s3]
[2022-09-14T11:41:41,002][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repository-url]
[2022-09-14T11:41:41,002][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [runtime-fields-common]
[2022-09-14T11:41:41,002][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [search-business-rules]
[2022-09-14T11:41:41,003][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [searchable-snapshots]
[2022-09-14T11:41:41,003][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [snapshot-based-recoveries]
[2022-09-14T11:41:41,003][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [snapshot-repo-test-kit]
[2022-09-14T11:41:41,003][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [spatial]
[2022-09-14T11:41:41,003][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [systemd]
[2022-09-14T11:41:41,004][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [transform]
[2022-09-14T11:41:41,004][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [transport-netty4]
[2022-09-14T11:41:41,004][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [unsigned-long]
[2022-09-14T11:41:41,004][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [vector-tile]
[2022-09-14T11:41:41,005][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [wildcard]
[2022-09-14T11:41:41,005][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-aggregate-metric]
[2022-09-14T11:41:41,005][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-analytics]
[2022-09-14T11:41:41,005][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-async]
[[/ (/dev/sda3)]], net usable_space [4.5gb], net total_space [19gb], types [ext4]
[2022-09-14T11:41:44,978][INFO ][o.e.e.NodeEnvironment    ] [fifa] heap size [972mb], compressed ordinary object pointers [true]
[2022-09-14T11:41:45,002][INFO ][o.e.n.Node               ] [fifa] node name [fifa], node ID [yiVeDU6bRnC1gTIsHx11XQ], cluster name [elasticsearch], roles [data_frozen, ml, data_hot, transform, data_content, data_warm, master, remote_cluster_client, data, data_cold, ingest]
[2022-09-14T11:41:49,653][INFO ][o.e.x.s.Security         ] [fifa] Security is enabled
[2022-09-14T11:41:49,928][INFO ][o.e.x.s.a.s.FileRolesStore] [fifa] parsed [0] roles from file [/etc/elasticsearch/roles.yml]
[2022-09-14T11:41:50,288][INFO ][o.e.x.s.InitialNodeSecurityAutoConfiguration] [fifa] Auto-configuration will not generate a password for the elastic built-in superuser, as we cannot  determine if there is a terminal attached to the elasticsearch process. You can use the `bin/elasticsearch-reset-password` tool to set the password for the elastic user.
[2022-09-14T11:41:50,509][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [fifa] [controller/4253] [Main.cc@123] controller (64 bit): Version 8.4.1 (Build c0373714f3bc4b) Copyright (c) 2022 Elasticsearch BV
[2022-09-14T11:41:51,764][INFO ][o.e.t.n.NettyAllocator   ] [fifa] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=true, g1gc_region_size=4mb, heap_size=972mb}]
[2022-09-14T11:41:51,796][INFO ][o.e.i.r.RecoverySettings ] [fifa] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
[2022-09-14T11:41:51,837][ERROR][o.e.b.Elasticsearch      ] [fifa] fatal exception while booting Elasticsearch
java.lang.IllegalArgumentException: setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node]
	at org.elasticsearch.cluster.coordination.ClusterBootstrapService.<init>(ClusterBootstrapService.java:87) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.cluster.coordination.Coordinator.<init>(Coordinator.java:276) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.discovery.DiscoveryModule.<init>(DiscoveryModule.java:191) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.node.Node.<init>(Node.java:860) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.node.Node.<init>(Node.java:311) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch$2.<init>(Elasticsearch.java:214) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:214) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67) ~[elasticsearch-8.4.1.jar:?]
[2022-09-14T11:50:46,492][INFO ][o.e.n.Node               ] [fifa] version[8.4.1], pid[4696], build[deb/2bd229c8e56650b42e40992322a76e7914258f0c/2022-08-26T12:11:43.232597118Z], OS[Linux/5.15.0-47-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/18.0.2/18.0.2+9-61]
[2022-09-14T11:50:46,531][INFO ][o.e.n.Node               ] [fifa] JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]
[2022-09-14T11:50:46,533][INFO ][o.e.n.Node               ] [fifa] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -Djava.security.manager=allow, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-3319137042871069555, -XX:+HeapDumpOnOutOfMemoryError, -XX:+ExitOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Xms970m, -Xmx970m, -XX:MaxDirectMemorySize=508559360, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.distribution.type=deb, --module-path=/usr/share/elasticsearch/lib, --add-modules=jdk.net, -Djdk.module.main=org.elasticsearch.server]
[2022-09-14T11:50:49,956][INFO ][c.a.c.i.j.JacksonVersion ] [fifa] Package versions: jackson-annotations=2.13.2, jackson-core=2.13.2, jackson-databind=2.13.2.2, jackson-dataformat-xml=2.13.2, jackson-datatype-jsr310=2.13.2, azure-core=1.27.0, Troubleshooting version conflicts: https://aka.ms/azsdk/java/dependency/troubleshoot
[2022-09-14T11:50:51,997][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [aggs-matrix-stats]
[2022-09-14T11:50:51,998][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [analysis-common]
[2022-09-14T11:50:51,998][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [constant-keyword]
[2022-09-14T11:50:51,998][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [data-streams]
[2022-09-14T11:50:51,998][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [frozen-indices]
[2022-09-14T11:50:51,998][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-attachment]
[2022-09-14T11:50:51,998][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-common]
[2022-09-14T11:50:51,999][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-geoip]
[2022-09-14T11:50:51,999][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-user-agent]
[2022-09-14T11:50:51,999][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [kibana]
[2022-09-14T11:50:51,999][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [lang-expression]
[2022-09-14T11:50:51,999][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [lang-mustache]
[2022-09-14T11:50:51,999][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [lang-painless]
[2022-09-14T11:50:52,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [legacy-geo]
[2022-09-14T11:50:52,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [mapper-extras]
[2022-09-14T11:50:52,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [mapper-version]
[2022-09-14T11:50:52,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [old-lucene-versions]
[2022-09-14T11:50:52,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [parent-join]
[2022-09-14T11:50:52,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [percolator]
[2022-09-14T11:50:52,000][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [rank-eval]
[2022-09-14T11:50:52,001][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [reindex]
[Main.cc@123] controller (64 bit): Version 8.4.1 (Build c0373714f3bc4b) Copyright (c) 2022 Elasticsearch BV
[2022-09-14T11:51:02,634][INFO ][o.e.t.n.NettyAllocator   ] [fifa] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=true, g1gc_region_size=4mb, heap_size=972mb}]
[2022-09-14T11:51:02,684][INFO ][o.e.i.r.RecoverySettings ] [fifa] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
[2022-09-14T11:51:02,762][ERROR][o.e.b.Elasticsearch      ] [fifa] fatal exception while booting Elasticsearch
java.lang.IllegalArgumentException: setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node]
	at org.elasticsearch.cluster.coordination.ClusterBootstrapService.<init>(ClusterBootstrapService.java:87) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.cluster.coordination.Coordinator.<init>(Coordinator.java:276) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.discovery.DiscoveryModule.<init>(DiscoveryModule.java:191) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.node.Node.<init>(Node.java:860) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.node.Node.<init>(Node.java:311) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch$2.<init>(Elasticsearch.java:214) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:214) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67) ~[elasticsearch-8.4.1.jar:?]
[2022-09-14T12:02:37,283][INFO ][o.e.n.Node               ] [fifa] version[8.4.1], pid[5229], build[deb/2bd229c8e56650b42e40992322a76e7914258f0c/2022-08-26T12:11:43.232597118Z], OS[Linux/5.15.0-47-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/18.0.2/18.0.2+9-61]
[2022-09-14T12:02:37,296][INFO ][o.e.n.Node               ] [fifa] JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]
[2022-09-14T12:02:37,297][INFO ][o.e.n.Node               ] [fifa] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -Djava.security.manager=allow, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-2654670887800440703, -XX:+HeapDumpOnOutOfMemoryError, -XX:+ExitOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Xms970m, -Xmx970m, -XX:MaxDirectMemorySize=508559360, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.distribution.type=deb, --module-path=/usr/share/elasticsearch/lib, --add-modules=jdk.net, -Djdk.module.main=org.elasticsearch.server]
[2022-09-14T12:02:40,250][INFO ][c.a.c.i.j.JacksonVersion ] [fifa] Package versions: jackson-annotations=2.13.2, jackson-core=2.13.2, jackson-databind=2.13.2.2, jackson-dataformat-xml=2.13.2, jackson-datatype-jsr310=2.13.2, azure-core=1.27.0, Troubleshooting version conflicts: https://aka.ms/azsdk/java/dependency/troubleshoot
[2022-09-14T12:02:42,403][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [aggs-matrix-stats]
[2022-09-14T12:02:42,404][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [analysis-common]
[2022-09-14T12:02:42,404][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [constant-keyword]
[2022-09-14T12:02:42,404][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [data-streams]
[2022-09-14T12:02:42,404][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [frozen-indices]
[2022-09-14T12:02:42,405][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-attachment]
[2022-09-14T12:02:42,405][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-common]
[2022-09-14T12:02:42,405][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-geoip]
[2022-09-14T12:02:42,405][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [ingest-user-agent]
[2022-09-14T12:02:42,406][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [kibana]
[2022-09-14T12:02:42,406][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [lang-expression]
[2022-09-14T12:02:42,406][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [lang-mustache]
[2022-09-14T12:02:42,407][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [lang-painless]
[2022-09-14T12:02:42,407][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [legacy-geo]
[2022-09-14T12:02:42,407][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [mapper-extras]
[2022-09-14T12:02:42,407][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [mapper-version]
[2022-09-14T12:02:42,407][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [old-lucene-versions]
[2022-09-14T12:02:42,407][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [parent-join]
[2022-09-14T12:02:42,408][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [percolator]
[2022-09-14T12:02:42,408][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [rank-eval]
[2022-09-14T12:02:42,408][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [reindex]
[2022-09-14T12:02:42,408][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repositories-metering-api]
[2022-09-14T12:02:42,408][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repository-azure]
[2022-09-14T12:02:42,409][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repository-encrypted]
[2022-09-14T12:02:42,409][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repository-gcs]
[2022-09-14T12:02:42,409][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repository-s3]
[2022-09-14T12:02:42,409][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [repository-url]
[2022-09-14T12:02:42,409][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [runtime-fields-common]
[2022-09-14T12:02:42,409][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [search-business-rules]
[2022-09-14T12:02:42,409][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [searchable-snapshots]
[2022-09-14T12:02:42,410][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [snapshot-based-recoveries]
[2022-09-14T12:02:42,410][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [snapshot-repo-test-kit]
[2022-09-14T12:02:42,411][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [spatial]
[2022-09-14T12:02:42,411][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [systemd]
[2022-09-14T12:02:42,411][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [transform]
[2022-09-14T12:02:42,411][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [transport-netty4]
[2022-09-14T12:02:42,412][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [unsigned-long]
[2022-09-14T12:02:42,412][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [vector-tile]
[2022-09-14T12:02:42,412][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [wildcard]
[2022-09-14T12:02:42,413][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-aggregate-metric]
[2022-09-14T12:02:42,413][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-analytics]
[2022-09-14T12:02:42,413][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-async]
[2022-09-14T12:02:42,413][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-async-search]
[2022-09-14T12:02:42,413][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-autoscaling]
[2022-09-14T12:02:42,414][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-ccr]
[2022-09-14T12:02:42,414][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-core]
[2022-09-14T12:02:42,414][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-deprecation]
[2022-09-14T12:02:42,415][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-enrich]
[2022-09-14T12:02:42,415][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-eql]
[2022-09-14T12:02:42,415][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-fleet]
[2022-09-14T12:02:42,415][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-graph]
[2022-09-14T12:02:42,416][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-identity-provider]
[2022-09-14T12:02:42,416][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-ilm]
[2022-09-14T12:02:42,416][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-logstash]
[2022-09-14T12:02:42,416][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-ml]
[2022-09-14T12:02:42,417][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-monitoring]
[2022-09-14T12:02:42,418][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-ql]
[2022-09-14T12:02:42,418][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-rollup]
[2022-09-14T12:02:42,418][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-security]
[2022-09-14T12:02:42,418][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-shutdown]
[2022-09-14T12:02:42,421][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-sql]
[2022-09-14T12:02:42,421][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-stack]
[2022-09-14T12:02:42,421][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-text-structure]
[2022-09-14T12:02:42,421][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-voting-only-node]
[2022-09-14T12:02:42,422][INFO ][o.e.p.PluginsService     ] [fifa] loaded module [x-pack-watcher]
[2022-09-14T12:02:42,422][INFO ][o.e.p.PluginsService     ] [fifa] no plugins loaded
[2022-09-14T12:02:45,740][INFO ][o.e.e.NodeEnvironment    ] [fifa] using [1] data paths, mounts [[/ (/dev/sda3)]], net usable_space [4.5gb], net total_space [19gb], types [ext4]
[2022-09-14T12:02:45,740][INFO ][o.e.e.NodeEnvironment    ] [fifa] heap size [972mb], compressed ordinary object pointers [true]
[2022-09-14T12:02:45,746][INFO ][o.e.n.Node               ] [fifa] node name [fifa], node ID [-kdbYv0eTka7CqhnGW_P1w], cluster name [elasticsearch], roles [ml, data_hot, transform, data_content, data_warm, master, remote_cluster_client, data, data_cold, ingest, data_frozen]
[2022-09-14T12:02:50,778][INFO ][o.e.x.s.Security         ] [fifa] Security is enabled
[2022-09-14T12:02:52,181][INFO ][o.e.x.s.a.s.FileRolesStore] [fifa] parsed [0] roles from file [/etc/elasticsearch/roles.yml]
[2022-09-14T12:02:52,899][INFO ][o.e.x.s.InitialNodeSecurityAutoConfiguration] [fifa] Auto-configuration will not generate a password for the elastic built-in superuser, as we cannot  determine if there is a terminal attached to the elasticsearch process. You can use the `bin/elasticsearch-reset-password` tool to set the password for the elastic user.
[2022-09-14T12:02:53,081][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [fifa] [controller/5251] [Main.cc@123] controller (64 bit): Version 8.4.1 (Build c0373714f3bc4b) Copyright (c) 2022 Elasticsearch BV
[2022-09-14T12:02:53,896][INFO ][o.e.t.n.NettyAllocator   ] [fifa] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=true, g1gc_region_size=4mb, heap_size=972mb}]
[2022-09-14T12:02:53,924][INFO ][o.e.i.r.RecoverySettings ] [fifa] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
[2022-09-14T12:02:53,966][ERROR][o.e.b.Elasticsearch      ] [fifa] fatal exception while booting Elasticsearch
java.lang.IllegalArgumentException: setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node]
	at org.elasticsearch.cluster.coordination.ClusterBootstrapService.<init>(ClusterBootstrapService.java:87) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.cluster.coordination.Coordinator.<init>(Coordinator.java:276) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.discovery.DiscoveryModule.<init>(DiscoveryModule.java:191) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.node.Node.<init>(Node.java:860) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.node.Node.<init>(Node.java:311) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch$2.<init>(Elasticsearch.java:214) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:214) ~[elasticsearch-8.4.1.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67) ~[elasticsearch-8.4.1.jar:?]

and the elasticsearch.yml file:



# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: a.b.c.d
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.type: single-node
#
#discovery.seed_hosts: ["host1", "host2"]
#
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
#
# --------------------------------- Readiness ----------------------------------
#
# Enable an unauthenticated TCP readiness endpoint on localhost
#
#readiness.port: 9399
#
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically      
# generated to configure Elasticsearch security features on 14-09-2022 05:33:15
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["fifa"]

# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0

# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0

#----------------------- END SECURITY AUTO CONFIGURATION -------------------------

Welcome to our community! :smiley:

As the error states, this;

Means you don't need to define this;

So comment it out.

1 Like

Thanks much...was bad at spotting that

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