Prophet Forecasting UDF - Unable to write response to InfluxDB

kapacitor

#23

Hi @dpayne

we have use “atroncy” prohet.py
we have remove each time the udf_prohet.sock file if existing
the user used is the same as kapacitor process
??

again what we see is that the prophet.py script is lauched two times , hence a conflict on the socket file : one at the "service " start ( ```
systemctl start prophet-udf) and then one at the kapacitor service start ( from the kapacitor.conf)

Again , I have the feeling that this is not normal

said in other words : if we use the systemcl service for lauching the prohet(_socket).py script, then could it be that we have to REMOVE from the kapacitor.conf file te reference to the prophet.py script ?
thanks in advance
Philippe


#24

Hi @dpayne
Thanks for help.

As you say for @pdl86, I remove any socket files in /tmp… but I have this error: error" service=task_store err=“myfbprophet2: read error: proto: can’t skip unknown wire type 6 for agent.Response” task=fbprophet-atroncy-temp

And when I show the log I have the forecast values :
ts=2018-09-11T13:51:04.576+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=fbprophet-atroncy-temp node=myfbprophet2 text=“5 2018-09-11 11:56:00 … 1211.216024”
ts=2018-09-11T13:51:04.576+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=fbprophet-atroncy-temp node=myfbprophet2 text=“6 2018-09-11 11:57:00 … 1211.238898”
ts=2018-09-11T13:51:04.576+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=fbprophet-atroncy-temp node=myfbprophet2 text=“7 2018-09-11 11:58:00 … 1211.261784”
ts=2018-09-11T13:51:04.576+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=fbprophet-atroncy-temp node=myfbprophet2 text=“8 2018-09-11 11:59:00 … 1211.284684”

ts=2018-09-11T13:51:04.600+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=fbprophet-atroncy-temp node=myfbprophet2 text=“INFO:root:{‘yhat’: 1212.2844465557, ‘yhat_lower’: 1202.0588667123775, ‘yhat_upper’: 1222.3605993409883}”
ts=2018-09-11T13:51:04.600+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=fbprophet-atroncy-temp node=myfbprophet2 text=“INFO:root:{‘yhat’: 1212.3065496127754, ‘yhat_lower’: 1202.6517603521183, ‘yhat_upper’: 1222.6249815382316}”

I dont’ konw what mean this error : ts=2018-09-11T13:52:00.039+02:00 lvl=error msg=“task finished with error” service=task_store err=“myfbprophet2: read error: proto: can’t skip unknown wire type 6 for agent.Response” task=fbprophet-atroncy-temp
And How I can solve this ?

Thanks.

G Moussa


#25

Hi @dpayne @nathaniel

I try to run kapacitor UDF as sarimax model but i get this error after one query and the mesasurment doesn’t display on my database but I have the forecast value when I look the log

ts=2018-10-10T10:45:06.276+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 10:45:06,276 INFO:root: Starting Agent”
ts=2018-10-10T10:45:10.054+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:45:10.02820637+02:00 method=POST uri=/write?consistency=&db=_internal&precision=ns&rp=monitor protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=cba87cd4-cc68-11e8-8049-000000000000 duration=26.672267ms
ts=2018-10-10T10:45:10.303+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:45:10.30317943+02:00 method=POST uri=/write?consistency=&db=telegraf&precision=ns&rp=autogen protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=cbd271f9-cc68-11e8-804a-000000000000 duration=722.474µs
ts=2018-10-10T10:45:20.097+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:45:20.054581439+02:00 method=POST uri=/write?consistency=&db=_internal&precision=ns&rp=monitor protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=d1a2641d-cc68-11e8-804b-000000000000 duration=43.147544ms
ts=2018-10-10T10:45:20.303+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:45:20.303221763+02:00 method=POST uri=/write?consistency=&db=telegraf&precision=ns&rp=autogen protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=d1c854a0-cc68-11e8-804c-000000000000 duration=731.569µs
ts=2018-10-10T10:45:30.079+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:45:30.032903754+02:00 method=POST uri=/write?consistency=&db=_internal&precision=ns&rp=monitor protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=d794f653-cc68-11e8-804d-000000000000 duration=46.723668ms
ts=2018-10-10T10:45:30.304+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:45:30.303489883+02:00 method=POST uri=/write?consistency=&db=telegraf&precision=ns&rp=autogen protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=d7be4019-cc68-11e8-804e-000000000000 duration=754.5µs
ts=2018-10-10T10:45:39.550+02:00 lvl=debug msg=“linking subscription for cluster” service=influxdb cluster=localhost cluster=localhost
ts=2018-10-10T10:45:40.088+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:45:40.050050565+02:00 method=POST uri=/write?consistency=&db=_internal&precision=ns&rp=monitor protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=dd8d7520-cc68-11e8-804f-000000000000 duration=38.045208ms
ts=2018-10-10T10:45:40.304+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:45:40.303439195+02:00 method=POST uri=/write?consistency=&db=telegraf&precision=ns&rp=autogen protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=ddb41f20-cc68-11e8-8050-000000000000 duration=785.681µs
ts=2018-10-10T10:45:50.067+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:45:50.026203898+02:00 method=POST uri=/write?consistency=&db=_internal&precision=ns&rp=monitor protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=e37fb29c-cc68-11e8-8051-000000000000 duration=40.865767ms
ts=2018-10-10T10:45:50.303+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:45:50.303220581+02:00 method=POST uri=/write?consistency=&db=telegraf&precision=ns&rp=autogen protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=e3a9f794-cc68-11e8-8052-000000000000 duration=730.981µs
ts=2018-10-10T10:46:00.000+02:00 lvl=debug msg=“starting next batch query” service=kapacitor task_master=main task=sarimax_sinus node=query1 query=“SELECT Sinus FROM “test_arima-sinus”.autogen.value WHERE time >= ‘2018-10-09T12:46:00Z’ AND time < ‘2018-10-10T08:46:00Z’”
ts=2018-10-10T10:46:00.108+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 10:46:00,108 INFO:root: SARIMAX "
ts=2018-10-10T10:46:00.108+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=
ts=2018-10-10T10:46:00.110+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 10:46:00,110 INFO:root: size of input: 240”
ts=2018-10-10T10:46:00.111+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:46:00.055918394+02:00 method=POST uri=/write?consistency=&db=_internal&precision=ns&rp=monitor protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=e97a1c56-cc68-11e8-8053-000000000000 duration=55.84566ms
ts=2018-10-10T10:46:00.302+02:00 lvl=info msg=“http request” service=http host=::1 username=- start=2018-10-10T10:46:00.302508819+02:00 method=POST uri=/write?consistency=&db=telegraf&precision=ns&rp=autogen protocol=HTTP/1.1 status=204 referer=- user-agent=InfluxDBClient request-id=e99fbcc5-cc68-11e8-8054-000000000000 duration=448.928µs
ts=2018-10-10T10:46:01.345+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 10:46:01,345 DEBUG:root: ORDER (1, 1, 0)”
ts=2018-10-10T10:46:02.272+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 10:46:02,271 DEBUG:root: SEASONAL (1, 0, 0, 4)”
ts=2018-10-10T10:46:02.322+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 10:46:02,322 DEBUG:root: MODEL <statsmodels.tsa.statespace.sarimax.SARIMAXResultsWrapper object at 0x7fb679e4bad0>”
ts=2018-10-10T10:46:02.342+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 10:46:02,333 DEBUG:root: 2018-10-10 08:50:00 2.863662”
ts=2018-10-10T10:46:02.342+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 08:55:00 2.575143”
ts=2018-10-10T10:46:02.342+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 09:00:00 2.326858”
ts=2018-10-10T10:46:02.342+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 09:05:00 2.111898”
ts=2018-10-10T10:46:02.342+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 09:10:00 1.913609”
ts=2018-10-10T10:46:02.342+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“Freq: 5T, dtype: float64”
ts=2018-10-10T10:46:02.343+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 10:46:02,342 DEBUG:root: forecast 2018-10-10 08:50:00 2.863662”
ts=2018-10-10T10:46:02.343+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 08:55:00 2.575143”
ts=2018-10-10T10:46:02.343+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 09:00:00 2.326858”
ts=2018-10-10T10:46:02.343+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 09:05:00 2.111898”
ts=2018-10-10T10:46:02.343+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 09:10:00 1.913609”
ts=2018-10-10T10:46:02.343+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“Freq: 5T, dtype: float64”
ts=2018-10-10T10:46:02.343+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=“2018-10-10 10:46:02,343 DEBUG:root: size of forecast 5”
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=” This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
ts=2018-10-10T10:46:02.425+02:00 lvl=info msg=“UDF log” service=kapacitor task_master=main task=sarimax_sinus node=sarimax2 text=" This problem is unconstrained."
I don’t know if someaone can help me
Thanks