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 panic when no paths are defined in one of two prospectors #3917

Closed
tsg opened this issue Apr 5, 2017 · 0 comments
Closed

Filebeat panic when no paths are defined in one of two prospectors #3917

tsg opened this issue Apr 5, 2017 · 0 comments
Labels

Comments

@tsg
Copy link
Contributor

tsg commented Apr 5, 2017

Version: master

The following commit causes Filebeat to panic:

filebeat.prospectors:
- input_type: log
  paths:
    - /var/log/*.log
- input_type: log
  paths: []

output.elasticsearch:
  hosts: ["localhost:9200"]

Logs plus panic (expand):

 ./filebeat -e -c filebeat.bug.yml
2017/04/05 09:35:07.077266 beat.go:325: INFO Home path: [/Users/tsg/src/github.com/elastic/beats/filebeat] Config path: [/Users/tsg/src/github.com/elastic/beats/filebeat] Data path: [/Users/tsg/src/github.com/elastic/beats/filebeat/data] Logs path: [/Users/tsg/src/github.com/elastic/beats/filebeat/logs]
2017/04/05 09:35:07.077306 beat.go:350: INFO Beat metadata path: /Users/tsg/src/github.com/elastic/beats/filebeat/data/meta.json
2017/04/05 09:35:07.077323 metrics.go:23: INFO Metrics logging every 30s
2017/04/05 09:35:07.077421 beat.go:332: INFO Beat UUID: 5919a89e-fed5-4e81-86d9-da3b852d978b
2017/04/05 09:35:07.077438 beat.go:210: INFO Setup Beat: filebeat; Version: 6.0.0-alpha1
2017/04/05 09:35:07.077704 client.go:131: INFO Elasticsearch url: http://localhost:9200
2017/04/05 09:35:07.077745 outputs.go:107: INFO Activated elasticsearch as output plugin.
2017/04/05 09:35:07.077792 publish.go:191: INFO Publisher name: a-mac-with-esc-key-2.local
2017/04/05 09:35:07.077967 async.go:63: INFO Flush Interval set to: 1s
2017/04/05 09:35:07.077978 async.go:64: INFO Max Bulk Size set to: 50
2017/04/05 09:35:07.078243 beat.go:253: INFO filebeat start running.
2017/04/05 09:35:07.078278 registrar.go:83: INFO Registry file set to: /Users/tsg/src/github.com/elastic/beats/filebeat/data/registry
2017/04/05 09:35:07.078308 registrar.go:104: INFO Loading registrar data from /Users/tsg/src/github.com/elastic/beats/filebeat/data/registry
2017/04/05 09:35:07.078331 registrar.go:115: INFO States Loaded from registrar: 0
2017/04/05 09:35:07.078355 crawler.go:38: INFO Loading Prospectors: 2
2017/04/05 09:35:07.078491 prospector_log.go:63: INFO Prospector with previous states loaded: 0
2017/04/05 09:35:07.078554 prospector.go:129: INFO Starting prospector of type: log; id: 17005676086519951868
2017/04/05 09:35:07.078550 registrar.go:148: INFO Starting Registrar
2017/04/05 09:35:07.078551 sync.go:41: INFO Start sending events to output
2017/04/05 09:35:07.078596 spooler.go:63: INFO Starting spooler: spool_size: 2048; idle_timeout: 5s
2017/04/05 09:35:07.078627 spooler.go:100: INFO Stopping spooler
2017/04/05 09:35:07.078651 registrar.go:203: INFO Stopping Registrar
2017/04/05 09:35:07.078657 registrar.go:160: INFO Ending Registrar
2017/04/05 09:35:07.079473 prospector.go:248: INFO Stopping Prospector: 17005676086519951868
2017/04/05 09:35:07.079511 prospector.go:139: INFO Prospector channel stopped
panic: send on closed channel

goroutine 27 [running]:
panic(0x542720, 0xc420212a40)
	/usr/local/Cellar/go/1.7/libexec/src/runtime/panic.go:500 +0x1a1
github.com/elastic/beats/filebeat/beater.(*spoolerOutlet).OnEvent(0xc4200fe7c0, 0xc420190500, 0x0)
	/Users/tsg/src/github.com/elastic/beats/filebeat/beater/channels.go:57 +0x194
github.com/elastic/beats/filebeat/prospector.(*Prospector).updateState(0xc42021a000, 0xc420045628, 0x11, 0x0)
	/Users/tsg/src/github.com/elastic/beats/filebeat/prospector/prospector.go:218 +0x22e
github.com/elastic/beats/filebeat/prospector.(*Prospector).startHarvester(0xc42021a000, 0xc4201fc6c0, 0x11, 0x0, 0x0, 0x89d8e0, 0xc420248d00, 0x2b504dc, 0x1000004, 0xed076b14b, ...)
	/Users/tsg/src/github.com/elastic/beats/filebeat/prospector/prospector.go:319 +0x13c
github.com/elastic/beats/filebeat/prospector.(*Log).scan(0xc42021c0f0)
	/Users/tsg/src/github.com/elastic/beats/filebeat/prospector/prospector_log.go:245 +0x5b7
github.com/elastic/beats/filebeat/prospector.(*Log).Run(0xc42021c0f0)
	/Users/tsg/src/github.com/elastic/beats/filebeat/prospector/prospector_log.go:84 +0xec
github.com/elastic/beats/filebeat/prospector.(*Prospector).Run(0xc42021a000)
	/Users/tsg/src/github.com/elastic/beats/filebeat/prospector/prospector.go:175 +0x4f
github.com/elastic/beats/filebeat/prospector.(*Prospector).Start.func2(0xc42021a000)
	/Users/tsg/src/github.com/elastic/beats/filebeat/prospector/prospector.go:166 +0x51
created by github.com/elastic/beats/filebeat/prospector.(*Prospector).Start
	/Users/tsg/src/github.com/elastic/beats/filebeat/prospector/prospector.go:167 +0x1a4
@tsg tsg added bug Filebeat Filebeat labels Apr 5, 2017
ruflin added a commit to ruflin/beats that referenced this issue Apr 19, 2017
If one prospector started to already send data and a second one was misconfigured, the beat paniced during shutdown. This is no prevented by properly shutting down the crawler also on error.

Closes elastic#3917
exekias pushed a commit that referenced this issue Apr 19, 2017
…4037)

If one prospector started to already send data and a second one was misconfigured, the beat paniced during shutdown. This is no prevented by properly shutting down the crawler also on error.

Closes #3917
ruflin added a commit to ruflin/beats that referenced this issue Apr 19, 2017
…lastic#4037)

If one prospector started to already send data and a second one was misconfigured, the beat paniced during shutdown. This is no prevented by properly shutting down the crawler also on error.

Closes elastic#3917
(cherry picked from commit 95195cc)
ruflin added a commit to ruflin/beats that referenced this issue Apr 19, 2017
…lastic#4037)

If one prospector started to already send data and a second one was misconfigured, the beat paniced during shutdown. This is no prevented by properly shutting down the crawler also on error.

Closes elastic#3917
(cherry picked from commit 95195cc)
ruflin added a commit to ruflin/beats that referenced this issue Apr 19, 2017
…lastic#4037)

If one prospector started to already send data and a second one was misconfigured, the beat paniced during shutdown. This is no prevented by properly shutting down the crawler also on error.

Closes elastic#3917
(cherry picked from commit 95195cc)
exekias pushed a commit that referenced this issue Apr 19, 2017
…4037) (#4048)

If one prospector started to already send data and a second one was misconfigured, the beat paniced during shutdown. This is no prevented by properly shutting down the crawler also on error.

Closes #3917
(cherry picked from commit 95195cc)
exekias pushed a commit that referenced this issue Apr 19, 2017
…4037) (#4046)

If one prospector started to already send data and a second one was misconfigured, the beat paniced during shutdown. This is no prevented by properly shutting down the crawler also on error.

Closes #3917
(cherry picked from commit 95195cc)
monicasarbu pushed a commit that referenced this issue Apr 20, 2017
…4037) (#4047)

If one prospector started to already send data and a second one was misconfigured, the beat paniced during shutdown. This is no prevented by properly shutting down the crawler also on error.

Closes #3917
(cherry picked from commit 95195cc)
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

1 participant