Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: rest plugin return 500 /vpp/telemetry #1856

Open
ChenYahui2019 opened this issue Jul 6, 2022 · 2 comments
Open

BUG: rest plugin return 500 /vpp/telemetry #1856

ChenYahui2019 opened this issue Jul 6, 2022 · 2 comments

Comments

@ChenYahui2019
Copy link

ChenYahui2019 commented Jul 6, 2022

# 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
@chrismetz09
Copy link

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

#1854

@ChenYahui2019
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants