ligato / vpp-agent

⚡️ Control plane management agent for FD.io's VPP
https://docs.ligato.io/
Apache License 2.0
247 stars 127 forks source link

restful-api got configuration error. #1879

Closed Chise1 closed 1 year ago

Chise1 commented 1 year ago

I started the vpp container environment according to the tutorial(url:https://docs.ligato.io/en/latest/user-guide/quickstart/#52-rest-api).

When I follow the tutorial, get configruation gets an error:

2022/10/18 07:01:12 http: panic serving 172.17.0.1:37614: reflect: call of reflect.Value.Elem on slice Value
goroutine 337 [running]:
net/http.(*conn).serve.func1()
        net/http/server.go:1802 +0xb9
panic({0x17d2480, 0xc000dad5c0})
        runtime/panic.go:1047 +0x266
reflect.Value.Elem({0x1732e40, 0xc000dad590, 0x0})
        reflect/value.go:1191 +0x15a
go.ligato.io/vpp-agent/v3/pkg/util.PlaceProtos(0xc000dfb890, {0xc000dfb890, 0x1, 0xc0000c6340})
        go.ligato.io/vpp-agent/v3/pkg/util/proto.go:57 +0x1f9
go.ligato.io/vpp-agent/v3/client.(*client).GetFilteredConfig(0xc000432080, {{0x0, 0x1, 0xc0014faad0}, 0x0}, {0xc000dfb890, 0x1, 0x1})
        go.ligato.io/vpp-agent/v3/client/local_client.go:106 +0x265
go.ligato.io/vpp-agent/v3/client.(*client).GetConfig(0xc0008c8200, {0xc0014faad0, 0x40, 0x7f74ee848f18})
        go.ligato.io/vpp-agent/v3/client/local_client.go:112 +0x65
go.ligato.io/vpp-agent/v3/plugins/restapi.(*Plugin).configurationGetHandler.func1({0x1dcc5f0, 0xc000147180}, 0xc000e7a780)
        go.ligato.io/vpp-agent/v3/plugins/restapi/handlers.go:764 +0xf1
net/http.HandlerFunc.ServeHTTP(0xc00058a300, {0x1dcc5f0, 0xc000147180}, 0xc000dfb9f8)
        net/http/server.go:2047 +0x2f
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0003c2180, {0x1dcc5f0, 0xc000147180}, 0xc000d65d00)
        github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1cf
net/http.serverHandler.ServeHTTP({0xc000b650b0}, {0x1dcc5f0, 0xc000147180}, 0xc000d65d00)
        net/http/server.go:2879 +0x43b
net/http.(*conn).serve(0xc0009ea5a0, {0x1dd8430, 0xc0000c5b00})
        net/http/server.go:1930 +0xb08
created by net/http.(*Server).Serve
        net/http/server.go:3034 +0x4e8

How can I fix it?

chrismetz09 commented 1 year ago

Try localhost:9191 for the REST calls.

Chise1 commented 1 year ago

Thank you.

Chise1 commented 1 year ago

I tried that. Same mistake

pemoticak commented 1 year ago

Hi @Chise1! Thanks for the bug report. This should be fixed in 0b64362c4fc4d1a3c1e1b02d2e3aab981e16b70b. Can you please try it out and let us know if it helped with the issue?