Elastic Search Killed on start up!

Hi! I just installed elastic on my pi running ubuntu 20.06, i got v5.6, and when ever i run ./bin/elasticsearch it just returns "killed"

ubuntu@ubuntu:~/elasticsearch-5.6.16$ sudo ES_JAVA_OPTS="-Xms2g -Xmx2g" ./bin/elasticsearch
Killed

nothing gets logged, it just ends. Im currently using around 51% of the ram. The storage has loads of space. Even w/out the ES_JAVA_OPTS it still kills.

5.6 is EOL, is there a reason you cannot use 7.8?

Because of many reasons. 1. System arc, 2. I am not able to get kiban up and running on the pi so I’m running kibina on my 32x macbook

I believe running Elasticsearch on ARM is only officially supported from version 7.8.

What does that mean?

It actually worked before on this, using 5.6, idk why it isn’t working now. System arc as in 32x

I now realize that I do indeed have a 64 bit os... ill post a update soon

OK, on my attempt to run the 7.8.1v it gives me this:
./bin/elasticsearch-env: line 77: /home/ubuntu/elasticsearch-7.8.1/jdk/bin/java: cannot execute binary file: Exec format error

any idea?

here is what uname -a says

ubuntu@ubuntu:~/elasticsearch-7.8.1$ uname -a
Linux ubuntu 5.4.0-1015-raspi #15-Ubuntu SMP Fri Jul 10 05:34:24 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

What package did you download?

OK, new problem. i got the download working, but my db location is on a usb stick (fat32). Its mounted, but it needs sudo to use. When i try to sudo, it says i can't. I can't chown even with sudo as it says perm denied. Any ideas?

Please post the entire errors you are seeing, as text and not a screenshot.

With out sudo (ubuntu@ubuntu:~/elasticsearch-7.8.1$ ./bin/elasticsearch)

org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/media/usb/elastic/nodes];
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7

with sudo(ubuntu@ubuntu:~/elasticsearch-7.8.1$ sudo ./bin/elasticsearch):

org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.8.1.jar:7.8.1]

Is there more to the log?

yes, but its rly long. its rly just a repeat. Do you want the w/out or w/ sudo

There should be something else there apart from that one, that explains a bit more what the issue is.

ok, ill send both

w/out sudo:

ubuntu@ubuntu:~/elasticsearch-7.8.1$ ./bin/elasticsearch
[2020-08-17T01:30:25,992][INFO ][o.e.n.Node               ] [ubuntu] version[7.8.1], pid[15288], build[default/tar/b5ca9c58fb664ca8bf9e4057fc229b3396bf3a89/2020-07-21T16:40:44.668009Z], OS[Linux/5.4.0-1015-raspi/aarch64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/14.0.1/14.0.1+7]
[2020-08-17T01:30:26,013][INFO ][o.e.n.Node               ] [ubuntu] JVM home [/home/ubuntu/elasticsearch-7.8.1/jdk]
[2020-08-17T01:30:26,015][INFO ][o.e.n.Node               ] [ubuntu] JVM arguments [-Xshare:off, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, -Xms1g, -Xmx1g, -XX:+UseG1GC, -XX:G1ReservePercent=25, -XX:InitiatingHeapOccupancyPercent=30, -Djava.io.tmpdir=/tmp/elasticsearch-9825119948498615142, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -XX:MaxDirectMemorySize=536870912, -Des.path.home=/home/ubuntu/elasticsearch-7.8.1, -Des.path.conf=/home/ubuntu/elasticsearch-7.8.1/config, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=true]
[2020-08-17T01:30:36,939][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [aggs-matrix-stats]
[2020-08-17T01:30:36,940][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [analysis-common]
[2020-08-17T01:30:36,942][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [constant-keyword]
[2020-08-17T01:30:36,944][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [flattened]
[2020-08-17T01:30:36,946][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [frozen-indices]
[2020-08-17T01:30:36,948][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [ingest-common]
[2020-08-17T01:30:36,949][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [ingest-geoip]
[2020-08-17T01:30:36,951][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [ingest-user-agent]
[2020-08-17T01:30:36,952][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [kibana]
[2020-08-17T01:30:36,953][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [lang-expression]
[2020-08-17T01:30:36,955][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [lang-mustache]
[2020-08-17T01:30:36,956][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [lang-painless]
[2020-08-17T01:30:36,957][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [mapper-extras]
[2020-08-17T01:30:36,959][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [parent-join]
[2020-08-17T01:30:36,961][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [percolator]
[2020-08-17T01:30:36,963][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [rank-eval]
[2020-08-17T01:30:36,964][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [reindex]
[2020-08-17T01:30:36,965][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [repository-url]
[2020-08-17T01:30:36,967][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [search-business-rules]
[2020-08-17T01:30:36,969][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [searchable-snapshots]
[2020-08-17T01:30:36,970][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [spatial]
[2020-08-17T01:30:36,972][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [tasks]
[2020-08-17T01:30:36,973][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [transform]
[2020-08-17T01:30:36,974][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [transport-netty4]
[2020-08-17T01:30:36,976][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [vectors]
[2020-08-17T01:30:36,978][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-analytics]
[2020-08-17T01:30:36,979][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-async-search]
[2020-08-17T01:30:36,981][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-autoscaling]
[2020-08-17T01:30:36,982][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-ccr]
[2020-08-17T01:30:36,983][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-core]
[2020-08-17T01:30:36,985][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-deprecation]
[2020-08-17T01:30:36,986][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-enrich]
[2020-08-17T01:30:36,988][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-eql]
[2020-08-17T01:30:36,989][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-graph]
[2020-08-17T01:30:36,991][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-identity-provider]
[2020-08-17T01:30:36,993][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-ilm]
[2020-08-17T01:30:36,994][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-logstash]
[2020-08-17T01:30:36,996][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-ml]
[2020-08-17T01:30:36,997][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-monitoring]
[2020-08-17T01:30:36,998][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-ql]
[2020-08-17T01:30:37,000][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-rollup]
[2020-08-17T01:30:37,002][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-security]
[2020-08-17T01:30:37,003][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-sql]
[2020-08-17T01:30:37,005][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-voting-only-node]
[2020-08-17T01:30:37,006][INFO ][o.e.p.PluginsService     ] [ubuntu] loaded module [x-pack-watcher]
[2020-08-17T01:30:37,008][INFO ][o.e.p.PluginsService     ] [ubuntu] no plugins loaded
[2020-08-17T01:30:37,451][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [ubuntu] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/media/usb/elastic/nodes];
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.8.1.jar:7.8.1]
Caused by: org.elasticsearch.ElasticsearchException: failed to bind service
	at org.elasticsearch.node.Node.<init>(Node.java:652) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.node.Node.<init>(Node.java:266) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.8.1.jar:7.8.1]
	... 6 more
Caused by: java.nio.file.AccessDeniedException: /media/usb/elastic/nodes
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
	at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389) ~[?:?]
	at java.nio.file.Files.createDirectory(Files.java:694) ~[?:?]
	at java.nio.file.Files.createAndCheckIsDirectory(Files.java:801) ~[?:?]
	at java.nio.file.Files.createDirectories(Files.java:787) ~[?:?]
	at org.elasticsearch.env.NodeEnvironment.lambda$new$0(NodeEnvironment.java:274) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:211) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:271) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.node.Node.<init>(Node.java:335) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.node.Node.<init>(Node.java:266) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.8.1.jar:7.8.1]
	... 6 more
uncaught exception in thread [main]
ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/media/usb/elastic/nodes];
Likely root cause: java.nio.file.AccessDeniedException: /media/usb/elastic/nodes
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389)
	at java.base/java.nio.file.Files.createDirectory(Files.java:694)
	at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:801)
	at java.base/java.nio.file.Files.createDirectories(Files.java:787)
	at org.elasticsearch.env.NodeEnvironment.lambda$new$0(NodeEnvironment.java:274)
	at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:211)
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:271)
	at org.elasticsearch.node.Node.<init>(Node.java:335)
	at org.elasticsearch.node.Node.<init>(Node.java:266)
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227)
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393)
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
	at org.elasticsearch.cli.Command.main(Command.java:90)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
For complete error details, refer to the log at /home/ubuntu/elasticsearch-7.8.1/logs/elasticsearch.log

w/sudo

ubuntu@ubuntu:~/elasticsearch-7.8.1$ sudo ./bin/elasticsearch
[2020-08-17T01:32:57,803][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [ubuntu] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.8.1.jar:7.8.1]
	at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.8.1.jar:7.8.1]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
	at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:111) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.8.1.jar:7.8.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.8.1.jar:7.8.1]
	... 6 more
uncaught exception in thread [main]
java.lang.RuntimeException: can not run elasticsearch as root
	at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:111)
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393)
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
	at org.elasticsearch.cli.Command.main(Command.java:90)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
For complete error details, refer to the log at /home/ubuntu/elasticsearch-7.8.1/logs/elasticsearch.log
2020-08-17 01:32:58,301946 UTC [15715] ERROR CLogger.cc@311 Cannot log to named pipe /tmp/elasticsearch-4984453529956496488/controller_log_15529 as it could not be opened for writing
2020-08-17 01:32:58,302154 UTC [15715] INFO  Main.cc@104 Parent process died - ML controller exiting

Ok so it cannot access that directory. What are the permissions and ownership on /media/usb/elastic?

sorry to be a dumbass, but how do i check? /media/usb is a mounted drive (from fat32)

ls -ld /media/usb/elastic will do it.