Skip to content

Socket error occurs when restarting Redis #387

Closed as not planned
Closed as not planned
@tdeverdiere

Description

@tdeverdiere

Describe the bug
In k8s cluster, when Redis is restarted eventing-redis use an old socket to connect and there is this error in logs:

{"severity":"ERROR","timestamp":"2022-10-03T14:04:38.422117731Z","logger":"redis-stream-source","caller":"adapter/adapter.go:185","message":"Cannot read from stream","commit":"6becb00-dirty","stream":"vms:changes","error":"write tcp 10.6.4.171:58374->172.20.208.153:6379: use of closed network connection","stacktrace":"knative.dev/eventing-redis/source/pkg/adapter.(*Adapter).processEntry\n\tknative.dev/eventing-redis/source/pkg/adapter/adapter.go:185\nknative.dev/eventing-redis/source/pkg/adapter.(*Adapter).Start.func1\n\tknative.dev/eventing-redis/source/pkg/adapter/adapter.go:156"}

Expected behavior
Eventing-redis should reopen a socket when the error is "use of closed network connection".
Or may be we should use a pool of connection to handle those error.

To Reproduce
Restart Redis in the k8s cluster

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions