blacktop / docker-elastic-stack

ELK Stack Dockerfile
MIT License
190 stars 75 forks source link

Kibana could not start normally in version 7.9 #23

Closed timbotetsu closed 3 years ago

timbotetsu commented 3 years ago

reproduce:

docker run -d --name elkstack blacktop/elastic-stack:7.9

after a while tap docker logs -f elkstack will show:

2020-10-10 06:32:28,667 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2020-10-10 06:32:28,669 INFO supervisord started with pid 7
2020-10-10 06:32:29,673 INFO spawned: 'elasticsearch' with pid 9
2020-10-10 06:32:29,675 INFO spawned: 'kibana' with pid 10
2020-10-10 06:32:29,677 INFO spawned: 'logstash' with pid 11
2020-10-10 06:32:29,679 INFO spawned: 'nginx' with pid 12
2020-10-10 06:32:29,971 INFO exited: kibana (exit status 1; not expected)
2020-10-10 06:32:31,211 INFO success: elasticsearch entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-10 06:32:31,212 INFO spawned: 'kibana' with pid 112
2020-10-10 06:32:31,213 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-10 06:32:31,213 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-10 06:32:31,479 INFO exited: kibana (exit status 1; not expected)
2020-10-10 06:32:33,482 INFO spawned: 'kibana' with pid 170
2020-10-10 06:32:34,026 INFO exited: kibana (exit status 1; not expected)
2020-10-10 06:32:38,021 INFO spawned: 'kibana' with pid 188
2020-10-10 06:32:38,627 INFO exited: kibana (exit status 1; not expected)
2020-10-10 06:32:38,924 INFO gave up: kibana entered FATAL state, too many start retries too quickly

docker exec elkstack cat /var/log/kibana.stderr.log will show:

[WARN  tini (10)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Kibana does not support the current Node.js version v10.21.0. Please use Node.js v10.22.0.
[WARN  tini (112)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Kibana does not support the current Node.js version v10.21.0. Please use Node.js v10.22.0.
[WARN  tini (170)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Kibana does not support the current Node.js version v10.21.0. Please use Node.js v10.22.0.
[WARN  tini (188)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Kibana does not support the current Node.js version v10.21.0. Please use Node.js v10.22.0.

seems that Node.js version should be bump v10.22.0+

timbotetsu commented 3 years ago

I tried to use node:10.22.1-alpine as the build stage, but Kibana could not run at Node.js v10.22.1

[WARN  tini (11)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Kibana does not support the current Node.js version v10.22.1. Please use Node.js v10.22.0.
[WARN  tini (113)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Kibana does not support the current Node.js version v10.22.1. Please use Node.js v10.22.0.
[WARN  tini (171)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Kibana does not support the current Node.js version v10.22.1. Please use Node.js v10.22.0.
[WARN  tini (189)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Kibana does not support the current Node.js version v10.22.1. Please use Node.js v10.22.0.

as the Elastic Team Member said from https://discuss.elastic.co/t/kibana-development-environment-issue/172390/2:

We require that you use a certain version of Node.js to develop with Kibana. I suggest checking out nvm 15 for managing Node versions (it's what our devs tend to use). Once you have it installed you can just run nvm use inside the Kibana directory to switch to the right version.

then I use v10.22.0 as the build stage, it works:

2020-10-10 07:11:43,312 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2020-10-10 07:11:43,315 INFO supervisord started with pid 8
2020-10-10 07:11:44,318 INFO spawned: 'elasticsearch' with pid 10
2020-10-10 07:11:44,322 INFO spawned: 'kibana' with pid 11
2020-10-10 07:11:44,324 INFO spawned: 'logstash' with pid 12
2020-10-10 07:11:44,326 INFO spawned: 'nginx' with pid 13
2020-10-10 07:11:46,102 INFO success: elasticsearch entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-10 07:11:46,102 INFO success: logstash entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-10 07:11:46,102 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-10 07:11:49,986 INFO success: kibana entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)

so I create a PR: https://github.com/blacktop/docker-elastic-stack/pull/24

timbotetsu commented 3 years ago

due to https://github.com/blacktop/docker-elastic-stack/pull/24 has been merge, this issue closed