Problems with installing/starting current Elasticsearch on ubuntu

hi, i have installed elasticsearch like here: https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html

Now i want to start it with:
sudo systemctl start elasticsearch.service

But this always fail. In the elasticsaerch logs i found the follow message:

[2022-10-02T09:09:15,173][INFO ][o.e.e.NodeEnvironment    ] [localhost] using [1] data paths, mounts [[/ (/dev/mapper/vg00-lv01)]], net usable_space [573.3mb], net total_space [27.1gb], types [ext4]
[2022-10-02T09:09:15,509][INFO ][o.e.e.NodeEnvironment    ] [localhost] heap size [180mb], compressed ordinary object pointers [true]
[2022-10-02T09:09:15,758][INFO ][o.e.n.Node               ] [localhost] node name [localhost], node ID [MMTCWd-8QLWq0HZrhL-hTA], cluster name [elasticsearch], roles [data_warm, master, remote_cluster_client, data, data_cold, ingest, data_frozen, ml, data_hot, transform, data_content]
[2022-10-02T09:09:35,750][WARN ][i.n.u.i.PlatformDependent] [localhost] Failed to get the temporary directory; falling back to: /tmp
[2022-10-02T09:09:42,565][ERROR][o.e.b.Elasticsearch      ] [localhost] fatal exception while booting Elasticsearch
java.security.AccessControlException: access denied ("java.io.FilePermission" "/tmp" "read")
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:485) ~[?:?]
        at java.security.AccessController.checkPermission(AccessController.java:1068) ~[?:?]
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:411) ~[?:?]
        at java.lang.SecurityManager.checkRead(SecurityManager.java:751) ~[?:?]
        at sun.nio.fs.UnixPath.checkRead(UnixPath.java:780) ~[?:?]
        at sun.nio.fs.UnixFileSystemProvider.checkAccess(UnixFileSystemProvider.java:294) ~[?:?]
        at java.nio.file.Files.createDirectories(Files.java:772) ~[?:?]
        at org.elasticsearch.ingest.geoip.DatabaseNodeService.initialize(DatabaseNodeService.java:150) ~[?:?]
        at org.elasticsearch.ingest.geoip.IngestGeoIpPlugin.createComponents(IngestGeoIpPlugin.java:121) ~[?:?]
        at org.elasticsearch.node.Node.lambda$new$15(Node.java:696) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.plugins.PluginsService.lambda$flatMap$0(PluginsService.java:236) ~[elasticsearch-8.4.2.jar:?]
        at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273) ~[?:?]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
        at java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) ~[?:?]
        at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) ~[?:?]
        at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) ~[?:?]
        at java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) ~[?:?]
        at org.elasticsearch.node.Node.<init>(Node.java:710) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.node.Node.<init>(Node.java:311) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch$2.<init>(Elasticsearch.java:214) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:214) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67) ~[elasticsearch-8.4.2.jar:?]

But i dont know how to fix this. Can anybody help? Thanks a lot.

Check here , also should have -R for recursive

Thanks, now if i want to start it with:
systemctl start elasticsearch.service
i got this:

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

The status shows:

● elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2022-10-02 14:29:18 UTC; 1min 31s ago
       Docs: https://www.elastic.co
    Process: 43093 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
   Main PID: 43093 (code=exited, status=1/FAILURE)

Oct 02 14:29:18 localhost systemd-entrypoint[43093]:         at org.elasticsearch.server.cli.ServerProcess.start(ServerProcess.java:89)
Oct 02 14:29:18 localhost systemd-entrypoint[43093]:         at org.elasticsearch.server.cli.ServerCli.startServer(ServerCli.java:234)
Oct 02 14:29:18 localhost systemd-entrypoint[43093]:         at org.elasticsearch.server.cli.ServerCli.execute(ServerCli.java:91)
Oct 02 14:29:18 localhost systemd-entrypoint[43093]:         at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:54)
Oct 02 14:29:18 localhost systemd-entrypoint[43093]:         at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:85)
Oct 02 14:29:18 localhost systemd-entrypoint[43093]:         at org.elasticsearch.cli.Command.main(Command.java:50)
Oct 02 14:29:18 localhost systemd-entrypoint[43093]:         at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:64)
Oct 02 14:29:18 localhost systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Oct 02 14:29:18 localhost systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Oct 02 14:29:18 localhost systemd[1]: Failed to start Elasticsearch.

The journal show multiple messages with the follow content:

**pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=XXX.XXX.XXX.XX user=root**

That should be

sudo systemctl start elasticsearch.service

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