-
Notifications
You must be signed in to change notification settings - Fork 653
Support for build servers not behind https #930
Copy link
Copy link
Open
Description
It seems like sccache hardcodes https for build servers:
Line 250 in 46d51c1
| "https://{}/api/v1/distserver/assign_job/{}", |
Could this be made configurable, or otherwise documented? The distributed setup guides mentions that it's recommended to put the scheduler behind a HTTPs server:
It's strongly recommended to listen on localhost and put a HTTPS server in front of it.
However, I can't find anything mentioning a hard requirement to put builders behind the same.
My use case for this is using sccache on a local LAN network. Right now I'm trying to set it up just using SSH tunnels - the scheduler and builder only to localhost, and I connect to server through an SSH tunnel. This setup fails with the following error, though:
WARN 2021-01-11T04:00:37Z: sccache::compiler::compiler: [inflections]: Could not perform distributed compile, falling back to local:
Error 500: {"description":"assign job failed, job un-assigned from the server",
"cause":{"description":"POST to scheduler assign_job failed",
"cause":{"description":"https://[::1]:10501/api/v1/distserver/assign_job/43: error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913: (Hostname mismatch)",
"cause":{"description":"error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913: (Hostname mismatch)",
"cause":{"description":"error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913:",
"cause":null}}}}}:
Error 500: {"description":"assign job failed, job un-assigned from the server",
"cause":{"description":"POST to scheduler assign_job failed",
"cause":{"description":"https://[::1]:10501/api/v1/distserver/assign_job/43: error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913: (Hostname mismatch)",
"cause":{"description":"error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913: (Hostname mismatch)",
"cause":{"description":"error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913:",
"cause":null}}}}}
sccache-scheduler.conf
public_addr = "[::1]:10600"
[client_auth]
type = "token"
token = "~~~"
[server_auth]
type = "jwt_hs256"
secret_key = "~~~"sccache-server.conf
# This is where client toolchains will be stored.
cache_dir = "/home/daboross/sccache-config/server_cache"
# The maximum size of the toolchain cache, in bytes.
# If unspecified the default is 10GB.
# toolchain_cache_size = 10737418240
# A public IP address and port that clients will use to connect to this builder.
public_addr = "[::1]:10501"
# The URL used to connect to the scheduler (should use https, given an ideal
# setup of a HTTPS server in front of the scheduler)
scheduler_url = "http://[::1]:10600"
[builder]
type = "overlay"
# The directory under which a sandboxed filesystem will be created for builds.
build_dir = "/tmp/build"
# The path to the bubblewrap version 0.3.0+ `bwrap` binary.
bwrap_path = "/usr/bin/bwrap"
[scheduler_auth]
type = "jwt_token"
token = "~~~"client sccache/config
[dist]
scheduler_url = "http://[::1]:10600"
toolchains = []
toolchain_cache_size = 5368709120
[dist.auth]
type = "token"
token = "~~~"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels