bored-glass-58755
11/10/2022, 7:32 PMpython_distribution
target but the package
goal is failing. Following is the trail of the debug output:
14:26:04.48 [DEBUG] Completed: Resolve transitive targets
14:26:14.43 [DEBUG] Completed: Downloading: <https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-osx-aarch_64.zip> (2.58 MB)
14:26:14.43 [DEBUG] Completed: pants.core.util_rules.external_tool.download_external_tool
14:26:14.43 [DEBUG] Completed: Generate Python from Protobuf
14:26:14.43 [DEBUG] Completed: pants.backend.python.util_rules.python_sources.prepare_python_sources
14:26:14.43 [DEBUG] Completed: pants.backend.python.util_rules.python_sources.strip_python_sources
14:26:14.43 [DEBUG] Completed: pants.backend.python.util_rules.python_sources.prepare_python_sources
14:26:14.43 [DEBUG] Canceled: pants.backend.python.util_rules.python_sources.strip_python_sources
`142614.43 [DEBUG] Completed: package
goal`
14:26:14.43 [DEBUG] computed 1 nodes in 10.502206 seconds. there are 262 total nodes.
14:26:14.43 [ERROR] 1 Exception encountered:
Exception: Error downloading file: error sending request for url (<https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-osx-aarch_64.zip>): error trying to connect: proxy authentication required
I have tried adding the subsystem subprocess-environment
with proxy variables in pants.toml
but the error remains the same. I am using python 3.9 on an M1 Mac. My question is if the debug output says that package goal completed, why and what is it failing for?happy-kitchen-89482
11/10/2022, 8:57 PMbored-glass-58755
11/10/2022, 9:00 PMsubprocess-environment
in pants.toml
. But more importantly, what do the debug logs trying to convey?happy-kitchen-89482
11/10/2022, 10:42 PMCompleted:
is probably a misleading word, it just means that the attempt completed, not that it was successful…bored-glass-58755
11/10/2022, 10:44 PMhappy-kitchen-89482
11/10/2022, 10:46 PMbored-glass-58755
11/10/2022, 10:48 PMhappy-kitchen-89482
11/10/2022, 10:59 PMenv_vars.add =
as the names in your env?bored-glass-58755
11/10/2022, 11:03 PMcurl -O <https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-osx-aarch_64.zip>
is downloading the file successfully from the same terminal tab I am running package goal from.18:06:51.94 [INFO] Initializing scheduler...
18:06:52.12 [INFO] Scheduler initialized.
18:06:54.47 [ERROR] 1 Exception encountered:
Exception: Error downloading file: error sending request for url (<https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-osx-aarch_64.zip>): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
I am using the variable ca_certs_path
under GLOBAL
scope. The value of this variable is taken from the command:
curl -vvv -O <https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-osx-aarch_64.zip> 2>&1 | grep CAfile
happy-kitchen-89482
11/10/2022, 11:30 PMbored-glass-58755
11/10/2022, 11:33 PMhappy-kitchen-89482
11/10/2022, 11:33 PMbored-glass-58755
11/10/2022, 11:34 PMhappy-kitchen-89482
11/10/2022, 11:34 PMSSL_CERT_FILE
to that file?bored-glass-58755
11/10/2022, 11:34 PMhappy-kitchen-89482
11/10/2022, 11:39 PMca_certs_path
? Same error? different error?bored-glass-58755
11/10/2022, 11:40 PMhappy-kitchen-89482
11/10/2022, 11:47 PMca_certs_path
to a nonexistent file? I just want to check that it’s being read at all…bored-glass-58755
11/11/2022, 12:27 AMca_certs_path = "/path/to/certs/file"
and it threw an error:
File "$HOME/.cache/pants/setup/bootstrap-Darwin-arm64/2.14.0_py39/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 215, in __init__
self._py_scheduler = native_engine.scheduler_create(
ValueError: Error reading root CA certs file /path/to/certs/file: No such file or directory (os error 2)
19:25:17.46 [INFO] waiting for pantsd to start...
19:25:22.45 [INFO] waiting for pantsd to start...
19:25:27.43 [INFO] waiting for pantsd to start...
19:25:32.41 [INFO] waiting for pantsd to start...
19:25:37.48 [INFO] waiting for pantsd to start...
^CInterrupted by user:
happy-kitchen-89482
11/11/2022, 12:28 AMbored-glass-58755
11/11/2022, 12:51 AMca_certs_path = "/path/to/certs/file"
at first when I got that error I sent. But I tried again changing it to ca_certs_path = "/path/to/certs/file.pem"
and got the same ValueError
I sent you before.happy-kitchen-89482
11/11/2022, 1:56 AM./pants --ca-certs-path=/etc/ssl/cert.pem
works for me with a valid pem filebored-glass-58755
11/11/2022, 1:59 AMpackage
goal doesn't use curl in the background?happy-kitchen-89482
11/11/2022, 2:34 AMbored-glass-58755
11/11/2022, 2:34 AMEngine traceback:
in select
in pants.core.goals.package.package_asset
in pants.backend.python.goals.setup_py.package_python_dist (src/proto:proto-lib)
in pants.backend.python.goals.setup_py.generate_chroot
in pants.backend.python.goals.setup_py.get_sources
in pants.backend.python.util_rules.python_sources.strip_python_sources
in pants.backend.python.util_rules.python_sources.prepare_python_sources
in pants.core.util_rules.source_files.determine_source_files
in pants.engine.internals.graph.hydrate_sources (src/proto/helloworld.proto:protos)
in pants.backend.codegen.protobuf.python.rules.generate_python_from_protobuf
in pants.core.util_rules.external_tool.download_external_tool
in downloaded_file
Traceback (no traceback):
<pants native internals>
Exception: Error downloading file: error sending request for url (<https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-osx-aarch_64.zip>): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
happy-kitchen-89482
11/11/2022, 2:34 AMbored-glass-58755
11/11/2022, 2:35 AMpackage
goal.happy-kitchen-89482
11/11/2022, 3:36 AMbored-glass-58755
11/11/2022, 4:18 AMhappy-kitchen-89482
11/11/2022, 3:46 PMsecurity find-certificate -a -p > keychain_certs.pem
bored-glass-58755
11/11/2022, 4:21 PMpackage
worked. I exported all root certificates and then only the one which I know curl was using based on issuing authority, bundled them all in one file and it worked. And now in the subsequent runs it doesn't matter if I provide a cert file or not and which file do I provide because it seems it has cached the things required to build that one target. Is there a way to clear that cache because I want to try a couple of things before I proceed from here.happy-kitchen-89482
11/11/2022, 5:00 PM--no-pantsd --no-local-cache
bored-glass-58755
11/11/2022, 7:20 PMca_certs_path
from pants.toml
.happy-kitchen-89482
11/12/2022, 1:32 AMbored-glass-58755
11/12/2022, 1:38 AM~/.cache/pants
mean bootstrapping Pants again?happy-kitchen-89482
11/15/2022, 6:04 AM