bazel: Bazel failed to build behind proxy
Description of the problem / feature request:
I would like to follow tensorflow example to build generate_streaming_test_wav to generate test wav. The Bazel version on my machine is 0.16.1.
The problem is when I use the command bazel run tensorflow/examples/speech_commands:generate_streaming_test_wav
, the following error message shown up:
xxx@xxx:~/kws/tensorflow-0911$ bazel run tensorflow/examples/speech_commands:generate_streaming_test_wav
Starting local Bazel server and connecting to it...
ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '@io_bazel_rules_closure//closure': Error downloading [https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz, https://github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz] to /home/janet/.cache/bazel/_bazel_janet/2d14dc1ff5782da202e00efcc3cd86bc/external/io_bazel_rules_closure/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz: All mirrors are down: [Unable to tunnel through proxy. Proxy returns "HTTP/1.0 407 Proxy Authentication Required"]
ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '@io_bazel_rules_closure//closure': Error downloading [https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz, https://github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz] to /home/janet/.cache/bazel/_bazel_janet/2d14dc1ff5782da202e00efcc3cd86bc/external/io_bazel_rules_closure/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz: All mirrors are down: [Unable to tunnel through proxy. Proxy returns "HTTP/1.0 407 Proxy Authentication Required"]
INFO: Elapsed time: 57.573s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
However, I can use wget
and curl
to download those two packages. 1.https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz 2.https://github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz
Since the file is able to be downloaded on my machine, I think the proxy settings are fine.
A workable workaround method is change the http_archive
to local_repository
. However, the build process still stopped because tensorflow apply their rule (tf_http_archive
) to fetch other files in the following step. It’s not reasonable to download all the file manually and replace all the `tf_http_archive’ in each file.
Feature requests: what underlying problem are you trying to solve with this feature?
Is it possible to make bazel download files through proxy?
Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Please download tensorflow and build it behind proxy.
What operating system are you running Bazel on?
Ubuntu 16.04.4 LTS
What’s the output of bazel info release
?
release 0.16.1
What’s the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?
https://github.com/tensorflow/tensorflow.git e18f84a394bcbde62b344a3b32e8d8fd248fea58 e18f84a394bcbde62b344a3b32e8d8fd248fea58
Have you found anything relevant by searching the web?
likely issue raised before: https://github.com/bazelbuild/bazel/issues/587#issuecomment-412531604
- after applied the settings still not work
Question raised on stackoverflow: https://stackoverflow.com/questions/52311486/bazel-build-behind-proxy
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 18 (6 by maintainers)
There have been various requests over various months, if not years now, for Bazel to allow build behind a proxy. Will anything be done about this? This is really frustrating.