添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I have installed Elasticsearch- 7.11.2 in Ubuntu 18.04 machine.
when trying to start the Elasticsearch service getting below error:

------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----

root@extramarks -Latitude- 3400:/etc/ elasticsearch# systemctl status elasticsearch. service
Display all 571 possibilities? (y or n)
root@extramarks -Latitude- 3400:/etc/ elasticsearch# systemctl status elasticsearch. service
● elasticsearch. service - Elasticsearch
Loaded: loaded (/usr/lib/ systemd/ system/ elasticsearch. service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: https:/ /www.elastic. co
root@extramarks -Latitude- 3400:/etc/ elasticsearch# systemctl start elasticsearch. service

Job for elasticsearch. service failed because the control process exited with error code.
See "systemctl status elasticsearch. service" and "journalctl -xe" for details.
root@extramarks -Latitude- 3400:/etc/ elasticsearch#
root@extramarks -Latitude- 3400:/etc/ elasticsearch#
root@extramarks -Latitude- 3400:/etc/ elasticsearch#
root@extramarks -Latitude- 3400:/etc/ elasticsearch# journalctl -xe
Mar 25 11:44:19 extramarks- Latitude- 3400 /usr/lib/ gdm3/gdm- x-session[ 3423]: (II) event17 - DELL08BC:00 04F3:30CA Touchpad: SYN_DROPPED event -
Mar 25 11:44:19 extramarks- Latitude- 3400 /usr/lib/ gdm3/gdm- x-session[ 3423]: (EE) client bug: timer event17 tap: offset negative (-881ms)
Mar 25 11:45:01 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: Exception in thread "main" org.elasticsear ch.bootstrap. BootstrapExcept ion:
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: Likely root cause: java.nio. file.AccessDeni edException: /etc/elasticsearch
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at java.base/ sun.nio. fs.UnixExceptio n.translateToIO Exception( UnixE
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at java.base/ sun.nio. fs.UnixExceptio n.rethrowAsIOEx ception( UnixExc
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at java.base/ sun.nio. fs.UnixExceptio n.rethrowAsIOEx ception( UnixExc
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at java.base/ sun.nio. fs.UnixFileSyst emProvider. newByteChannel( Unix
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at java.base/ java.nio. file.spi. FileSystemProvi der.newOutputSt ream(
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at java.base/ java.nio. file.Files. newOutputStream (Files. java:224)
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.apache. lucene. store.FSDirecto ry$FSIndexOutpu t.<init> (FSDire
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.apache. lucene. store.FSDirecto ry$FSIndexOutpu t.<init> (FSDire
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.apache. lucene. store.FSDirecto ry.createOutput (FSDirectory. ja
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.elasticsear ch.common. settings. KeyStoreWrapper .save(KeyStore
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.elasticsear ch.bootstrap. Bootstrap. loadSecureSetti ngs(Bootst
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.elasticsear ch.bootstrap. Bootstrap. loadSecureSetti ngs(Bootst
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.elasticsear ch.bootstrap. Bootstrap. init(Bootstrap. java:342)
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.elasticsear ch.bootstrap. Elasticsearch. init(Elasticsea rch.ja
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.elasticsear ch.bootstrap. Elasticsearch. execute( Elasticsearch
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.elasticsear ch.cli. EnvironmentAwar eCommand. execute( Environme
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.elasticsear ch.cli. Command. mainWithoutErro rHandling( Command.
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.elasticsear ch.cli. Command. main(Command. java:79)
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.elasticsear ch.bootstrap. Elasticsearch. main(Elasticsea rch.ja
Mar 25 11:45:02 extramarks- Latitude- 3400 systemd- entrypoint[ 15473]: at org.elasticsear ch.bootstrap. Elasticsearch. main(Elasticsea rch.ja
Mar 25 11:45:01 extramarks- Latitude- 3400 systemd[1]: elasticsearch. service: Main process exited, code=exited, status=1/FAILURE
Mar 25 11:45:02 extramarks- Latitude- 3400 CRON[15692]: pam_unix( cron:session) : session opened for user root by (uid=0)
Mar 25 11:45:01 extramarks- Latitude- 3400 systemd[1]: elasticsearch. service: Failed with result 'exit-code'.
Mar 25 11:45:02 extramarks- Latitude- 3400 CRON[15695]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 25 11:45:01 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 11:45:03 extramarks- Latitude- 3400 CRON[15692]: pam_unix( cron:session) : session closed for user root
root@extramarks -Latitude- 3400:/etc/ elasticsearch#
root@extramarks -Latitude- 3400:/etc/ elasticsearch# exit
logout
(base) extramarks@ extramarks- Latitude- 3400:~$
(base) extramarks@ extramarks- Latitude- 3400:~$ sudo systemctl start elasticsearch. service
Job for elasticsearch. service failed because the control process exited with error code.
See "systemctl status elasticsearch. service" and "journalctl -xe" for details.

Please find below my system information:

(base) extramarks@ extramarks- Latitude- 3400:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic

------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -------

(base) extramarks@ extramarks- Latitude- 3400:~$ 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.

Question information

How did you install elasticsearch 7.11.2 in Ubuntu 18.04?
Such version is not available from the Ubuntu repositories, but only on foreign sources.

From the log:
Exception in thread "main" org.elasticsear ch.bootstrap. BootstrapExcept ion:
Likely root cause: java.nio. file.AccessDeni edException: /etc/elasticsearch

This looks as if something is wrong with the setup of elasticsearch and its dependencies.
You probably better ask at https:/ /discuss. elastic. co/

Remark: A new version 7.12.0 available on elastic.co