Fail to install elasticsearch-8.2.0 on Ubuntu machine

I downloaded the .tar.gz file on a Ubuntu 16.04.1 LTS machine, and shasum output OK. After unzipping the file and running ./bin/elasticsearch, the following error happens:

[0.001s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /run/lxcfs/controllers/cpuset.
Error: Could not find or load main class [0.001s][warning][os,container]
Caused by: java.lang.ClassNotFoundException: [0/001s][warning][os,container]

What should I do?

Hi,

Since ES 8.0, Ubuntu 16.04 is no more supported,you have to upgrade the ubuntu or use a compatible version.

Welcome to our community! :smiley:

You should also really use the deb packages for Ubuntu. It contains a bunch more than just the product binaries, such as service files, standardised config and logging etc.

Same issue for elasticsearch-7.17.3, which supports Ubuntu-16.04 on this page.

I think I just need the binaries for developing. Do I have to install that? Also where can I download those deb packages.

For developing what?

Download Elasticsearch | Elastic is the download page for Elasticsearch.

I mean I have downloaded Elasticsearch. But I cannot set it up due to the above issue. Do I have to install the deb packages for Ubuntu as you mentioned?

You don't need to, no.

Is there more to your Elasticsearch logs?

Here is the logs/gc.log. I cannot find any other logs.

[2022-05-10T03:13:23.944+0000][9391][gc,init] CardTable entry size: 512
[2022-05-10T03:13:23.944+0000][9391][gc     ] Using G1
[2022-05-10T03:13:24.014+0000][9391][gc,init] Version: 18+36 (release)
[2022-05-10T03:13:24.014+0000][9391][gc,init] CPUs: 40 total, 40 available
[2022-05-10T03:13:24.014+0000][9391][gc,init] Memory: 251G
[2022-05-10T03:13:24.014+0000][9391][gc,init] Large Page Support: Disabled
[2022-05-10T03:13:24.014+0000][9391][gc,init] NUMA Support: Disabled
[2022-05-10T03:13:24.014+0000][9391][gc,init] Compressed Oops: Enabled (Non-zero disjoint base)
[2022-05-10T03:13:24.014+0000][9391][gc,init] Heap Region Size: 16M
[2022-05-10T03:13:24.014+0000][9391][gc,init] Heap Min Capacity: 31G
[2022-05-10T03:13:24.014+0000][9391][gc,init] Heap Initial Capacity: 31G
[2022-05-10T03:13:24.014+0000][9391][gc,init] Heap Max Capacity: 31G
[2022-05-10T03:13:24.014+0000][9391][gc,init] Pre-touch: Disabled
[2022-05-10T03:13:24.014+0000][9391][gc,init] Parallel Workers: 28
[2022-05-10T03:13:24.014+0000][9391][gc,init] Concurrent Workers: 7
[2022-05-10T03:13:24.014+0000][9391][gc,init] Concurrent Refinement Workers: 28
[2022-05-10T03:13:24.014+0000][9391][gc,init] Periodic GC: Disabled
[2022-05-10T03:13:24.014+0000][9391][gc,metaspace] CDS archive(s) not mapped
[2022-05-10T03:13:24.014+0000][9391][gc,metaspace] Compressed class space mapped at: 0x0000000080000000-0x00000000c0000000, reserved size: 1073741824
[2022-05-10T03:13:24.014+0000][9391][gc,metaspace] Narrow klass base: 0x0000000000000000, Narrow klass shift: 0, Narrow klass range: 0xc0000000
[2022-05-10T03:13:24.113+0000][9391][gc,heap,exit] Heap
[2022-05-10T03:13:24.113+0000][9391][gc,heap,exit]  garbage-first heap   total 32505856K, used 24578K [0x0000001001000000, 0x00000017c1000000)
[2022-05-10T03:13:24.113+0000][9391][gc,heap,exit]   region size 16384K, 2 young (32768K), 0 survivors (0K)
[2022-05-10T03:13:24.113+0000][9391][gc,heap,exit]  Metaspace       used 3481K, committed 3584K, reserved 1114112K
[2022-05-10T03:13:24.113+0000][9391][gc,heap,exit]   class space    used 263K, committed 320K, reserved 1048576K

When you run the Elasticsearch binary it should output something to the shell.

Here is the output:

[0.001s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /run/lxcfs/controllers/cpuset.
[0.001s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /run/lxcfs/controllers/cpuset.
[0.001s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /run/lxcfs/controllers/cpuset.
[0.001s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /run/lxcfs/controllers/cpuset.
Error: Could not find or load main class [0.001s][warning][os,container]
Caused by: java.lang.ClassNotFoundException: [0/001s][warning][os,container]