crowdsecurity/crowdsec · error
listen_addr or listen_socket is required
Error message
listen_addr or listen_socket is required
What it means
Validation in Configuration.Validate for the HTTP acquisition source: neither listen_addr nor listen_socket is set, so the HTTP server has no place to listen for pushed logs. One of the two addressing options is mandatory before any other validation (path, auth) proceeds.
Source
Thrown at pkg/acquisition/modules/http/config.go:96
if c.MaxBodySize == nil {
c.MaxBodySize = new(defaultMaxBodySize)
}
}
func (s *Source) UnmarshalConfig(yamlConfig []byte) error {
cfg, err := ConfigurationFromYAML(yamlConfig)
if err != nil {
return err
}
s.Config = cfg
return nil
}
func (c *Configuration) Validate() error {
if c.ListenAddr == "" && c.ListenSocket == "" {
return errors.New("listen_addr or listen_socket is required")
}
if c.Path[0] != '/' {
return errors.New("path must start with /")
}
switch c.AuthType {
case "basic_auth":
baseErr := "basic_auth is selected, but"
if c.BasicAuth == nil {
return errors.New(baseErr + " basic_auth is not provided")
}
if c.BasicAuth.Username == "" {
return errors.New(baseErr + " username is not provided")
}
if c.BasicAuth.Password == "" {View on GitHub (pinned to 909b515798)
Solutions
- Set listen_addr: 0.0.0.0:8080 for a TCP listener, or listen_socket: /var/run/crowdsec-http.sock for a UNIX socket
- Also ensure path starts with '/' and an auth_type is configured, or the next validation checks will fire
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/acquisition/modules/http/config.go:96 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of crowdsecurity/crowdsec@909b515798 (2026-09-06).
Data as JSON: /api/errors/7508d739df67f9fd.
Report an issue: GitHub.