Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filebeat runtime error: slice bounds out of range #2163

Closed
dosullivan opened this issue Aug 2, 2016 · 2 comments
Closed

Filebeat runtime error: slice bounds out of range #2163

dosullivan opened this issue Aug 2, 2016 · 2 comments
Labels

Comments

@dosullivan
Copy link

When running the alpha4 build of filebeat 5 with a fairly minimal configuration, I am running into what seems to be a bug. Filebeat is failing to start, and produces the following output:

panic: runtime error: slice bounds out of range

goroutine 31 [running]:
panic(0xa009c0, 0xc8200100b0)
    /usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/elastic/beats/filebeat/input/file.(*States).Cleanup(0xc8201c87c0, 0x4e94914f0000)
    /go/src/github.com/elastic/beats/filebeat/input/file/state.go:93 +0x487
github.com/elastic/beats/filebeat/prospector.(*ProspectorLog).Run(0xc820137960)
    /go/src/github.com/elastic/beats/filebeat/prospector/prospector_log.go:53 +0x8f
github.com/elastic/beats/filebeat/prospector.(*Prospector).Run(0xc82013edc0)
    /go/src/github.com/elastic/beats/filebeat/prospector/prospector.go:120 +0x1b9
github.com/elastic/beats/filebeat/crawler.(*Crawler).Start.func1(0xc820125130, 0x0, 0xc82013edc0)
    /go/src/github.com/elastic/beats/filebeat/crawler/crawler.go:71 +0x13a
created by github.com/elastic/beats/filebeat/crawler.(*Crawler).Start
    /go/src/github.com/elastic/beats/filebeat/crawler/crawler.go:72 +0x539
  • Version: filebeat-5.0.0-alpha4
  • Operating System: ubuntu 14.04.4 LTS
  • Steps to Reproduce: start filebeat with following configuration:
filebeat:
  prospectors:
    -
      paths:
        - /var/log/auth.log
        - /var/log/syslog
      input_type: log
      document_type: syslog
      ignore_older: 24h
      scan_frequency: 10s
      backoff: 1s
      max_backoff: 10s
      backoff_factor: 2
      force_close_files: false
      fields_under_root: false

  registry_file: /var/lib/filebeat/registry

output:
  logstash:
    hosts: ["shipper1:5044", "shipper2:5044"]
    worker: 2
    loadbalance: true
    index: filebeat

shipper:

logging:
  files:
    rotateeverybytes: 10485760 # = 10MB
@ruflin
Copy link
Collaborator

ruflin commented Aug 3, 2016

Thanks for reporting this. To reproduce it I need some more details form your side:

  • Can you share the content if your registry file?
  • Does this directly happen after startup?
  • Can you run the beat with -e -d "*" and share the log output?
  • Are the two log files that you listed existing?
  • Does any rotation happen on the log files?
  • Did you upgrade from a previous filebeat version?

@tsg
Copy link
Contributor

tsg commented Aug 3, 2016

After digging a bit in history, it looks like this was already fixed in #1915, which was committed a little after releasing alpha4. So the bug will be fixed with the alpha5 release.

@dosullivan thanks for reporting!

@tsg tsg closed this as completed Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants