mediapipe: Error encountered during installation
I followed the instructions and tried to install and run mediapipe in Ubuntu. The previous work was very smooth. But there was an error when I finally ran Hello world.
bazel run --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hello_world:hello_world
Error report:
viosin@Viosin-Laptop:~/mediapipe$ bazel run --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hello_world:hello_world
INFO: Call stack for the definition of repository 'org_tensorflow' which is a http_archive (rule definition at /home/viosin/.cache/bazel/_bazel_viosin/7d642f36f799200596607c092b81016f/external/bazel_tools/tools/build_defs/repo/http.bzl:292:16):
- /home/viosin/mediapipe/WORKSPACE:124:1
WARNING: Download from https://mirror.bazel.build/github.com/tensorflow/tensorflow/archive/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://github.com/tensorflow/tensorflow/archive/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz failed: class java.io.IOException Tried to reconnect at offset 9,944,151 but server didn't support it
ERROR: An error occurred during the fetch of repository 'org_tensorflow':
java.io.IOException: Error downloading [https://mirror.bazel.build/github.com/tensorflow/tensorflow/archive/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz, https://github.com/tensorflow/tensorflow/archive/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz] to /home/viosin/.cache/bazel/_bazel_viosin/7d642f36f799200596607c092b81016f/external/org_tensorflow/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz: Tried to reconnect at offset 9,944,151 but server didn't support it
ERROR: no such package '@org_tensorflow//tensorflow': java.io.IOException: Error downloading [https://mirror.bazel.build/github.com/tensorflow/tensorflow/archive/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz, https://github.com/tensorflow/tensorflow/archive/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz] to /home/viosin/.cache/bazel/_bazel_viosin/7d642f36f799200596607c092b81016f/external/org_tensorflow/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz: Tried to reconnect at offset 9,944,151 but server didn't support it
ERROR: no such package '@org_tensorflow//tensorflow': java.io.IOException: Error downloading [https://mirror.bazel.build/github.com/tensorflow/tensorflow/archive/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz, https://github.com/tensorflow/tensorflow/archive/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz] to /home/viosin/.cache/bazel/_bazel_viosin/7d642f36f799200596607c092b81016f/external/org_tensorflow/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz: Tried to reconnect at offset 9,944,151 but server didn't support it
INFO: Elapsed time: 523.767s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
I think this may be caused by the failure of downloading some files, so I tried to access one of the links, and the address couldn’t be accessed as expected. At first, I thought it might be my own network reason, but I still couldn’t access it after opening the agent. So I reported the issue.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15
in macos 10.15.6, mediapipe commit-id: a7225b938a5aff536dcdc4d48d7125964480f413
must use two --host_jvm_args like this:
bazel --host_jvm_args '-DsocksProxyHost=127.0.0.1' --host_jvm_args '-DsocksProxyPort=1080' <cmd>
will take proxy setting effective.
Combine in one --host_jvm_args like:
bazel --host_jvm_args '-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=1080' <cmd>
will throw exception:Can't connect to SOCKS proxy:127.0.0.1 -DsocksProxyPort=1080
hope this can help someone face same issue.
Can you do
bazel clean --expunge
and retry the build command?The downloading is taken care by the build tool Bazel and I feel sorry that MediaPipe doesn’t have any control on it. Moreover, VPN is preferred if you are in mainland China. See https://github.com/google/mediapipe/issues/3 for more detail.
if you network blocked by the Great Firewall. you can change your repositories in WORKSPACE file like this. repositories = [ “https://maven.aliyun.com/repository/google”, “https://maven.aliyun.com/repository/central”, “https://maven.aliyun.com/repository/public”, ], Good luck.
Well, I tried your method, but it didn’t work.
But I do suspect that this may be a network error, so I tried all kinds of ways to set up the proxy, and the result was useless.
Finally, I suddenly remembered that bazel’s download program seemed to be run by Java, and the Java virtual machine does not use any agents by default.
Unless… I set the JVM parameters manually. After checking the help documents of bazel, I found that the JVM parameters can be set through ` – host_jvm_args’.
So I finally ran mediapipe successfully with such a string of code.
Maybe this issue can help other Chinese developers.
Thank you for your help.
Oh, by the way, my English is not very good. So this text is generated by translation software. If you are offended, please forgive me.