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

Get "https://www.googleapis.com /storage/v1/b/bazel/o?delimiter=/": proxyconnect tcp: net/http: TLS handshake timeout #234

Closed
puraminy opened this issue Apr 7, 2021 · 4 comments

Comments

@puraminy
Copy link

puraminy commented Apr 7, 2021

bazel is banned in Iran. So I set linux proxy (HTTPS_PROXY to https://127.0.0.1:8118) which is Tor via privoxy. Anyways, it seems bazel can't pass through proxy

when I run:

bazel --version

it gives me:

23:31:14 could not resolve the version 'latest' to an actual version number: unab
le to determine latest version: could not list Bazel versions in GCS bucket: could not list 
GCS objects at https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: could not fetch 
https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.googleapis.com
/storage/v1/b/bazel/o?delimiter=/": proxyconnect tcp: net/http: TLS handshake timeout

@Lr-2002
Copy link

Lr-2002 commented May 2, 2021

I'm facing the same problem with you (China )
Have you ever fixed the problem?plz

@puraminy
Copy link
Author

puraminy commented May 2, 2021

try to install bazelisk using this:

npm install -g @bazel/bazelisk

or from GitHub:

https://github.com/bazelbuild/bazelisk

Bazelisk tries to find a suitable version of Bazel and install it, to tell it where to look for Bazel, set this variable before calling it.

export BAZELISK_BASE_URL="https://github.com/bazelbuild/bazel/releases/download"

This address isn't blocked and you should be able to install Bazel.

@Lr-2002
Copy link

Lr-2002 commented May 2, 2021

Thanks for replying.
But things has not taken a turn for the better with showing the following infos:

2021/05/02 22:10:25 could not resolve the version 'latest' to an actual version number: unable to determine latest version: could not list Bazel versions in GCS bucket: could not list GCS objects at https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: could not fetch https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/": read tcp 192.168.1.109:46620->216.58.200.42:443: read: connection reset by peer

even the former one which has been built by bazel could run now

@puraminy
Copy link
Author

puraminy commented May 2, 2021

I guess it can't map latest to a specific version.

This is the github page for bazelisk. read their README

https://github.com/bazelbuild/bazelisk

In part of it, it writes, read that part:

How does Bazelisk know which Bazel version to run?

Also in this page you can find releases of Bazel:

https://github.com/bazelbuild/bazel/releases

so you can set your desired version. PLEASE Note, I said make this setting:

export BAZELISK_BASE_URL="https://github.com/bazelbuild/bazel/releases/download"

before you running bazelisk

===============

Another solution is using a proxy server, or using Tor, however they need more descriptions... There could be also solution that disable checking GSC, again I don't find what was the setting, it was again about setting an environment variable maybe "CHECK_GSC_BUCKET" to false, I don't remember.
You even might be able to download and make bazel from source...

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

3 participants