Skip to content
This repository has been archived by the owner on Jul 15, 2018. It is now read-only.

[tm-monitor] unable to query status endpoint #96

Closed
rcking opened this issue May 20, 2018 · 2 comments
Closed

[tm-monitor] unable to query status endpoint #96

rcking opened this issue May 20, 2018 · 2 comments

Comments

@rcking
Copy link

rcking commented May 20, 2018

As of the most recent tm-monitor release (deployed in Docker), I am unable to query the endpoint

//localhost:46670/status

This produces the following error:

[0m 2018/05/20 07:33:46 http: panic serving 172.20.0.1:37702: interface conversion: string is not error: missing method Error
[0m goroutine 106 [running]:
[0m net/http.(*conn).serve.func1(0xc420a4e1e0)
[0m 	/usr/local/go/src/net/http/server.go:1726 +0xd0
[0m panic(0x9a84c0, 0xc420050800)
[0m 	/usr/local/go/src/runtime/panic.go:502 +0x229
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/tendermint/rpc/lib/server.RecoverAndLogHandler.func1.1(0xc420b0f460, 0xbf94a0, 0xf56800, 0xbeb86716afc7f467, 0x185a873e7, 0xf38be0, 0xc420a56b00)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/tendermint/rpc/lib/server/http_server.go:122 +0x64f
[0m panic(0x96b4c0, 0xbef230)
[0m 	/usr/local/go/src/runtime/panic.go:502 +0x229
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino.checkUnsafe(0x94364f, 0xc, 0xbfe260, 0x964bc0, 0x1, 0x964bc0, 0xc42091bc30, 0x8e, 0x943663, 0xe, ...)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino/reflect.go:38 +0x7c
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino.(*Codec).parseStructInfo(0xc420098720, 0xbfe260, 0xa3ca00, 0xa3ca00, 0xc420a6a510, 0x4104d8)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino/codec.go:333 +0x489
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino.(*Codec).newTypeInfoUnregistered(0xc420098720, 0xbfe260, 0xa3ca00, 0xf577a0)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino/codec.go:395 +0x453
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino.(*Codec).getTypeInfo_wlock(0xc420098720, 0xbfe260, 0xa3ca00, 0x0, 0x0, 0x0)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino/codec.go:269 +0x1fa
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct(0xc420098720, 0xbf1260, 0xc420996690, 0xc4209a45a0, 0x9d1780, 0xc420b0f520, 0x199, 0x0, 0x0, 0x0, ...)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino/json-encode.go:316 +0x27e
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON(0xc420098720, 0xbf1260, 0xc420996690, 0xc4209a45a0, 0x9511e0, 0xc420b0f520, 0x16, 0x0, 0x0, 0x0, ...)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x73b
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON(0xc420098720, 0xbf1260, 0xc420996690, 0xc4209a45a0, 0x9511e0, 0xc420b0f520, 0x16, 0x0, 0x0, 0x0, ...)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0xd1
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino.(*Codec).MarshalJSON(0xc420098720, 0x9511e0, 0xc420b0f520, 0xc420a0b980, 0x4ab6a4, 0x9511e0, 0xc420b0f520, 0x16)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/go-amino/amino.go:296 +0x166
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/tendermint/rpc/lib/types.NewRPCSuccessResponse(0xc420098720, 0x0, 0x0, 0x9511e0, 0xc420b0f520, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/tendermint/rpc/lib/types/types.go:100 +0x11e
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/tendermint/rpc/lib/server.makeHTTPHandler.func2(0xbf8160, 0xc420b0f460, 0xc420a56b00)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/tendermint/rpc/lib/server/handlers.go:263 +0x4a8
[0m net/http.HandlerFunc.ServeHTTP(0xc420460f00, 0xbf8160, 0xc420b0f460, 0xc420a56b00)
[0m 	/usr/local/go/src/net/http/server.go:1947 +0x44
[0m net/http.(*ServeMux).ServeHTTP(0xc420460ea0, 0xbf8160, 0xc420b0f460, 0xc420a56b00)
[0m 	/usr/local/go/src/net/http/server.go:2337 +0x130
[0m github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/tendermint/rpc/lib/server.RecoverAndLogHandler.func1(0xbf8820, 0xc420b5a000, 0xc420a56b00)
[0m 	/go/src/github.com/tendermint/tools/tm-monitor/vendor/github.com/tendermint/tendermint/rpc/lib/server/http_server.go:138 +0x3e3
[0m net/http.HandlerFunc.ServeHTTP(0xc4209afb30, 0xbf8820, 0xc420b5a000, 0xc420a56b00)
[0m 	/usr/local/go/src/net/http/server.go:1947 +0x44
[0m net/http.serverHandler.ServeHTTP(0xc4209c6750, 0xbf8820, 0xc420b5a000, 0xc420a56b00)
[0m 	/usr/local/go/src/net/http/server.go:2694 +0xbc
[0m net/http.(*conn).serve(0xc420a4e1e0, 0xbf8f20, 0xc42046cc40)
[0m 	/usr/local/go/src/net/http/server.go:1830 +0x651
[0m created by net/http.(*Server).Serve
[0m 	/usr/local/go/src/net/http/server.go:2795 +0x27b

This error is the same whether I pull the latest tendermint/monitor docker image, or whether I build the docker image from source.

Is this a version incompatibility issue? The endpoint worked in a previous version of the tm-monitor (but that version is not usable because it always returns a zero block height)...

Thanks!

@rcking
Copy link
Author

rcking commented Jun 2, 2018

Thanks to kidinamoto01!

I deployed the fixes noted above locally and the endpoint

//localhost:46670/status

now works correctly. However, other endpoints such as

http://localhost:46670/status/network
http://localhost:46670/status/node?name=

result in the same error, that is

panic serving 172.20.0.1:37702: interface conversion: string is not error: missing method Error

I suspect that the conversion to go-amino has broken several rpc interfaces...

@melekes
Copy link
Contributor

melekes commented Jun 28, 2018

Merged to master. Thank you!

@melekes melekes closed this as completed Jun 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants