Kapacitor UDF over socket: socket write error

Hello,

I have a UDF talking to Kapacitor over unix domain socket. My “accepter” is exactly similar to the one explained in “The Server” section of the tutorial here: Writing a socket based UDF | InfluxData Documentation Archive

Once the server creates the connection I wait for agent.Wait() function to return in a go thread, similar to the tutorial but the socket seems to have been closed and I get “use of closed network connection”

There are no errors in my agent interface implementation, It is interesting that this started to happen after I added some more logic to Point function of Agent interface. According to logs my UDF took about 1sec to process a point. Is that too long?

Let me know if you need more info.

System:
Influx : Enterprise version 1.2.4
Kapacitor: 1.2.0

1 Like

Update:

Some times I see this error as well:

$ kapacitor show test
ID: test
Error: myUDF: stopping UDF server: keepalive timedout, last keepalive received was: 2017-07-13 01:01:03.055723295 +0000 UTC

From the code in udf/server.go It looks like there is some keepalive timeout. Can some one explain how this works?

1 Like

Looks like the solution was to increase the timeout for UDF in kapacitor.conf

2 Likes