Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

History sync: wrong number of arguments for 'xdel' command #713

Closed
julianbrost opened this issue Mar 21, 2024 · 0 comments · Fixed by #725
Closed

History sync: wrong number of arguments for 'xdel' command #713

julianbrost opened this issue Mar 21, 2024 · 0 comments · Fixed by #725
Assignees
Labels
area/history bug Something isn't working
Milestone

Comments

@julianbrost
Copy link
Contributor

I just received the following error while starting the docker image (as part of docker compose up -d, so the MariaDB and Redis containers were starting at about the same time, which should explain the two intermediate warnings):

2024-03-21T09:46:35.219Z    DEBUG   entrypoint/main.go:42   translating env vars to YAML config
2024-03-21T09:46:35.219Z    DEBUG   entrypoint/main.go:108  checking SQL database
2024-03-21T09:46:35.224Z    DEBUG   entrypoint/main.go:102  starting actual daemon via exec(3)
2024-03-21T09:46:35.227Z    INFO    icingadb    Starting Icinga DB daemon (1.1.1-g16d43cb)
2024-03-21T09:46:35.227Z    INFO    icingadb    Connecting to database at 'db-icingadb:3306'
2024-03-21T09:46:35.232Z    INFO    icingadb    Connecting to Redis at 'redis-1:6379'
2024-03-21T09:46:35.233Z    INFO    icingadb    Starting history sync
2024-03-21T09:46:35.321Z    WARN    redis   Can't connect to Redis. Retrying    {"error": "dial tcp: lookup redis-1: operation was canceled"}
2024-03-21T09:46:35.321Z    WARN    database    Can't connect to database. Retrying {"error": "read tcp 172.18.0.38:54866->172.18.0.3:3306: use of closed network connection"}
2024-03-21T09:46:35.325Z    FATAL   icingadb    ERR wrong number of arguments for 'xdel' command
can't perform "[xdel icinga:history:stream:state]"
github.com/icinga/icingadb/pkg/icingaredis.WrapCmdErr
    /icingadb-src/pkg/icingaredis/utils.go:121
github.com/icinga/icingadb/pkg/icingadb/history.Sync.deleteFromRedis
    /icingadb-src/pkg/icingadb/history/sync.go:155
github.com/icinga/icingadb/pkg/icingadb/history.Sync.Sync.func3
    /icingadb-src/pkg/icingadb/history/sync.go:96
golang.org/x/sync/errgroup.(*Group).Go.func1
    /go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78
runtime.goexit
    /usr/local/go/src/runtime/asm_amd64.s:1695

The version used (16d43cb) is from #699, but that PR should have no effect on this.

I guess this might happen due to the following not handling a closed channel:

case bulk := <-bulks:
ids := make([]string, len(bulk))
for i := range bulk {
ids[i] = bulk[i].ID
}
cmd := s.redis.XDel(ctx, stream, ids...)

@yhabteab yhabteab added bug Something isn't working area/history labels Mar 22, 2024
@yhabteab yhabteab self-assigned this Mar 28, 2024
@yhabteab yhabteab added this to the 1.1.2 milestone Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/history bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants