Read error: unexpected EOF with unit root test as kapacitor UDF

Hi

I try to create kapacitor UDF to test unit roots on the time series, evverythink work but after deux batches query and I get the results I have this error :

lvl=error msg=“node failed” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 err="read error: unexpected EOF

ts=2018-10-30T10:15:13.541+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“2018-10-30 10:15:13,541 INFO:root: SIZE OF INPUT: 7651”
ts=2018-10-30T10:15:13.541+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“RESULTS OF KPSS TEST”
ts=2018-10-30T10:15:13.556+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text="2018-10-30 10:15:13,542 DEBUG:root: TEST_KPSS KPSS Stationarity Test Results "
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text======================================
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Test Statistic 0.003”
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“P-value 0.999”
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Lags 36”
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=-------------------------------------
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Trend: Constant and Linear Time Trend”
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Critical Values: 0.22 (1%), 0.15 (5%), 0.12 (10%)”
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Null Hypothesis: The process is weakly stationary.”
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Alternative Hypothesis: The process contains a unit root.”
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“NON STATIONNAIRE !!!”
ts=2018-10-30T10:15:13.557+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“2018-10-30 10:15:13,554 INFO:root: ending batch”
ts=2018-10-30T10:15:15.478+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“2018-10-30 10:15:15,478 INFO:root: SIZE OF INPUT: 7646”
ts=2018-10-30T10:15:15.479+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“RESULTS OF KPSS TEST”
ts=2018-10-30T10:15:15.486+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text="2018-10-30 10:15:15,479 DEBUG:root: TEST_KPSS KPSS Stationarity Test Results "
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text======================================
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Test Statistic 0.003”
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“P-value 0.999”
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Lags 36”
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=-------------------------------------
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Trend: Constant and Linear Time Trend”
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Critical Values: 0.22 (1%), 0.15 (5%), 0.12 (10%)”
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Null Hypothesis: The process is weakly stationary.”
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“Alternative Hypothesis: The process contains a unit root.”
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“NON STATIONNAIRE !!!”
ts=2018-10-30T10:15:15.487+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“2018-10-30 10:15:15,486 INFO:root: ending batch”
ts=2018-10-30T10:15:15.501+01:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=KPSS_responsetime node=KPSS2 text=“2018-10-30 10:15:15,488 INFO:root: Agent finished”

Any help you are welcome

Thanks