bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
23.23k stars 4.07k forks source link

Failed to query remote execution capabilities when Zoom is automatically launched at startup #19744

Open evis opened 1 year ago

evis commented 1 year ago

Description of the bug:

% bazel run --announce_rc //:buildifier
INFO: Invocation ID: a651c8d4-c96c-4d0f-8916-f75f23e36133
ERROR: Failed to query remote execution capabilities: INTERNAL: http2 exception

bazel responded with this error to any command, even bazel clean --expunge and bazel shutdown.

What helped to fix it:

  1. Stop Zoom
  2. Drop it from auto

There is a guess, that both Zoom and Bazel require the same port 9090.

Expected behaviour in this case:

  1. Bazel just runs correctly
  2. Or it shows more helpful error message, at least.

Which category does this issue belong to?

CLI

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Not sure if it will allow to reproduce, but hope so:

  1. Run Zoom automatically at startup on clean system
  2. Only then try to setup and run bazel

Which operating system are you running Bazel on?

Mac OS

What is the output of bazel info release?

release 6.2.1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

coeuvre commented 1 year ago

What's the value of --remote_cache or --remote_exeuctor flags? Maybe they are conflict with the port Zoom uses.

tjgq commented 1 year ago

Also, can you run with --verbose_failures? That should give us a stack trace for the http2 exception.

evis commented 1 year ago

We've tried to run with empty --remote-cache, still got same error. Also tried with --verbose-failures, the command output were the same, and didn't contain a stack trace.

tjgq commented 1 year ago

Can you share all of the Bazel flags you're using? (feel free to redact sensitive information)

evis commented 1 year ago
% bazel clean --expunge --config=offline
INFO: Invocation ID: 4bc43244-6cab-417e-a015-f97cad934271
ERROR: Failed to query remote execution capabilities: INTERNAL: http2 exception

repo .bazelrc: https://gist.github.com/evis/89121a401ba32c2d70191a52106b608f /home/$user/.bazelrc: https://gist.github.com/evis/a8b791575493921a26d18f78b48f3b6f

tjgq commented 1 year ago

I had no luck reproducing this, so I'm afraid someone else will have to investigate it. A couple of followup observations:

  1. Using lsof -P | grep LISTEN, I don't see any listening sockets owned by Zoom; what do you see? (More generally, I can't imagine how a port conflict might consistently occur; I believe all sockets created by Bazel bind to random local ports.)

  2. I guess --verbose_failures didn't work because https://github.com/bazelbuild/bazel/commit/454f11de856c9cc89f0f5f7b5d7f3a862c7c28b0 (which ensures the stack trace gets printed for gRPC errors) was never ported to 6.x. Can you try it with the Bazel 7 release candidate? Maybe that reveals the information we're missing.