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

bear in WSL2 failed: wrapper: failed with: gRPC call failed: failed to connect to all addresses (solved) #595

Closed
Topology2333 opened this issue Aug 20, 2024 · 2 comments

Comments

@Topology2333
Copy link

Thank you for developing this tool. It's incredibly useful! But I found a potential bug (?) here.
I tried the methods outlined in the wiki, but they didn't seem to work for me. In the end, I stumbled upon a solution, though I'm not entirely sure of the principles behind it. But I thought this method could be added to the Wiki if needed.

(Possible Solution I found was to comment networkingMode=mirrored in .wslconfig)

Environment:

OS: WSL2 on Windows11 Ubuntu 22.04.3 LTS x86_64
Bear version: 3.0.18, Bear install method: apt

Description:

I am trying bear to generate compile_commands.json for a C project but failed.

> bear -- make
wrapper: failed with: gRPC call failed: failed to connect to all addresses

And, it still generates an empty compile_commands.json.

> make
gcc include/*.h src/*.c -o main
> tree
.
├── Makefile
├── compile_commands.json
├── include
│   └── inc.h
├── main
└── src
    └── main.c

I've tried wiki/Troubleshooting on GitHub

export no_proxy=localhost,127.0.0.1
export GRPC_DNS_RESOLVER=native
unset https_proxy; unset http_proxy

verbose(too long so I truncate here):

[22:06:05.597561, wr, 1386, ppid: 1381] wrapper: 3.0.18
...
[22:06:05.598583, wr, 1386, ppid: 1381] gRPC call requested: supervise::Supervisor::Resolve
[22:06:25.599308, wr, 1386, ppid: 1381] gRPC call [Resolve] finished: false
[22:06:25.599526, wr, 1386, ppid: 1381] failed with: gRPC call failed: failed to connect to all addresses
export no_proxy=127.0.0.1

And those didn't work.

Possible Solution:

I modified the .wslconfig file by commenting the following line(networkingMode), and everything started working properly.

.wslconfig
[experimental]
autoMemoryReclaim=gradual 
# networkingMode=mirrored # comment here
dnsTunneling=true 
firewall=true 
autoProxy=true 
sparseVhd=true 
@Topology2333 Topology2333 changed the title bear in WSL2 failed: wrapper: failed with: gRPC call failed: failed to connect to all addresses bear in WSL2 failed: wrapper: failed with: gRPC call failed: failed to connect to all addresses (solved) Aug 20, 2024
@Topology2333
Copy link
Author

Or perhaps I should post in the Discussion section?

@rizsotto
Copy link
Owner

Thanks @Topology2333 !!!

I've updated the wiki and linked this issue. Will close it now.

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