diff --git a/pkg/config/config.go b/pkg/config/config.go index 513b0ae00..059e59497 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1520,6 +1520,11 @@ func (cli *CLI) CheckConfig() error { errs = append(errs, fmt.Errorf("--signing-key: %w", err)) } } + if cli.DisableSyndication && len(cli.Peers) > 0 { + // A node pushing to peers announces its streams, then refuses every + // subscription to them with syndication off: the peers retry forever. + errs = append(errs, fmt.Errorf("--peers pushes this node's streams, which --disable-syndication refuses to serve; drop one of them")) + } if err := cli.validateVODCDN(); err != nil { errs = append(errs, err) } diff --git a/pkg/config/config_check_test.go b/pkg/config/config_check_test.go index 0534ffc52..bcfa1f1c3 100644 --- a/pkg/config/config_check_test.go +++ b/pkg/config/config_check_test.go @@ -59,6 +59,10 @@ func TestCheckConfig(t *testing.T) { bad(CLI{TranscodeRenditions: "not-a-rendition", FirebaseServiceAccountFile: filepath.Join(t.TempDir(), "nope.json")}, "--transcode-renditions", "--firebase-service-account-file") + // Pushing to peers needs syndication: a pushing node refuses the peers' + // subscriptions without it. + bad(CLI{DataDir: t.TempDir(), DisableSyndication: true, Peers: []string{"https://peer.example"}}, + "--peers", "--disable-syndication") // Multiple problems are reported together, not one at a time. multi := CLI{LivepeerGateway: true, LivepeerGatewayURL: "http://127.0.0.1:8935",