首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在重新启动VM后无法启动elasticsearch

在重新启动VM后无法启动elasticsearch
EN

Stack Overflow用户
提问于 2021-08-20 11:12:30
回答 1查看 262关注 0票数 0

因此,VM提示它内存不足,我重新启动它,现在我无法启动Elasticsearch --操作系统还列出了它删除了一些与java相关的内容,但我认为它只是一个临时文件(我对linux和ubuntu一般都是新手)。

以下是日志中的信息-xe:

代码语言:javascript
复制
haitham@haithamserver:~$ journalctl -xe
Aug 20 10:38:09 haithamserver systemd[1]: Started Session 3 of user haitham.
-- Subject: A start job for unit session-3.scope has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit session-3.scope has finished successfully.
--
-- The job identifier is 520.
Aug 20 10:38:09 haithamserver systemd-logind[637]: New session 3 of user haitham.
-- Subject: A new session 3 has been created for user haitham
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID 3 has been created for the user haitham.
--
-- The leading process of the session is 1233.
Aug 20 10:38:25 haithamserver sudo[1326]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
Aug 20 10:38:28 haithamserver sudo[1326]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
Aug 20 10:38:28 haithamserver sudo[1326]:  haitham : TTY=pts/0 ; PWD=/home/haitham ; USER=root ; COMMAND=/usr/bin/systemctl start elasticsearch
Aug 20 10:38:28 haithamserver sudo[1326]: pam_unix(sudo:session): session opened for user root by haitham(uid=0)
Aug 20 10:38:28 haithamserver systemd[1]: Starting Elasticsearch...
-- Subject: A start job for unit elasticsearch.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit elasticsearch.service has begun execution.
--
-- The job identifier is 602.
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]: output:
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]: [0.000s][error][logging] Error opening log file '/var/log/elasticsearch/gc.log': Permission denied
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]: [0.000s][error][logging] Initialization of output 'file=/var/log/elasticsearch/gc.log' using options 'filecount=32,filesize=64m' failed.
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]: error:
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]: Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]: Error: Could not create the Java Virtual Machine.
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]: Error: A fatal exception has occurred. Program will exit.
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]:         at org.elasticsearch.tools.launchers.JvmOption.flagsFinal(JvmOption.java:119)
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]:         at org.elasticsearch.tools.launchers.JvmOption.findFinalOptions(JvmOption.java:81)
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]:         at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:38)
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]:         at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:135)
Aug 20 10:38:30 haithamserver systemd-entrypoint[1452]:         at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)
Aug 20 10:38:30 haithamserver systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit elasticsearch.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Aug 20 10:38:30 haithamserver sudo[1326]: pam_unix(sudo:session): session closed for user root
Aug 20 10:38:30 haithamserver systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit elasticsearch.service has entered the 'failed' state with result 'exit-code'.
Aug 20 10:38:30 haithamserver systemd[1]: Failed to start Elasticsearch.
-- Subject: A start job for unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit elasticsearch.service has finished with a failure.
--
-- The job identifier is 602 and the job result is failed.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-08-20 11:23:14

输出中提到了两个错误:

打开日志文件‘/var/ log /elasticsearch/gc.log’的

错误:权限被拒绝

Elasticsearch进程没有对/var/log/elasticsearch文件夹的写访问权

下面的第二个错误可能来自于上面的第一个错误,请确保可以写入gc.log文件,然后再试一次。

无效-Xlog选项'-Xlog:gc*,gc+age=trace,-Xlog pid,tags:filecount=32,filesize=64m'

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68861292

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档