apollo icon indicating copy to clipboard operation
apollo copied to clipboard

build failed in docker with error "An error occurred during the fetch of repository 'go_sdk':"

Open WanRQ opened this issue 3 years ago • 1 comments

We appreciate you go through Apollo documentations and search previous issues before creating an new one. If neither of the sources helped you with your issues, please report the issue using the following form. Please note missing info can delay the response time.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 18.04):Linux Ubuntu 18.04
  • Apollo installed from (source or binary):
  • Apollo version (3.5, 5.0, 5.5, 6.0): 7.0
  • Output of apollo.sh config if on master branch:

Steps to reproduce the issue:

I got the error info when build the apollo v7.0 in docker, here is the info when run the "./apollo.sh build":

Supporting materials (screenshots, command lines, code/script snippets):

[INFO] Apollo Environment Settings: [INFO] APOLLO_ROOT_DIR: /apollo [INFO] APOLLO_CACHE_DIR: /apollo/.cache [INFO] APOLLO_IN_DOCKER: true [INFO] APOLLO_VERSION: master-2022-08-10-0789b7ea1e [INFO] DOCKER_IMG: dev-x86_64-18.04-20210914_1336 [INFO] APOLLO_ENV: STAGE=dev USE_ESD_CAN=false [INFO] USE_GPU: USE_GPU_HOST=1 USE_GPU_TARGET=1 [ OK ] Running GPU build on x86_64 platform. [WARNING] ESD CAN library supplied by ESD Electronics doesn't exist. [WARNING] If you need ESD CAN, please refer to: [WARNING] third_party/can_card_library/esd_can/README.md [INFO] Build Overview: [INFO] USE_GPU: 1 [ 0 for CPU, 1 for GPU ] [INFO] Bazel Options: --config=gpu [INFO] Build Targets: //modules/... union //cyber/... [INFO] Disabled: except //modules/drivers/canbus/can_client/esd/... Starting local Bazel server and connecting to it... (07:17:47) INFO: Invocation ID: f100c36f-1361-4c49-8abc-04a8a16e1f03 (07:17:47) INFO: Current date is 2022-08-26 (07:20:43) INFO: Repository go_sdk instantiated at: /apollo/WORKSPACE:74:16: in /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/com_github_grpc_grpc/bazel/grpc_extra_deps.bzl:36:27: in grpc_extra_deps /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/io_bazel_rules_go/go/toolchain/toolchains.bzl:379:28: in go_register_toolchains /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/io_bazel_rules_go/go/private/sdk.bzl:65:21: in go_download_sdk Repository rule _go_download_sdk defined at: /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/io_bazel_rules_go/go/private/sdk.bzl:53:35: in (07:20:44) WARNING: Download from https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz failed: class javax.net.ssl.SSLException Read timed out (07:20:44) ERROR: An error occurred during the fetch of repository 'go_sdk': Traceback (most recent call last): File "/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/io_bazel_rules_go/go/private/sdk.bzl", line 51, column 16, in _go_download_sdk_impl _remote_sdk(ctx, [url.format(filename) for url in ctx.attr.urls], ctx.attr.strip_prefix, sha256) File "/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/io_bazel_rules_go/go/private/sdk.bzl", line 121, column 21, in _remote_sdk ctx.download( Error in download: java.io.IOException: Error downloading [https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz] to /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/go_sdk/go_sdk.tar.gz: Read timed out (07:20:44) ERROR: Analysis of target '//modules/v2x/common:v2x_proxy_gflags' failed; build aborted: java.io.IOException: Error downloading [https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz] to /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/go_sdk/go_sdk.tar.gz: Read timed out (07:20:44) INFO: Elapsed time: 177.616s (07:20:44) INFO: 0 processes. (07:20:44) FAILED: Build did NOT complete successfully (606 packages loaded, 6337 targets configured)

WanRQ avatar Aug 26 '22 07:08 WanRQ

reason

The error means you can't download, In most cases this is caused by network inaccessibility

Error downloading [https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz] to /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/go_sdk/go_sdk.tar.gz

solution

  1. add below code in tools/bazel.rc
build --distdir=/apollo/.cache/distdir 
  1. download the file https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz somehow, put it into
/apollo/.cache/distdir 
  1. do the build again

daohu527 avatar Aug 26 '22 08:08 daohu527

reason

The error means you can't download, In most cases this is caused by network inaccessibility

Error downloading [https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz] to /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/go_sdk/go_sdk.tar.gz

solution

  1. add below code in tools/bazel.rc
build --distdir=/apollo/.cache/distdir 
  1. download the file https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz somehow, put it into
/apollo/.cache/distdir 
  1. do the build again

Thank u so so so so much ! good bro !!!!

greydog-yang avatar Aug 30 '23 08:08 greydog-yang