risingwavelabs / risingwave

Best-in-class stream processing, analytics, and management. Perform continuous analytics, or build event-driven applications, real-time ETL pipelines, and feature stores in minutes. Unified streaming and batch. PostgreSQL compatible.
https://go.risingwave.com/slack
Apache License 2.0
6.8k stars 563 forks source link

[v2.0.0.rc.1] NO_PROXY environment variable not handled any more #18584

Closed btheu closed 3 hours ago

btheu commented 1 day ago

Describe the bug

Standalone RW v2.0.0.rc.1 cant start from docker-compose.yml when env vars HTTP_PROXY and NO_PROXY are setup.

Previous version v1.10.1 is starting well.

Error message/log

`Failed to connect to meta server http://127.0.0.1:5690/`

To Reproduce

You need to be behind a company proxy, in docker compose add environment variables:

HTTP_PROXY="http://mycompanyproxy:3128" NO_PROXY="localhost,127.0.0.1"

Expected behavior

Like RW v1.10.1, I expect RW 2.0.0.rc.1 fully started and accepting SQL queries.

How did you deploy RisingWave?

Via docker-compose derivative from risingwave lab one :

https://github.com/risingwavelabs/risingwave/blob/main/docker/docker-compose.yml

The version of RisingWave

v2.0.0.rc.1

risingwavelabs/risingwave:nightly-20240917

https://hub.docker.com/layers/risingwavelabs/risingwave/nightly-20240917/images/sha256-465c403878fe51210cfa83fd87c2c205795c6a9b9601cc62f0abd89b5a131938?context=explore

Additional context

That's mean NO_PROXY="localhost,127.0.0.1" env var is ignored in a way that http call are going through the HTTP_PROXY even for localhost http call.

BugenZhao commented 1 day ago

We use tonic library for gRPCs between nodes in a cluster, where I don't think env vars like HTTP_PROXY or NO_PROXY are taken into consideration... 🤔

BugenZhao commented 3 hours ago

We use tonic library for gRPCs between nodes in a cluster, where I don't think env vars like HTTP_PROXY or NO_PROXY are taken into consideration... 🤔

I've double-checked and confirmed that the issue is due to the meta service being unable to connect to MinIO.

We switched to OpenDAL as the S3 backend (in https://github.com/risingwavelabs/risingwave/pull/18011), which uses reqwest for HTTP requests and respects environment variables like HTTP_PROXY and NO_PROXY. The previous aws-sdk implementation did not.

That is to say...

Feel free to let us know if there are further questions.

btheu commented 2 hours ago

Indeed adding minio-0 in NO_PROXYfixed the issue.

Thanks