vpp-agent icon indicating copy to clipboard operation
vpp-agent copied to clipboard

BUG: rest plugin return 500 /vpp/telemetry

Open ChenYahui2019 opened this issue 2 years ago • 2 comments

# curl -X GET localhost:9191/vpp/telemetry
"500 Internal server error: sending command failed: VPPApiError: Unspecified Error (-1)\n"

This is caused by show memory in function telemetryHandler. Try agentctl as below:

# agentctl vpp cli show memory
vpp# show memory

ERROR: HTTP POST request failed: Error response from daemon: [500] "500 Internal server error: sending request failed: VPPApiError: Unspecified Error (-1)\n"

I try to use this command in VPP:

vpp# show memory
show memory: Need one of api-segment, stats-segment, main-heap or numa-heaps
vpp# show memory api-segment
API segment
total: 16.00M, used: 1.50M, free: 14.49M, trimmable: 14.49M
    free chunks 2 free fastbin blks 0
    max total allocated 16.00M

vpp and vpp-agent version:

# agentctl status
AGENT
    App name:    vpp-agent
    Version:     v3.4.0-alpha-8-gc360094-dirty

    State:       OK
    Started:     2022-07-05 16:42:49 +0800 CST (22h36m58s ago)
    Last change: 22h36m52s
    Last update: 2s

    Go version:  go1.17.7
    OS/Arch:     linux/amd64

# agentctl vpp cli show version
vpp# show version
vpp v20.09.0-65~g2f4951e built by root on localhost at 2022-07-05T03:55:38

ChenYahui2019 avatar Jul 06 '22 07:07 ChenYahui2019

Wondering if this PR explains the 500 error you are receiving.

https://github.com/ligato/vpp-agent/pull/1854

chrismetz09 avatar Jul 06 '22 21:07 chrismetz09

Wondering if this PR explains the 500 error you are receiving.

#1854

I think plugins/restapi/handlers.go should be modified, but that PR don't modify this file.

ChenYahui2019 avatar Jul 07 '22 03:07 ChenYahui2019