influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

panic:runtime error: invalid memory address or nil pointer dereference with prometheus

Open Seb0042 opened this issue 7 years ago • 5 comments

Hi, I have two instances of prometheus and two of influxdb. On one everything is fine on the other data are written but I have this error message on the logs. I don't know what request is.

[05/Apr/2019:15:17:57 +0200] "POST /api/v1/prom/read?db=prometheus HTTP/1.1" 200 0 "-" "Prometheus/2.8.0" 3a595f67-57a5-11e9-9f31-8f412a7ce17b 138 [panic:runtime error: invalid memory address or nil pointer dereference] goroutine 101792 [running]: Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: runtime/debug.Stack(0xc006dbcb00, 0xc0062cbd00, 0xbf21f34149ef4cb5) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /usr/local/go/src/runtime/debug/stack.go:24 +0xa7 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: github.com/influxdata/influxdb/services/httpd.(*Handler).recovery.func1.1(0xc006dbcb00, 0xc0062cbd00, 0xbf21f34149ef4cb5, 0x49ade1b19c44, 0x1d89300, 0xc000287100, 0x1394cc0, 0xc00bfd9180) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1760 +0xcd Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: panic(0x108d520, 0x1d707c0) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /usr/local/go/src/runtime/panic.go:513 +0x1b9 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: github.com/influxdata/influxdb/services/httpd.(*Handler).servePromRead(0xc000287100, 0x7f328ede4b60, 0xc006dbcb20, 0xc0062cbd00, 0x0, 0x0) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1066 +0x270 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: github.com/influxdata/influxdb/services/httpd.(*Handler).servePromRead-fm(0x7f328ede4b60, 0xc006dbcb20, 0xc0062cbd00, 0x0, 0x0) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /go/src/github.com/influxdata/influxdb/services/httpd/handler.go:184 +0x5c Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: github.com/influxdata/influxdb/services/httpd.authenticate.func1(0x7f328ede4b60, 0xc006dbcb20, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1557 +0x788 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: net/http.HandlerFunc.ServeHTTP(0xc0002756c0, 0x7f328ede4b60, 0xc006dbcb20, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /usr/local/go/src/net/http/server.go:1964 +0x44 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: github.com/influxdata/influxdb/services/httpd.(*Handler).responseWriter.func1(0x1390540, 0xc006dbcb00, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1737 +0xab Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: net/http.HandlerFunc.ServeHTTP(0xc0002756e0, 0x1390540, 0xc006dbcb00, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /usr/local/go/src/net/http/server.go:1964 +0x44 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: github.com/influxdata/influxdb/services/httpd.gzipFilter.func1(0x1390540, 0xc006dbcb00, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /go/src/github.com/influxdata/influxdb/services/httpd/gzip.go:23 +0x29d Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: net/http.HandlerFunc.ServeHTTP(0xc000275700, 0x1390540, 0xc006dbcb00, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /usr/local/go/src/net/http/server.go:1964 +0x44 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: github.com/influxdata/influxdb/services/httpd.cors.func1(0x1390540, 0xc006dbcb00, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1679 +0xf3 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: net/http.HandlerFunc.ServeHTTP(0xc000275720, 0x1390540, 0xc006dbcb00, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /usr/local/go/src/net/http/server.go:1964 +0x44 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: github.com/influxdata/influxdb/services/httpd.requestID.func1(0x1390540, 0xc006dbcb00, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1710 +0x179 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: net/http.HandlerFunc.ServeHTTP(0xc000275740, 0x1390540, 0xc006dbcb00, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /usr/local/go/src/net/http/server.go:1964 +0x44 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: github.com/influxdata/influxdb/services/httpd.(*Handler).recovery.func1(0x1394cc0, 0xc00bfd9180, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1774 +0x147 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: net/http.HandlerFunc.ServeHTTP(0xc000275760, 0x1394cc0, 0xc00bfd9180, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /usr/local/go/src/net/http/server.go:1964 +0x44 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: github.com/influxdata/influxdb/vendor/github.com/bmizerany/pat.(*PatternServeMux).ServeHTTP(0xc000275240, 0x1394cc0, 0xc00bfd9180, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /go/src/github.com/influxdata/influxdb/vendor/github.com/bmizerany/pat/mux.go:117 +0x155 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: github.com/influxdata/influxdb/services/httpd.(*Handler).ServeHTTP(0xc000287100, 0x1394cc0, 0xc00bfd9180, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /go/src/github.com/influxdata/influxdb/services/httpd/handler.go:382 +0x247 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: net/http.serverHandler.ServeHTTP(0xc0003ea000, 0x1394cc0, 0xc00bfd9180, 0xc0062cbd00) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /usr/local/go/src/net/http/server.go:2741 +0xab Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: net/http.(*conn).serve(0xc0011fa320, 0x1396600, 0xc0051e2a80) Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /usr/local/go/src/net/http/server.go:1847 +0x646 Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: created by net/http.(*Server).Serve Apr 5 15:17:57 node01.prod.appsecu.vault.m1.p.fti.net influxd[12832]: /usr/local/go/src/net/http/server.go:2851 +0x2f5

Seb0042 avatar Apr 05 '19 13:04 Seb0042

Version: 1.7.4 Prometheus: 2.8.0 Centos: 7.6.1810 Kernel: 3.10.0-957.10.1.el7.x86_64

Seb0042 avatar Apr 05 '19 13:04 Seb0042

Hi I upgraded to 1.7.5 and now it works.

Seb0042 avatar Apr 08 '19 14:04 Seb0042

Version: 1.7.6 Prometheus: 2.10.0

Jun  5 11:40:25 influxdb influxdb: [httpd] - prometheus [05/Jun/2019:11:40:25 +0300] "POST /api/v1/prom/read?db=prometheus&p=%5BREDACTED%5D&u=prometheus HTTP/1.1" 200 0
 "-" "Prometheus/2.10.0" 909f2e77-876d-11e9-ab9f-00155d25ad1b 185 [panic:runtime error: invalid memory address or nil pointer dereference] goroutine 782139 [running]:
Jun  5 11:40:25 influxdb influxdb: runtime/debug.Stack(0xc04444e120, 0xc037c38900, 0xbf35fdde75eca231)
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/services/httpd.(*Handler).recovery.func1.1(0xc04444e120, 0xc037c38900, 0xbf35fdde75eca231, 0x587d7c1988, 0x21ab3e0, 0xc000111000, 
0x15bf420, 0xc044450000)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1786 +0xcd
Jun  5 11:40:25 influxdb influxdb: panic(0x1116ca0, 0x2000040)
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/runtime/panic.go:513 +0x1b9
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/services/httpd.(*Handler).servePromRead(0xc000111000, 0x7fb30c9d4b30, 0xc04444e160, 0xc037c38900, 0x15c8900, 0xc000bfe7b0)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1097 +0x30d
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/services/httpd.(*Handler).servePromRead-fm(0x7fb30c9d4b30, 0xc04444e160, 0xc037c38900, 0x15c8900, 0xc000bfe7b0)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/services/httpd/handler.go:190 +0x5c
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/services/httpd.authenticate.func1(0x7fb30c9d4b30, 0xc04444e160, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1666 +0x97
Jun  5 11:40:25 influxdb influxdb: net/http.HandlerFunc.ServeHTTP(0xc0009e1240, 0x7fb30c9d4b30, 0xc04444e160, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/net/http/server.go:1964 +0x44
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/services/httpd.(*Handler).responseWriter.func1(0x15ba6a0, 0xc04444e140, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1763 +0xab
Jun  5 11:40:25 influxdb influxdb: net/http.HandlerFunc.ServeHTTP(0xc0009e1260, 0x15ba6a0, 0xc04444e140, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/net/http/server.go:1964 +0x44
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/services/httpd.gzipFilter.func1(0x15ba6a0, 0xc04444e140, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/services/httpd/gzip.go:23 +0x29d
Jun  5 11:40:25 influxdb influxdb: net/http.HandlerFunc.ServeHTTP(0xc0009e1280, 0x15ba6a0, 0xc04444e140, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/net/http/server.go:1964 +0x44
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/services/httpd.cors.func1(0x15ba6a0, 0xc04444e140, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1705 +0xf3
Jun  5 11:40:25 influxdb influxdb: net/http.HandlerFunc.ServeHTTP(0xc0009e12a0, 0x15ba6a0, 0xc04444e140, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/net/http/server.go:1964 +0x44
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/services/httpd.requestID.func1(0x15ba6a0, 0xc04444e140, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1736 +0x179
Jun  5 11:40:25 influxdb influxdb: net/http.HandlerFunc.ServeHTTP(0xc0009e12c0, 0x15ba6a0, 0xc04444e140, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/net/http/server.go:1964 +0x44
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/services/httpd.(*Handler).logging.func1(0x15ba6a0, 0xc04444e120, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1744 +0xdc
Jun  5 11:40:25 influxdb influxdb: net/http.HandlerFunc.ServeHTTP(0xc0009e12e0, 0x15ba6a0, 0xc04444e120, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/net/http/server.go:1964 +0x44
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/services/httpd.(*Handler).recovery.func1(0x15bf420, 0xc044450000, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/services/httpd/handler.go:1800 +0x147
Jun  5 11:40:25 influxdb influxdb: net/http.HandlerFunc.ServeHTTP(0xc0009e1300, 0x15bf420, 0xc044450000, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/net/http/server.go:1964 +0x44
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/vendor/github.com/bmizerany/pat.(*PatternServeMux).ServeHTTP(0xc0009e0d00, 0x15bf420, 0xc044450000, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/vendor/github.com/bmizerany/pat/mux.go:117 +0x155
Jun  5 11:40:25 influxdb influxdb: github.com/influxdata/influxdb/services/httpd.(*Handler).ServeHTTP(0xc000111000, 0x15bf420, 0xc044450000, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/go/src/github.com/influxdata/influxdb/services/httpd/handler.go:392 +0x247
Jun  5 11:40:25 influxdb influxdb: net/http.serverHandler.ServeHTTP(0xc03be2aea0, 0x15bf420, 0xc044450000, 0xc037c38900)
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/net/http/server.go:2741 +0xab
Jun  5 11:40:25 influxdb influxdb: net/http.(*conn).serve(0xc06f646500, 0x15c0f60, 0xc023148880)
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/net/http/server.go:1847 +0x646
Jun  5 11:40:25 influxdb influxdb: created by net/http.(*Server).Serve
Jun  5 11:40:25 influxdb influxdb: #011/usr/local/go/src/net/http/server.go:2851 +0x2f5

Please, reopen

luciferinlove avatar Jun 05 '19 08:06 luciferinlove

influxdb 1.7.7 prometheus 2.11.1

same problem

shidoh avatar Jul 18 '19 12:07 shidoh

See #14261

Christoph-W avatar Jul 31 '19 07:07 Christoph-W