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

HTTP request fails intermittently, but works via command line curl #643

Open
themightyoarfish opened this issue Feb 20, 2025 · 0 comments
Open

Comments

@themightyoarfish
Copy link

auto fwjson = http_client->get("api/v1/system/firmware", timeout_sec);

This line in the client sometimes fails for us with this error

  what():  CurlClient::execute_request failed for the url: [http://os-122422000616.local/api/v1/system/firmware] with the error message: Couldn't connect to server

When SensorHTTP::create() is invoked. Simply retrying a few times makes it go away. Meanwhile I can never reproduce this behaviour when just using curl on the command line in a loop

while true; do curl --request GET http://os-122422000616.local/api/v1/system/firmware && echo "result was $?"; done

(always successful).

This has happened with several different rev7 devices, and I'm not sure how to troubleshoot. The scanners work normally once connected.

Any advice on how to investigate?

I have not yes tried with current master, as it has introduced some install issues wrt to the version we're using, but the HTTP code is identical.

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

1 participant