-
Notifications
You must be signed in to change notification settings - Fork 97
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
Proxy cannot be used when deployed to the Linux #320
Comments
@lileixer I use what the grpc library provides, so let me ask someone from the team to chime in. What proxy string are you using? Could you share it? |
Thanks a lot. Of course I would.But this is a private proxy, I hope I can send it to you separately. My email is leilichn005@gmail.com, please send me an email and I will reply to you. |
Some general advice that might help:
relevant proxy configuration code: |
@jtattermusch |
From the documentation it's not obvious to me whether the proxy you use supports HTTP 2.0 Can you share the obfuscated proxy URL here (e.g. replace IP address with random number or replace hostname with random characters, just keep the structure of the URL)? |
@jtattermusch |
Ok, so I'm I understanding correctly that the exact same setup works fine on Windows and it doesn't work on Linux (Linux vs Windows being the only difference here?) |
@jtattermusch |
Any interesting differences in the logs when |
@jtattermusch |
After doing the configuration, the log is as follows |
The lack of useful linux logs seems surprising. Can you try with Which Grpc.Core version are you using? |
Ok, I think I know what's wrong. Don't use this might be the reason why no useful logs are printed on linux and why http_proxy on linux appears to not work (the real problem is that the C-core library doesn't see those env variables being set). Also see grpc/grpc#19706 |
Thanks, let me try |
@jtattermusch |
Let's close this issue then? |
OK |
Today I encountered a new problem. There are two places in my project that need to use a proxy, one is GoogleSDK and the other is for other platforms. The two places need to use different proxy addresses, and the environment variable configuration cannot be isolated. How can I Does the operation make it read the project configuration? (Project deployment to Linux) |
If you have access to the creation of gRPC channels and you can add extra configuration, During creating of the channel, you can pass If you don't have access to the channel creation (not sure if the ads client library provides that), you're out of luck, since the only other option is setting the enviroment variable. |
I'm trying to pull a branch and change the implementation |
Oh... That's a very useful information...I can provide a fix in the library
to use ChannelOptions instead of environment variables.
…On Thu, Oct 28, 2021, 3:42 AM Jan Tattermusch ***@***.***> wrote:
If you have access to the creation of gRPC channels and you can add extra
configuration,
you can set the proxy on per-channel basis via a channel argument (or
"ChannelOption" in gRPC C#).
During creating of the channel, you can pass new
ChannelOption("grpc.http_proxy","YOUR_PROXY_URL")
https://github.com/grpc/grpc/blob/09658682c93805d5114a0d638388349c4276f9a3/include/grpc/impl/codegen/grpc_types.h#L418
If you don't have access to the channel creation (not sure if the ads
client library provides that), you're out of luck, since the only other
option is setting the enviroment variable.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#320 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCOJCEJSWKDZN7X22QGNZTUJEEFZANCNFSM5GK54L5Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Looking forward to your update |
Hi
I configured the proxy and it was available locally, but when deployed on a Linux server the program threw an exception
The error message is:(StatusCode="Unavailable", Detail="failed to connect to all addresses", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1634714686.033195058","description":"Failed to pick subchannel","file":"/var/local/git/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":5397,"referenced_errors":[{"created":"@1634714686.033187157","description":"failed to connect to all addresses","file":"/var/local/git/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":398,"grpc_status":14}]}"). Grpc.Core.RpcException: Status(StatusCode="Unavailable", Detail="failed to connect to all addresses", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1634714686.033195058","description":"Failed to pick subchannel","file":"/var/local/git/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":5397,"referenced_errors":[{"created":"@1634714686.033187157","description":"failed to connect to all addresses","file":"/var/local/git/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":398,"grpc_status":14}]}")
The text was updated successfully, but these errors were encountered: