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

**URL:** <https://community.influxdata.com/t/read-error-unexpected-eof-with-unit-root-test-as-kapacitor-udf/7216>\
**Category:** Systems\
**Tags:** kapacitor\
**Created:** [October 30, 2018, 9:22am UTC](https://community.influxdata.com/t/read-error-unexpected-eof-with-unit-root-test-as-kapacitor-udf/7216 "2018-10-30T09:22:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![garba\_moussa](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/garba_moussa/32/3594_2.png) [@garba\_moussa](https://community.influxdata.com/u/garba_moussa)\
**Post date:** [October 30, 2018, 9:22am UTC](https://community.influxdata.com/t/read-error-unexpected-eof-with-unit-root-test-as-kapacitor-udf/7216/1 "2018-10-30T09:22:35Z")

</div>

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
