Unable to Start Elasticsearch 7.12 in Ubuntu 18.04

I have installed "elasticsearch" 7.12 version on Ubuntu 18.04 machine.
when trying to start the "elasticsearch" service getting below error:


(base) extramarks@extramarks-Latitude-3400:~/Downloads$ systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-03-25 11:54:39 IST; 4h 58min ago
Docs: https://www.elastic.co
Main PID: 16441 (code=exited, status=1/FAILURE)

Mar 25 11:54:39 extramarks-Latitude-3400 systemd-entrypoint[16441]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.ja
Mar 25 11:54:39 extramarks-Latitude-3400 systemd-entrypoint[16441]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch
Mar 25 11:54:39 extramarks-Latitude-3400 systemd-entrypoint[16441]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(Environme
Mar 25 11:54:39 extramarks-Latitude-3400 systemd-entrypoint[16441]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.
Mar 25 11:54:39 extramarks-Latitude-3400 systemd-entrypoint[16441]: at org.elasticsearch.cli.Command.main(Command.java:79)
Mar 25 11:54:39 extramarks-Latitude-3400 systemd-entrypoint[16441]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.ja
Mar 25 11:54:39 extramarks-Latitude-3400 systemd-entrypoint[16441]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.ja
Mar 25 11:54:39 extramarks-Latitude-3400 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 25 11:54:39 extramarks-Latitude-3400 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 25 11:54:39 extramarks-Latitude-3400 systemd[1]: Failed to start Elasticsearch.

(base) extramarks@extramarks-Latitude-3400:~/Downloads$ systemctl start elasticsearch.service
Job for elasticsearch.service failed because a timeout was exceeded.
See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
(base) extramarks@extramarks-Latitude-3400:~/Downloads$
(base) extramarks@extramarks-Latitude-3400:~/Downloads$ journalctl -xe
Mar 25 16:56:02 extramarks-Latitude-3400 sudo[29336]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 25 16:56:02 extramarks-Latitude-3400 systemd[1]: Reloading.
Mar 25 16:56:03 extramarks-Latitude-3400 sudo[29336]: pam_unix(sudo:session): session closed for user root
Mar 25 16:56:16 extramarks-Latitude-3400 sudo[29357]: extramarks : TTY=pts/0 ; PWD=/home/extramarks/Downloads ; USER=root ; COMMAND=/bin/syste
Mar 25 16:56:16 extramarks-Latitude-3400 sudo[29357]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 25 16:56:16 extramarks-Latitude-3400 systemd[1]: Reloading.
Mar 25 16:56:17 extramarks-Latitude-3400 systemd[1]: Reloading.
Mar 25 16:56:17 extramarks-Latitude-3400 systemd[1]: Reloading.
Mar 25 16:56:17 extramarks-Latitude-3400 sudo[29357]: pam_unix(sudo:session): session closed for user root
Mar 25 16:56:33 extramarks-Latitude-3400 polkitd(authority=local)[2490]: Registered Authentication Agent for unix-process:29469:2597141 (syste
Mar 25 16:56:36 extramarks-Latitude-3400 polkitd(authority=local)[2490]: Operator of unix-session:2 successfully authenticated as unix-user:ex
Mar 25 16:56:36 extramarks-Latitude-3400 systemd[1]: Starting Elasticsearch...
-- Subject: Unit elasticsearch.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support

-- Unit elasticsearch.service has begun starting up.
Mar 25 16:56:44 extramarks-Latitude-3400 rtkit-daemon[3099]: The canary thread is apparently starving. Taking action.
Mar 25 16:56:44 extramarks-Latitude-3400 rtkit-daemon[3099]: Demoting known real-time threads.
Mar 25 16:56:44 extramarks-Latitude-3400 rtkit-daemon[3099]: Successfully demoted thread 3576 of process 3574 (n/a).
Mar 25 16:56:44 extramarks-Latitude-3400 rtkit-daemon[3099]: Successfully demoted thread 3575 of process 3574 (n/a).
Mar 25 16:56:44 extramarks-Latitude-3400 rtkit-daemon[3099]: Successfully demoted thread 3574 of process 3574 (n/a).
Mar 25 16:56:44 extramarks-Latitude-3400 rtkit-daemon[3099]: Demoted 3 threads.
Mar 25 16:57:52 extramarks-Latitude-3400 systemd[1]: elasticsearch.service: Start operation timed out. Terminating.
Mar 25 16:57:53 extramarks-Latitude-3400 gnome-shell[3552]: pushModal: invocation of begin_modal failed
Mar 25 16:57:59 extramarks-Latitude-3400 polkitd(authority=local)[2490]: Unregistered Authentication Agent for unix-process:29469:2597141 (sys
Mar 25 16:57:56 extramarks-Latitude-3400 systemd[1]: elasticsearch.service: Failed with result 'timeout'.
Mar 25 16:57:56 extramarks-Latitude-3400 systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support

-- Unit elasticsearch.service has failed.

-- The result is RESULT.
Mar 25 16:58:15 extramarks-Latitude-3400 /usr/lib/gdm3/gdm-x-session[3423]: (II) event17 - DELL08BC:00 04F3:30CA Touchpad: SYN_DROPPED event -
Mar 25 16:58:17 extramarks-Latitude-3400 /usr/lib/gdm3/gdm-x-session[3423]: (II) event17 - DELL08BC:00 04F3:30CA Touchpad: SYN_DROPPED event -

please find below the system information:
(base) extramarks@extramarks-Latitude-3400:~/Downloads$ uname -a
Linux extramarks-Latitude-3400 5.4.0-70-generic #78~18.04.1-Ubuntu SMP Sat Mar 20 14:10:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

kindly help me with this

Welcome!

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.

And please share elasticsearch logs.

please find below the elasticserach logs:

root@extramarks-Latitude-3400:/var/log# cd elasticsearch/
root@extramarks-Latitude-3400:/var/log/elasticsearch# ls -ltr
total 8
-rw-r--r-- 1 elasticsearch elasticsearch 2053 Mar 25 16:56 gc.log.00
-rw-r--r-- 1 elasticsearch elasticsearch 3883 Mar 25 16:57 gc.log
root@extramarks-Latitude-3400:/var/log/elasticsearch# more gc.log
[2021-03-25T11:26:39.011+0000][29481][gc] Using G1
[2021-03-25T11:27:15.339+0000][29481][gc,init] Version: 15.0.1+9 (release)
[2021-03-25T11:27:15.689+0000][29481][gc,init] CPUs: 8 total, 8 available
[2021-03-25T11:27:16.392+0000][29481][gc,init] Memory: 7834M
[2021-03-25T11:27:16.392+0000][29481][gc,init] Large Page Support: Disabled
[2021-03-25T11:27:16.392+0000][29481][gc,init] NUMA Support: Disabled
[2021-03-25T11:27:16.392+0000][29481][gc,init] Compressed Oops: Enabled (Zero based)
[2021-03-25T11:27:16.392+0000][29481][gc,init] Heap Region Size: 4M
[2021-03-25T11:27:16.392+0000][29481][gc,init] Heap Min Capacity: 3920M
[2021-03-25T11:27:16.392+0000][29481][gc,init] Heap Initial Capacity: 3920M
[2021-03-25T11:27:16.392+0000][29481][gc,init] Heap Max Capacity: 3920M
[2021-03-25T11:27:16.392+0000][29481][gc,init] Pre-touch: Enabled
[2021-03-25T11:27:16.392+0000][29481][gc,init] Parallel Workers: 8
[2021-03-25T11:27:16.392+0000][29481][gc,init] Concurrent Workers: 2
[2021-03-25T11:27:16.392+0000][29481][gc,init] Concurrent Refinement Workers: 8
[2021-03-25T11:27:16.392+0000][29481][gc,init] Periodic GC: Disabled
[2021-03-25T11:27:18.263+0000][29481][gc,cds ] Mark closed archive regions in map: [0x00000007ffc00000, 0x00000007ffc7bff8]
[2021-03-25T11:27:18.264+0000][29481][gc,cds ] Mark open archive regions in map: [0x00000007ffb00000, 0x00000007ffb51ff8]
[2021-03-25T11:27:18.463+0000][29481][gc,metaspace] CDS archive(s) mapped at: [0x0000000800000000-0x0000000800b2a000-0x0000000800b2a000), size
11706368, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 0.
[2021-03-25T11:27:18.463+0000][29481][gc,metaspace] Compressed class space mapped at: 0x0000000800b2c000-0x0000000840b2c000, size: 1073741824
[2021-03-25T11:27:18.463+0000][29481][gc,metaspace] Narrow klass base: 0x0000000800000000, Narrow klass shift: 3, Narrow klass range: 0x100000
000
[2021-03-25T11:27:27.401+0000][29481][safepoint ] Safepoint "Cleanup", Time since last: 3000847984 ns, Reaching safepoint: 8695302 ns, At sa
fepoint: 14161 ns, Total: 8709463 ns
[2021-03-25T11:27:28.408+0000][29481][safepoint ] Safepoint "Cleanup", Time since last: 1000634113 ns, Reaching safepoint: 5934750 ns, At sa
fepoint: 28397 ns, Total: 5963147 ns
[2021-03-25T11:27:39.040+0000][29481][safepoint ] Safepoint "Cleanup", Time since last: 10632141080 ns, Reaching safepoint: 388219 ns, At sa
fepoint: 31850 ns, Total: 420069 ns
[2021-03-25T11:27:46.477+0000][29481][safepoint ] Safepoint "Cleanup", Time since last: 7001394297 ns, Reaching safepoint: 435881836 ns, At
safepoint: 39559 ns, Total: 435921395 ns
[2021-03-25T11:27:47.478+0000][29481][safepoint ] Safepoint "Cleanup", Time since last: 1000315240 ns, Reaching safepoint: 282428 ns, At saf
epoint: 21318 ns, Total: 303746 ns
[2021-03-25T11:27:48.479+0000][29481][safepoint ] Safepoint "Cleanup", Time since last: 1000336088 ns, Reaching safepoint: 256783 ns, At saf
epoint: 26997 ns, Total: 283780 ns
[2021-03-25T11:27:50.480+0000][29481][safepoint ] Safepoint "Cleanup", Time since last: 2000548304 ns, Reaching safepoint: 273394 ns, At saf
epoint: 25639 ns, Total: 299033 ns
[2021-03-25T11:27:51.897+0000][29481][safepoint ] Safepoint "Cleanup", Time since last: 1000449905 ns, Reaching safepoint: 417316152 ns, At
safepoint: 40530 ns, Total: 417356682 ns
[2021-03-25T11:27:52.403+0000][29481][gc,heap,exit] Heap
[2021-03-25T11:27:52.404+0000][29481][gc,heap,exit] garbage-first heap total 4014080K, used 12088K [0x000000070b000000, 0x0000000800000000)
[2021-03-25T11:27:52.404+0000][29481][gc,heap,exit] region size 4096K, 3 young (12288K), 0 survivors (0K)
[2021-03-25T11:27:52.404+0000][29481][gc,heap,exit] Metaspace used 860K, capacity 4592K, committed 4864K, reserved 1056768K
[2021-03-25T11:27:52.404+0000][29481][gc,heap,exit] class space used 80K, capacity 400K, committed 512K, reserved 1048576K
root@extramarks-Latitude-3400:/var/log/elasticsearch#
root@extramarks-Latitude-3400:/var/log/elasticsearch#
root@extramarks-Latitude-3400:/var/log/elasticsearch# more gc.log.00
[2021-03-25T11:26:38.832+0000][29638][gc] Using G1
[2021-03-25T11:26:38.851+0000][29638][gc,init] Version: 15.0.1+9 (release)
[2021-03-25T11:26:38.851+0000][29638][gc,init] CPUs: 8 total, 8 available
[2021-03-25T11:26:38.851+0000][29638][gc,init] Memory: 7834M
[2021-03-25T11:26:38.851+0000][29638][gc,init] Large Page Support: Disabled
[2021-03-25T11:26:38.851+0000][29638][gc,init] NUMA Support: Disabled
[2021-03-25T11:26:38.851+0000][29638][gc,init] Compressed Oops: Enabled (Zero based)
[2021-03-25T11:26:38.851+0000][29638][gc,init] Heap Region Size: 2M
[2021-03-25T11:26:38.851+0000][29638][gc,init] Heap Min Capacity: 3918M
[2021-03-25T11:26:38.851+0000][29638][gc,init] Heap Initial Capacity: 3918M
[2021-03-25T11:26:38.851+0000][29638][gc,init] Heap Max Capacity: 3918M
[2021-03-25T11:26:38.851+0000][29638][gc,init] Pre-touch: Disabled
[2021-03-25T11:26:38.851+0000][29638][gc,init] Parallel Workers: 8
[2021-03-25T11:26:38.851+0000][29638][gc,init] Concurrent Workers: 2
[2021-03-25T11:26:38.851+0000][29638][gc,init] Concurrent Refinement Workers: 8
[2021-03-25T11:26:38.851+0000][29638][gc,init] Periodic GC: Disabled
[2021-03-25T11:26:38.852+0000][29638][gc,metaspace] CDS disabled.
[2021-03-25T11:26:38.852+0000][29638][gc,metaspace] Compressed class space mapped at: 0x00000007c0000000-0x0000000800000000, size: 1073741824
[2021-03-25T11:26:38.852+0000][29638][gc,metaspace] Narrow klass base: 0x0000000000000000, Narrow klass shift: 3, Narrow klass range: 0x800000
000
[2021-03-25T11:26:38.939+0000][29638][gc,heap,exit] Heap
[2021-03-25T11:26:38.939+0000][29638][gc,heap,exit] garbage-first heap total 4012032K, used 2048K [0x00000006cb200000, 0x00000007c0000000)
[2021-03-25T11:26:38.939+0000][29638][gc,heap,exit] region size 2048K, 2 young (4096K), 0 survivors (0K)
[2021-03-25T11:26:38.939+0000][29638][gc,heap,exit] Metaspace used 3304K, capacity 4480K, committed 4480K, reserved 1056768K
[2021-03-25T11:26:38.939+0000][29638][gc,heap,exit] class space used 266K, capacity 384K, committed 384K, reserved 1048576K

Also, kibana is not starting and getting message "Kibana server is not ready yet"
attaching below the configuration file for kibana and elasticsearch.

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with </> icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.