Skip to content

Crashes when a source pod is re-created #4

Open
@tomasrudh

Description

@tomasrudh

First, thanks for a nice utility.

We are using this to monitor logs from a number of pods, but when a pod is destroyed and recreated does promtail-windows crash and restarts. It is not a big deal as the newly created pod continues to work, but it messes up our monitoring of restarted pods, and is not that pretty.

This is from the logs:

2024/05/14 09:08:59 FATAL -- Failed to get file info C:\var\log\pods\speed_speed-lnsvc-uat-default-5698569f44-fnrj6_5c2f62c6-f13c-4bce-8d2b-f5e434c2ea4a\speed-lnsvc-uat-default\0.log: GetFileInformationByHandleEx C:\var\log\pods\speed_speed-lnsvc-uat-default-5698569f44-fnrj6_5c2f62c6-f13c-4bce-8d2b-f5e434c2ea4a\speed-lnsvc-uat-default\0.log: The handle is invalid.
goroutine 3748 [running]:
runtime/debug.Stack()
	/usr/local/go/src/runtime/debug/stack.go:24 +0x65
github.com/grafana/tail/util.Fatal({0x402f2a2?, 0x81?}, {0xc0009abfb0, 0x2, 0x2})
	/drone/src/vendor/github.com/grafana/tail/util/util.go:22 +0x97
github.com/grafana/tail/watch.(*PollingFileWatcher).ChangeEvents.func1()
	/drone/src/vendor/github.com/grafana/tail/watch/polling.go:71 +0x147
created by github.com/grafana/tail/watch.(*PollingFileWatcher).ChangeEvents
	/drone/src/vendor/github.com/grafana/tail/watch/polling.go:59 +0x1cc

Promtail-windows version: version=2.8.2, branch=HEAD, revision=9f809eda7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions