elkninja / elastic-stack-docker-part-one

Getting up and running with Elastic Stack on Docker-Compose
Apache License 2.0
187 stars 118 forks source link

startup error (strict.perms=false not found) #19

Closed naizhao closed 9 months ago

naizhao commented 10 months ago

filebeat01-1 | /usr/local/bin/docker-entrypoint: line 25: exec: strict.perms=false: not found filebeat01-1 exited with code 127 logstash01-1 | 2023/12/27 09:07:31 Setting 'xpack.monitoring.enabled' from environment. logstash01-1 | /usr/local/bin/docker-entrypoint: line 30: exec: strict.perms=false: not found metricbeat01-1 | /usr/local/bin/docker-entrypoint: line 25: exec: strict.perms=false: not found logstash01-1 exited with code 127 metricbeat01-1 exited with code 127

naizhao commented 10 months ago

it seems like extra space added, the correct one is remove the space between - strict like

    command:
      -strict.perms=false
naizhao commented 10 months ago

Also, the

command: 
    - strict.perms=false

section in logstash01 must be removed, otherwise the following error will occur:

logstash01-1    | ERROR: Unrecognised option '-s'
logstash01-1    |
logstash01-1    | See: 'bin/logstash --help'
logstash01-1    | [FATAL] 2023-12-27 10:10:57.077 [main] Logstash - Logstash stopped processing because of an error: (SystemExit) exit
logstash01-1    | org.jruby.exceptions.SystemExit: (SystemExit) exit
logstash01-1    |   at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:808) ~[jruby.jar:?]
logstash01-1    |   at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:767) ~[jruby.jar:?]
logstash01-1    |   at RUBY.run(/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/clamp-1.0.1/lib/clamp/command.rb:138) ~[?:?]
logstash01-1    |   at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:89) ~[?:?]
logstash01-1 exited with code 1
szymi- commented 10 months ago

In my case the solution was:

  1. To remove all occurrences of:
    command: 
    - strict.perms=false
  2. To change ownership of filebeat.yml and metricbeat.yml to root:root and then doing docker compose down and docker compose up again (without deleting any of the previously created files or volumes).

Not an ideal fix, but at least it got thins up and running for me. My guess is that some newer versions of metricbeat and filebeat don't recognise this startup option anymore.

DanTheMinotaur commented 9 months ago

I found in the docs it's a flag. Adding -- let my container start.

    command:
      - --strict.perms=false
fulldeck commented 9 months ago

this solved it for me

command: filebeat -e -strict.perms=false

elkninja commented 9 months ago

sorry ive been AFK! i updated the strict perms for metricbeat and filebeat. i also removed the strict perms for logstash since i dont think that command existed the way i thought it did.

i'll mark this one as closed. we can open a new one if anything else crops up.