crowdsecurity/crowdsec · error

user already exist

Error message

user already exist

What it means

Sentinel error database.UserExists, returned when creating or registering a user/machine whose ID already exists in the database (e.g. QueryMachine found an existing row); the API server maps it to HTTP 403 and callers use errors.Is to detect duplicate registration.

Source

Thrown at pkg/database/errors.go:6

package database

import "errors"

var (
	UserExists        = errors.New("user already exist")
	UserNotExists     = errors.New("user doesn't exist")
	HashError         = errors.New("unable to hash")
	InsertFail        = errors.New("unable to insert row")
	QueryFail         = errors.New("unable to query")
	UpdateFail        = errors.New("unable to update")
	DeleteFail        = errors.New("unable to delete")
	ItemNotFound      = errors.New("object not found")
	ParseTimeFail     = errors.New("unable to parse time")
	ParseDurationFail = errors.New("unable to parse duration")
	MarshalFail       = errors.New("unable to serialize")
	BulkError         = errors.New("unable to insert bulk")
	ParseType         = errors.New("unable to parse type")
	InvalidIPOrRange  = errors.New("invalid ip address / range")
	InvalidFilter     = errors.New("invalid filter")
)

View on GitHub (pinned to 909b515798)

Solutions

  1. Use a unique machine ID when registering a new bouncer
  2. If re-registering an existing machine, delete it first (cscli machines delete) or reuse its existing credentials
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/database/errors.go:6 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/41567aa86fcb284c. Report an issue: GitHub.