更改logging.dest后,Kibana无法在CentOs 7上启动

更改logging.dest后,Kibana无法在CentOs 7上启动,centos,kibana,Centos,Kibana,当我更改/etc/kibana/kibana.yml # Enables you specify a file where Kibana stores log output. # logging.dest: stdout logging.dest: /var/log/kibana/kibana.log # line 92 那么kibana不能正确启动。 注释/etc/kibana/kibana.yml的第92行时,正确启动 jounralctl的输出 sie 16 17:32:51 test.

当我更改
/etc/kibana/kibana.yml

# Enables you specify a file where Kibana stores log output.
# logging.dest: stdout
logging.dest: /var/log/kibana/kibana.log # line 92
那么kibana不能正确启动。 注释
/etc/kibana/kibana.yml
的第92行时,正确启动

jounralctl的输出

sie 16 17:32:51 test.org.pl systemd[1]: Starting Kibana...
sie 16 17:32:52 test.org.pl kibana[3083]: FATAL CLI ERROR YAMLException: bad indentation of a mapping entry at line 92, column 2:
sie 16 17:32:52 test.org.pl systemd[1]: kibana.service: main process exited, code=exited, status=1/FAILURE
sie 16 17:32:52 test.org.pl systemd[1]: Unit kibana.service entered failed state.
sie 16 17:32:52 test.org.pl systemd[1]: kibana.service failed.
sie 16 17:32:52 test.org.pl systemd[1]: kibana.service holdoff time over, scheduling restart.
sie 16 17:32:52 test.org.pl systemd[1]: Started Kibana.ervice
sie 16 17:32:52 test.org.pl systemd[1]: Starting Kibana...
sie 16 17:32:53 test.org.pl systemd[1]: kibana.service: main process exited, code=exited, status=1/FAILURE
sie 16 17:32:53 test.org.pl systemd[1]: Unit kibana.service entered failed state.
sie 16 17:32:53 test.org.pl systemd[1]: kibana.service failed.
sie 16 17:32:53 test.org.pl systemd[1]: kibana.service holdoff time over, scheduling restart.
sie 16 17:32:53 test.org.pl systemd[1]: Started Kibana.
sie 16 17:32:53 test.org.pl systemd[1]: Starting Kibana...
sie 16 17:32:54 test.org.pl systemd[1]: kibana.service: main process exited, code=exited, status=1/FAILURE
sie 16 17:32:54 test.org.pl systemd[1]: Unit kibana.service entered failed state.
sie 16 17:32:54 test.org.pl systemd[1]: kibana.service failed.
sie 16 17:32:54 test.org.pl systemd[1]: kibana.service holdoff time over, scheduling restart.
sie 16 17:32:54 test.org.pl systemd[1]: start request repeated too quickly for kibana.service
sie 16 17:32:54 test.org.pl systemd[1]: Failed to start Kibana.
sie 16 17:32:54 test.org.pl systemd[1]: Unit kibana.service entered failed state.
sie 16 17:32:54 test.org.pl systemd[1]: kibana.service failed.
sie 17 10:20:05 localhost.localdomain systemd[1]: Starting Kibana...
sie 17 10:20:05 localhost.localdomain systemd[1]: Started Kibana.
sie 17 10:20:07 localhost.localdomain kibana[10222]: FATAL CLI ERROR YAMLException: bad indentation of a mapping entry at line 93, column 2:
sie 17 10:20:07 localhost.localdomain kibana[10222]: logging.dest: /var/log/kibana/ki ...
sie 17 10:20:07 localhost.localdomain kibana[10222]: ^
sie 17 10:20:07 localhost.localdomain kibana[10222]: at generateError (/usr/share/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:160:10)
我在
/etc/

drwxr-xr-x. 2 root          root             6 08-10 16:00 kibana
我以
守护进程的身份启动Kibana

systemctl restart kibana
Kibana
是5.5.1版

更新

我尝试手动创建此文件,但
kibana
之后将无法启动:

    [root@localhost kibana]# ls -lh
razem 8,0K
-rw-r--r--. 1 kibana kibana    0 08-17 10:17 kibana.log
-rw-r--r--. 1 root   root     78 06-19 15:26 kibana.stderr
-rw-r--r--. 1 root   root   1,4K 06-19 15:26 kibana.stdout
[root@localhost kibana]# pwd
/var/log/kibana
journalctl

sie 16 17:32:51 test.org.pl systemd[1]: Starting Kibana...
sie 16 17:32:52 test.org.pl kibana[3083]: FATAL CLI ERROR YAMLException: bad indentation of a mapping entry at line 92, column 2:
sie 16 17:32:52 test.org.pl systemd[1]: kibana.service: main process exited, code=exited, status=1/FAILURE
sie 16 17:32:52 test.org.pl systemd[1]: Unit kibana.service entered failed state.
sie 16 17:32:52 test.org.pl systemd[1]: kibana.service failed.
sie 16 17:32:52 test.org.pl systemd[1]: kibana.service holdoff time over, scheduling restart.
sie 16 17:32:52 test.org.pl systemd[1]: Started Kibana.ervice
sie 16 17:32:52 test.org.pl systemd[1]: Starting Kibana...
sie 16 17:32:53 test.org.pl systemd[1]: kibana.service: main process exited, code=exited, status=1/FAILURE
sie 16 17:32:53 test.org.pl systemd[1]: Unit kibana.service entered failed state.
sie 16 17:32:53 test.org.pl systemd[1]: kibana.service failed.
sie 16 17:32:53 test.org.pl systemd[1]: kibana.service holdoff time over, scheduling restart.
sie 16 17:32:53 test.org.pl systemd[1]: Started Kibana.
sie 16 17:32:53 test.org.pl systemd[1]: Starting Kibana...
sie 16 17:32:54 test.org.pl systemd[1]: kibana.service: main process exited, code=exited, status=1/FAILURE
sie 16 17:32:54 test.org.pl systemd[1]: Unit kibana.service entered failed state.
sie 16 17:32:54 test.org.pl systemd[1]: kibana.service failed.
sie 16 17:32:54 test.org.pl systemd[1]: kibana.service holdoff time over, scheduling restart.
sie 16 17:32:54 test.org.pl systemd[1]: start request repeated too quickly for kibana.service
sie 16 17:32:54 test.org.pl systemd[1]: Failed to start Kibana.
sie 16 17:32:54 test.org.pl systemd[1]: Unit kibana.service entered failed state.
sie 16 17:32:54 test.org.pl systemd[1]: kibana.service failed.
sie 17 10:20:05 localhost.localdomain systemd[1]: Starting Kibana...
sie 17 10:20:05 localhost.localdomain systemd[1]: Started Kibana.
sie 17 10:20:07 localhost.localdomain kibana[10222]: FATAL CLI ERROR YAMLException: bad indentation of a mapping entry at line 93, column 2:
sie 17 10:20:07 localhost.localdomain kibana[10222]: logging.dest: /var/log/kibana/ki ...
sie 17 10:20:07 localhost.localdomain kibana[10222]: ^
sie 17 10:20:07 localhost.localdomain kibana[10222]: at generateError (/usr/share/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:160:10)

配置文件中不允许有任何空间。

由于某些原因,kibana不知道自己创建日志文件。因此,您必须首先手动创建它并设置适当的所有权。可以这样实现:

touch /var/log/kibana.log
chown kibana:kibana /var/log/kibana.log
然后发出一个systemctl restart kibana,你就可以出发了

您可以通过以下方式检查日志:
tailf/var/log/kibana.log

cat /var/log/kibana.log

出于某种原因,kibana不知道自己创建日志文件。因此,您必须首先手动创建它并设置适当的所有权。可以这样实现:

touch /var/log/kibana.log
chown kibana:kibana /var/log/kibana.log
然后发出一个systemctl restart kibana,你就可以出发了

您可以通过以下方式检查日志:
tailf/var/log/kibana.log

cat /var/log/kibana.log

这很奇怪,因为在我的另一个
centos
kibana
上,我创建了
kibana.stderr
kibana.stdout
的代码与上面的
/etc/kibana/kibana.yml
中的代码相同,我明天会尝试你的建议。Thankstdout和stderr与在服务器上实际创建文件并将日志写入文件完全不同。不管奇怪与否,尝试上面的解决方案,它都会起作用。刚刚在我安装了kibana的CentOS 7.x服务器上测试了它。我的意思是,我已经在我的CentOS 7中的一个上自动创建了这两个文件,但在另一个上没有。我想你会很困惑。请务必阅读有关stderr和stdoutOk的内容,因为在我的另一个
centos
kibana
上创建的
kibana.stderr
kibana.stdout
与上面的
/etc/kibana/kibana.yml
行相同,我将在明天尝试你的建议。Thankstdout和stderr与在服务器上实际创建文件并将日志写入文件完全不同。不管奇怪与否,尝试上面的解决方案,它都会起作用。刚刚在我安装了kibana的CentOS 7.x服务器上测试了它。我的意思是,我已经在我的CentOS 7中的一个上自动创建了这两个文件,但在另一个上没有。我想你会很困惑。请务必阅读有关stderr和stdoutOk的内容,它可以正常工作-配置文件中不允许有空间