bazelisk
bazelisk copied to clipboard
Can't connect to local Bazel server at an amd64 Ubuntu VM running on a M1 Mac
Hello team, I'm getting stuck with a weird behavior on Bazel running in a VM. It's easy to reproduce so hope you could address it.
Environment
-
Host: M1 Pro macOS Monterey 12.5
-
VM: amd64 Ubuntu 20.04 controlled by lima
Provisioning script to make Ubuntu image
arch: "x86_64" images: - location: "https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64.img" arch: "x86_64" mounts: - location: "/tmp/lima" writable: true containerd: system: false user: false
- Bazelisk version: v1.12.0 (bazelisk-linux-amd64)
How to reproduce
- Dive into the VM image using
limactl shell
- Install
bazelisk
binary - Checkout examples repository
- $ cd examples/cpp-tutorial/stage1
- $ bazelisk build //main:hello-world
Expected
Bazel works well.
Actual
Aborted since it couldn't connect to local Bazel server for some reason. It's 100% reproducible so far.
***@lima-ubuntu:~/examples/cpp-tutorial/stage1$ bazelisk build //main:hello-world
Starting local Bazel server and connecting to it...
... still trying to connect to local Bazel server after 10 seconds ...
... still trying to connect to local Bazel server after 20 seconds ...
... still trying to connect to local Bazel server after 30 seconds ...
... still trying to connect to local Bazel server after 40 seconds ...
... still trying to connect to local Bazel server after 50 seconds ...
... still trying to connect to local Bazel server after 60 seconds ...
... still trying to connect to local Bazel server after 70 seconds ...
... still trying to connect to local Bazel server after 80 seconds ...
... still trying to connect to local Bazel server after 90 seconds ...
... still trying to connect to local Bazel server after 100 seconds ...
... still trying to connect to local Bazel server after 110 seconds ...
FATAL: couldn't connect to server (3308) after 120 seconds.
Thanks!