influxdata / influxdata/kapacitor

Recover from socket-based UDF connection failure?

Open
#1,174 0 comments 4 reactions 0 assignees View on GitHub
pm/extensibility
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

It looks like kapacitor does not attempt to reconnect to a socket-based UDF if the connection fails for any reason. Worse, this results in task stopping:

`[stream_reduc_avail_heaters:TestUDF2] 2017/02/06 13:45:40 E! stopping UDF server: write error: write unix @->/tmp/test-udf: write: broken pipe
[task_master:main] 2017/02/06 13:45:40 E! Stopped task: test_task TestUDF2: stopping UDF server: write error: write unix @->/tmp/test-udf: write: broken pipe`

Recovery apparently requires disabling and re-enabling the task, or restarting the kapacitor daemon. I'm using `socat` to forward from a UDS to a (potentially non-local) TCP socket, so connection failure is a real concern. What is the suggested way of dealing with that? I was hoping there would be a configuration option to automatically restart the task, perhaps with an exponential back off.

Apologies if I missed something obvious in the docs.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating the socket-based UDF connection and task-stopping paths, then review how failures are propagated. Done would require an agreed recovery behavior for failed connections, including whether and how task restart or backoff should work.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.