Skip to content

Stats endpoint API should shut down cleanlyΒ #107

@fearful-symmetry

Description

@fearful-symmetry

cc @cmacknz
In cases where agent is shut down cleanly (for example, with a sigint), we get this message:

{"log.level":"info","@timestamp":"2023-03-08T10:47:12.737-0800","log.logger":"api","log.origin":{"file.name":"api/server.go","file.line":72},"message":"Stats endpoint (127.0.0.1:6791) finished: accept tcp 127.0.0.1:6791: use of closed network connection","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}

This is a benign error, but it's almost always the last message we get when agent shuts down, which means users might get confused and assume it's somehow related to the shutdown. We should either clarify the error message to make it sound less threatening, or change the (s *Server) Stop() method so we don't print an error during "normal" shutdown.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions