[0.9.3-rc2] Read failed when new retention policy got created other than default
Hi ,
We were modifying the retention policy when influxdb was busy writing data. When a new retention policy was created other than default with 8h , got the below logs on Influx.
Then onwards influx did not retrieve any data from any of the measurements. It returned 0 records. Before modifying the retention policy we were able to read the data from influx
is it not possible to modify the retention policy whenever its required?.
Influx DB used in 0.9.3-rc2
sh[33226]: 2015/08/25 21:36:13 http: panic serving 10.6.30.1:47879: runtime error: index out of range
Aug 25 21:36:13 host sh[33226]: goroutine 401464 [running]:
Aug 25 21:36:13 host sh[33226]: net/http.func·011()
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1130 +0xbb
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.(*Handler).serveQuery(0xc2080103f0, 0x7ff67e68e608, 0xc20cf491c0, 0xc259e5c820, 0x0)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:289 +0x16c6
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.*Handler.(github.com/influxdb/influxdb/services/httpd.serveQuery)·fm(0x7ff67e68e608, 0xc20cf491c0, 0xc259e5c820, 0x0)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:95 +0x4f
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·001(0x7ff67e68e608, 0xc20cf491c0, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:621 +0x78
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc2081155e0, 0x7ff67e68e608, 0xc20cf491c0, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·002(0x7ff67e68e530, 0xc20cf49120, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:679 +0x288
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc208117450, 0x7ff67e68e530, 0xc20cf49120, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·003(0x7ff67e68e530, 0xc20cf49120, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:688 +0xba
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc208115600, 0x7ff67e68e530, 0xc20cf49120, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·004(0x7ff67e68e530, 0xc20cf49120, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:721 +0x31a
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc208117480, 0x7ff67e68e530, 0xc20cf49120, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·005(0x7ff67e68e530, 0xc20cf49120, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:731 +0x179
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc2081174a0, 0x7ff67e68e530, 0xc20cf49120, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·006(0x7ff67e68e530, 0xc20cf49100, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:739 +0x123
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc208115620, 0x7ff67e68e530, 0xc20cf49100, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·007(0x7ff67e68e4f8, 0xc212772640, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:749 +0x12c
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc208115640, 0x7ff67e68e4f8, 0xc212772640, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/bmizerany/pat.(*PatternServeMux).ServeHTTP(0xc208036ec0, 0x7ff67e68e4f8, 0xc212772640, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/bmizerany/pat/mux.go:109 +0x21c
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.(*Handler).ServeHTTP(0xc2080103f0, 0x7ff67e68e4f8, 0xc212772640, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:167 +0x256
Aug 25 21:36:13 host sh[33226]: net/http.serverHandler.ServeHTTP(0xc208075620, 0x7ff67e68e4f8, 0xc212772640, 0xc259e5c820)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1703 +0x19a
Aug 25 21:36:13 host sh[33226]: net/http.(*conn).serve(0xc231551b80)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1204 +0xb57
Aug 25 21:36:13 host sh[33226]: created by net/http.(*Server).Serve
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1751 +0x35e
Aug 25 21:36:13 host sh[33226]: 2015/08/25 21:36:13 http: panic serving 10.6.30.1:47880: runtime error: index out of range
Aug 25 21:36:13 host sh[33226]: goroutine 401341 [running]:
Aug 25 21:36:13 host sh[33226]: net/http.func·011()
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1130 +0xbb
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.(*Handler).serveQuery(0xc2080103f0, 0x7ff67e68e608, 0xc20cf49f40, 0xc25bc29d40, 0x0)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:289 +0x16c6
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.*Handler.(github.com/influxdb/influxdb/services/httpd.serveQuery)·fm(0x7ff67e68e608, 0xc20cf49f40, 0xc25bc29d40, 0x0)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:95 +0x4f
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·001(0x7ff67e68e608, 0xc20cf49f40, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:621 +0x78
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc2081155e0, 0x7ff67e68e608, 0xc20cf49f40, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·002(0x7ff67e68e530, 0xc20cf49d20, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:679 +0x288
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc208117450, 0x7ff67e68e530, 0xc20cf49d20, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·003(0x7ff67e68e530, 0xc20cf49d20, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:688 +0xba
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc208115600, 0x7ff67e68e530, 0xc20cf49d20, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·004(0x7ff67e68e530, 0xc20cf49d20, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:721 +0x31a
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc208117480, 0x7ff67e68e530, 0xc20cf49d20, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·005(0x7ff67e68e530, 0xc20cf49d20, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:731 +0x179
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc2081174a0, 0x7ff67e68e530, 0xc20cf49d20, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·006(0x7ff67e68e530, 0xc20cf49d00, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:739 +0x123
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc208115620, 0x7ff67e68e530, 0xc20cf49d00, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.func·007(0x7ff67e68e4f8, 0xc212772aa0, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:749 +0x12c
Aug 25 21:36:13 host sh[33226]: net/http.HandlerFunc.ServeHTTP(0xc208115640, 0x7ff67e68e4f8, 0xc212772aa0, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1265 +0x41
Aug 25 21:36:13 host sh[33226]: github.com/bmizerany/pat.(*PatternServeMux).ServeHTTP(0xc208036ec0, 0x7ff67e68e4f8, 0xc212772aa0, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/bmizerany/pat/mux.go:109 +0x21c
Aug 25 21:36:13 host sh[33226]: github.com/influxdb/influxdb/services/httpd.(*Handler).ServeHTTP(0xc2080103f0, 0x7ff67e68e4f8, 0xc212772aa0, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/go/src/github.com/influxdb/influxdb/services/httpd/handler.go:167 +0x256
Aug 25 21:36:13 host sh[33226]: net/http.serverHandler.ServeHTTP(0xc208075620, 0x7ff67e68e4f8, 0xc212772aa0, 0xc25bc29d40)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1703 +0x19a
Aug 25 21:36:13 host sh[33226]: net/http.(*conn).serve(0xc21424e640)
Aug 25 21:36:13 host sh[33226]: /root/.gvm/gos/go1.4.2/src/net/http/server.go:1204 +0xb57
Aug 25 21:36:13 host sh[33226]: created by net/http.(*Server).Serve
@chaithrar please paste in the retention policy queries you made, as well as their output.
Then onwards influx did not retrieve any data from any of the measurements. It returned 0 records. Before modifying the retention policy we were able to read the data from influx
The logs show that the influxd process panicked and died, meaning it needs to be restarted. Are you saying that after restarting the process you could not query any measurements?
Yes after this when we did query on any measurements , influx returned with "Success(No results to display)"
@chaithrar please paste in the results of SHOW RETENTION POLICIES ON <dbname>
@chaithrar can you update this ticket with the results of the query requested? SHOW RETENTION POLICIES ON <dbname>?
Yes after this when we did query on any measurements , influx returned with "Success(No results to display)"
Please use the CLI for queries if possible. Are you certain you were querying the correct retention policy for the data? Can you paste in the exact query that is showing no data?
I too faced the same issue. Here is the error and retention policy ?
show retention policies on metrics; name duration replicaN default default 0 1 false metricspolicy 336h0m0s 1 true
panic: runtime error: slice bounds out of range
goroutine 8293249 [running]: github.com/influxdb/influxdb/tsdb.(FieldCodec).DecodeByID(0xc20df04a50, 0xc20ae4ba09, 0x7f8b6b3f61d4, 0x30, 0x7fffffed, 0x0, 0x0, 0x0, 0x0) /root/go/src/github.com/influxdb/influxdb/tsdb/shard.go:1032 +0x82d github.com/influxdb/influxdb/tsdb.(FieldCodec).DecodeByName(0xc20df04a50, 0xc209675049, 0x5, 0x7f8b6b3f61c2, 0x42, 0x7fffffff, 0x0, 0x0, 0x0, 0x0) /root/go/src/github.com/influxdb/influxdb/tsdb/shard.go:1051 +0x142 github.com/influxdb/influxdb/tsdb.(tagSetCursor).Next(0xc209b9d1f0, 0x1402ef429776b800, 0x1402ef508fbe1000, 0xc2095dd778, 0x1, 0x1, 0xeceb08, 0x0, 0x0, 0x1402ef4d11ac3a00, ...) /root/go/src/github.com/influxdb/influxdb/tsdb/mapper.go:581 +0x4fd github.com/influxdb/influxdb/tsdb.func·004(0xc2095dd7f8, 0x0, 0x0) /root/go/src/github.com/influxdb/influxdb/tsdb/mapper.go:438 +0x183 github.com/influxdb/influxdb/tsdb.(aggTagSetCursor).Next(0xc20a639768, 0x8fc9e0, 0x0, 0x0) /root/go/src/github.com/influxdb/influxdb/tsdb/mapper.go:496 +0x3a github.com/influxdb/influxdb/influxql.MapMean(0x7fa2a8c8bf08, 0xc20a639768, 0x0, 0x0) /root/go/src/github.com/influxdb/influxdb/influxql/functions.go:486 +0x14e github.com/influxdb/influxdb/tsdb.(AggMapper).NextChunk(0xc20813c1c0, 0x0, 0x0, 0x0, 0x0) /root/go/src/github.com/influxdb/influxdb/tsdb/mapper.go:448 +0x8a6 github.com/influxdb/influxdb/tsdb.(StatefulMapper).NextChunk(0xc208555fa0, 0xc20ea888d0, 0x0, 0x0) /root/go/src/github.com/influxdb/influxdb/tsdb/engine.go:54 +0x5c github.com/influxdb/influxdb/tsdb.(AggregateExecutor).execute(0xc20cee64e0, 0xc20a7d36e0) /root/go/src/github.com/influxdb/influxdb/tsdb/engine.go:413 +0x20e0 created by github.com/influxdb/influxdb/tsdb.(AggregateExecutor).Execute
This issue has been fixed in 0.9.3 later.
https://influxdb.com/download/index.html
The stack trace immediately above has, that is.