-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Unable to download dependencies #1979
Comments
It looks like your proxy is expecting the service to respond to NTLM authentication, which we can't do. Can you change the proxy configuration to not require authentication, or use a local proxy which handles the authentication directly? |
sslverify I made false during proxy configuration. And I configured squid tool to allow all IP. But still same error. |
I cannot disable authentication in local proxy as I discussed with admin team. Is there any other solution? |
It seems Bazel doesn't have support for the proxy authentication you are using. Can you let us know Thanks |
(a) used only local proxy now: configured in /etc/environment and /etc/apt/apt.conf root@BLR1000015302:~/polyglot# cat /etc/apt/apt.conf |
Is it possible to download dependencies in some other machine and copy those dependencies to local machine to build polyglot?? I tried this, but still it is trying to download dependencies in local machine. How to over come from this? |
Where are you installing the dependencies? Have you looked at the "--experimental_repository_cache" flag? You can use that on your local version to cache downloaded artifacts in a single per-user location, then copy that cache to the remote machine and use the same flag so that it will be used there. The cache defaults to a location in your home directory, but by passing a value with the flag (ie, "--experimental_repository_cache=/path/to/cache") you can choose the directory to use. |
root@BLR1000015302:~/polyglot_temp# bazel build src/main/java/me/dinowernli/grpc/polyglot --experimental_repository_cache=/root/backup Is it correct command to build by using --experimental_repository_cache ?? Above are the dependency downloading files what I had mentioned. |
Hi katre, |
That is the correct flag. What version of Bazel are you using? The flag was added recently, make sure you are using the latest release. |
I tried to install bazel-0.4.1-installer-linux-x86_64.sh now, but getting error |
What is the SHA-256 of the shell installer?
…On Mon, Dec 5, 2016, 7:44 AM Mahesh Poojary S ***@***.***> wrote:
I tried to install bazel-0.4.1-installer-linux-x86_64.sh now, but getting
error
Uncompressing..error [./bazel-0.4.0-installer-linux-x86_64.sh]: missing
1509 bytes in zipfile
(attempting to process anyway)
file #1 <#1>: bad zipfile offset
(local header sig): 5466
(attempting to re-compensate)
error: invalid compressed data to inflate
/usr/local/lib/bazel/bin/bazel-real
I am using ubuntu OS
***@***.***:/opt# uname -a
Linux BLR1000015302 3.13.0-24-generic #47
<#47>-Ubuntu SMP Fri May 2
23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
***@***.***:/opt#
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1979 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADjHf3SRi9uecSoBjGNjbGjryQSBU3goks5rE7K6gaJpZM4Keolw>
.
|
root@BLR1000015302:/opt# sha256sum bazel-0.4.1-installer-linux-x86_64.sh |
186f22ea776fba7dd5931241700f60974a681e90eb5831d40257baac9a58e436 is the correct shasum (see on https://github.com/bazelbuild/bazel/releases/0.4.1) Can you try to redownload the artifact. |
I tried many times, but same issue. I wanted to know whether bazel-0.4.1-installer-linux-x86_64.sh is works |
Now I am able to install bazel latest installer. Now the question is how to use the flag experimental_repository_cache. tar cvf backup.tar.gz /root/backup[2] System without internet connection Please let me know, is it correct procedure? |
That looks correct, please try it and let us know how it goes. |
Build is failed. It is trying to connect internet to download artifact com.google.protobuf:protobuf-java-util:jar. Error: "Connect to repo1.maven.org:443 timed out". For me, it should not connect internet to download, but it has to fetch all required artifacts from /root/poly_backup. Did I miss anything? root@BLR1000015302: |
Hmm, I'm not sure why it's still trying to download that. Did you make sure the @protobuf_java_util_artifact//jar dependency is in the cache you transferred? |
It is not present in downloaded cache. |
Can you share your WORKSPACE file with the maven_jar rules? I'd like to try and reproduce this. |
root@BLR1000015302:~/polyglot# cat WORKSPACE http_file( http_file( http_file( http_file( http_file( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( |
Hi katre, |
I did take a look, sorry for not responding sooner. I was incorrect, maven_jar does not work with experimental_repository_cache. The http_archive rules do. Also, there is a new version of maven_jar which uses maven directly and which will therefore cache everything locally in a.m2 file. So, here are the steps I recommend: Switch to the new maven_jar by adding the following line to your WORKSPACE:
(This is written in the Skylark extension language, and uses the mvn binary on your system. It is slower than the old, native maven_jar, unfortunately, but much more flexible). Continue to use --experimental_repository_cache to cache http_archive artifacts. When you run the build on your local (networked) machine, it should correctly download all the maven artifacts into your ~/.m2/repository directory, and then copy them from there to the bazel external repository as needed. Copy the http artifacts as you did with the directory passed to experimental_repository_cache. Also copy the ~/.m2/repository directory to the destination computer so it is reachable to your non-networked bazel. I just tested turning off the network on my laptop and re-running 'bazel fetch' with your workspace, and bazel reported that it had all needed artifacts even without the need to go to the network. Here is the commands I used, for reference:
I created deps.txt from the WORKSPACE you provided so I could test downloading the dependencies. I'll attach the WORKSPACE and deps.txt I created. Good luck! |
Now bazel is working fine in a PC having without internet connection. |
Glad it's working now, I will close this issue but feel free to file a new one if you have further problems. |
I could not resolve below issue. This is I am compiling polyglot from Virtual Machine where proxy is set.
No issue when I compiled in my laptop with public network.
root@BLR1000015302:
/polyglot# bazel build src/main/java/me/dinowernli/grpc/polyglot/polyglot#Unhandled exception thrown during build; message: Unrecoverable error while evaluating node 'REPOSITORY_DIRECTORY:@protoc_osx_x86_64' (requested by nodes 'REPOSITORY:@protoc_osx_x86_64')
INFO: Elapsed time: 12.518s
java.lang.RuntimeException: Unrecoverable error while evaluating node 'REPOSITORY_DIRECTORY:@protoc_osx_x86_64' (requested by nodes 'REPOSITORY:@protoc_osx_x86_64')
at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:447)
at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:496)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.sun.security.ntlm.Client.type3(Client.java:161)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.buildType3Msg(NTLMAuthentication.java:241)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.setHeaders(NTLMAuthentication.java:216)
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2096)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at com.google.devtools.build.lib.bazel.repository.downloader.HttpConnection.createAndConnectViaHttp(HttpConnection.java:144)
at com.google.devtools.build.lib.bazel.repository.downloader.HttpConnection.createAndConnect(HttpConnection.java:92)
at com.google.devtools.build.lib.bazel.repository.downloader.HttpDownloader.download(HttpDownloader.java:149)
at com.google.devtools.build.lib.bazel.repository.downloader.HttpDownloader.download(HttpDownloader.java:92)
at com.google.devtools.build.lib.bazel.repository.HttpArchiveFunction.fetch(HttpArchiveFunction.java:66)
at com.google.devtools.build.lib.rules.repository.RepositoryDelegatorFunction.compute(RepositoryDelegatorFunction.java:155)
at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:388)
... 4 more
java.lang.RuntimeException: Unrecoverable error while evaluating node 'REPOSITORY_DIRECTORY:@protoc_osx_x86_64' (requested by nodes 'REPOSITORY:@protoc_osx_x86_64')
at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:447)
at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:496)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.sun.security.ntlm.Client.type3(Client.java:161)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.buildType3Msg(NTLMAuthentication.java:241)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.setHeaders(NTLMAuthentication.java:216)
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2096)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at com.google.devtools.build.lib.bazel.repository.downloader.HttpConnection.createAndConnectViaHttp(HttpConnection.java:144)
at com.google.devtools.build.lib.bazel.repository.downloader.HttpConnection.createAndConnect(HttpConnection.java:92)
at com.google.devtools.build.lib.bazel.repository.downloader.HttpDownloader.download(HttpDownloader.java:149)
at com.google.devtools.build.lib.bazel.repository.downloader.HttpDownloader.download(HttpDownloader.java:92)
at com.google.devtools.build.lib.bazel.repository.HttpArchiveFunction.fetch(HttpArchiveFunction.java:66)
at com.google.devtools.build.lib.rules.repository.RepositoryDelegatorFunction.compute(RepositoryDelegatorFunction.java:155)
at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:388)
... 4 more
root@BLR1000015302:
Regards
-Mahesh
The text was updated successfully, but these errors were encountered: