From 0f5e99f4231127d98f83679ee3c5640995610b46 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 22 Apr 2026 09:44:43 -0700 Subject: [PATCH] fix(filer.meta.tail): fail fast when -es is used without elastic build tag (#9191) fix(filer.meta.tail): error instead of silently dropping events when -es is used without elastic build tag The default chrislusf/seaweedfs image builds without the `elastic` build tag, so sendToElasticSearchFunc was a no-op that returned a function discarding every event. Users passing -es saw the subscription wire up in filer logs but nothing ever reached Elasticsearch. Return an error explaining the binary wasn't built with ES support and pointing at the build flag. The caller already prints the error and exits, so users now get an immediate, actionable message. Fixes #9190 --- weed/command/filer_meta_tail_non_elastic.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weed/command/filer_meta_tail_non_elastic.go b/weed/command/filer_meta_tail_non_elastic.go index 7bb6fa2aba..e61b98e032 100644 --- a/weed/command/filer_meta_tail_non_elastic.go +++ b/weed/command/filer_meta_tail_non_elastic.go @@ -3,11 +3,11 @@ package command import ( + "fmt" + "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" ) func sendToElasticSearchFunc(servers string, esIndex string) (func(resp *filer_pb.SubscribeMetadataResponse) error, error) { - return func(resp *filer_pb.SubscribeMetadataResponse) error { - return nil - }, nil + return nil, fmt.Errorf("this weed binary was built without Elasticsearch support. Rebuild with `-tags elastic` (see docker/Dockerfile.go_build) to use -es/-es.index") }