crowdsecurity/crowdsec · error
unable to hash
Error message
unable to hash
What it means
Sentinel error database.HashError, returned when bcrypt hashing of a machine's password fails during CreateMachine or password update; the API server maps it to HTTP 400. Typically indicates an invalid or over-long password input to the hash function.
Source
Thrown at pkg/database/errors.go:8
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
- Retry with a valid password — usually caused by an empty or over-long password (>72 bytes for bcrypt)
- Check the machine registration payload for a malformed password field
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at pkg/database/errors.go:8 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/2433a94c107e9ab8.
Report an issue: GitHub.