bazelbuild / bazelbuild/reclient

"Could not create TLS config: failed to read mTLS cert pair" freezes build

Open
#108 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
114
Forks
25
PR merge metrics
No merged PRs in 30d

Description

If the files `engflow.crt` and `engflow.key` are missing from the specified paths, `reproxy` becomes unresponsive instead of providing a clear error message.

Running `reproxystatus -watch 1s` indicated that the system status was reported as `is OK`.

Enabling verbose logging with `export RBE_v=2` produced the following logs:
```
terrym@Mac 20241128T133349.693535_65803379-8b7d-409e-b2d7-51d6e8a04288 % cat reproxy.WARNING
Log file created at: 2024/11/28 08:33:49
Running on machine: Mac
Binary: Built with gc go1.21.11 X:nocoverageredesign for darwin/arm64
Previous log:
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
W1128 08:33:49.733564 5489 main.go:491] Path for auxiliary metadata message descriptor file is empty.
If you want to collect backend workers' cpu/mem usage information into reproxy log, please set the --auxiliary_metadata_path flag (see instruction in api/auxiliary_metadata/readme.md).
W1128 08:33:49.735694 5489 client.go:661] Instance name was not specified.
E1128 08:33:49.735743 5489 main.go:395] Failed to initialize SDK client: failed to prepare gRPC dial options: could not create TLS config: failed to read mTLS cert pair ('/Users/terrym/engflow.crt', '/Users/terrym/engflow.key'): open /Users/terrym/engflow.crt: no such file or directory
E1128 08:33:49.744831 5489 depsscannerclient.go:65] depsscannerclient stderr:
W1128 08:33:49.744845 5489 depsscannerclient.go:590] /Users/terrym/brave-browser/src/buildtools/reclient/scandeps_server stopped with error code -1
E1128 08:33:49.744861 5489 main.go:361] Failed to initialize input processor: Failed to connect to dependency scanner service after 30 seconds: context canceled
terrym@Mac 20241128T133349.693535_65803379-8b7d-409e-b2d7-51d6e8a04288 %
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by starting reproxy with missing engflow.crt and engflow.key files, using reproxystatus -watch 1s and RBE_v=2 as in the report. Start at the initialization errors in main.go:395, client.go:661, and depsscannerclient.go:65. Done means reproxy reports the missing mTLS certificate pair clearly and does not become unresponsive.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.