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

[question] reqwest requires curl to work?? #2536

Open
aaron-tillekeratne opened this issue Jan 31, 2025 · 2 comments
Open

[question] reqwest requires curl to work?? #2536

aaron-tillekeratne opened this issue Jan 31, 2025 · 2 comments

Comments

@aaron-tillekeratne
Copy link

aaron-tillekeratne commented Jan 31, 2025

Hey reqwest team,

I'm building a debian:bookworm-slim image for a rust grpc api. Part of the server side of this API makes a http call to another service. But it looks like it fails with a rather unhelpful error message error sending request for url .

Doing some testing I noticed that it works fine if I install curl on the image.

Am I missing something here or is this a requirement for reqwest to make http requests?

Cheers,
A

Snippet of build

FROM debian:bookworm-slim AS release-base 

RUN apt-get update && apt-get upgrade -y  && apt-get install openssl -y
# binary copy and app stuff later

@seanmonstar
Copy link
Owner

For the error, you can use the {:?} format, or use an error reporter, to be able to print the source chain, which will explain more what happened.

As for why it suddenly works with curl, perhaps the curl package includes a system dependency on a TLS package that reqwest also wants? Or that enables more features in one? Hard to know without the full error message.

@itsibitzi
Copy link

itsibitzi commented Feb 6, 2025

I ran into this locally on docker with ubuntu 22.04.

This snippet

    Client::builder()
        .pool_max_idle_per_host(0)
        .build()
        .expect("Build reqwest client")

Would panic with:

thread 'main' panicked at common/src/clients.rs:17:10:
Build reqwest client: reqwest::Error { kind: Builder, source: Normal(ErrorStack([])) }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Which wasn't a lot to go on sadly! Fortunately, I fixed it initially by installing curl in my docker container but found that installing openssl was sufficient.

Mainly posting this since other folks might run into this empty error stack.

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

3 participants