From c87358b89bf4235b17eaafd9b6e1898d9e6cea51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 7 Jul 2022 11:57:27 +0200 Subject: [PATCH] Manager: improve error message when unable to create UPnP/SSDP server Rather than just print the error message ("error creating UPnP/SSDP server"), it now explains what the effect is of this error (workers unable to automatically find this Manager) and how to solve it (pass `-manager URL` to the Worker). --- cmd/flamenco-manager/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/flamenco-manager/main.go b/cmd/flamenco-manager/main.go index 406af0fe..c0768c06 100644 --- a/cmd/flamenco-manager/main.go +++ b/cmd/flamenco-manager/main.go @@ -445,7 +445,13 @@ func installSignalHandler(cancelFunc context.CancelFunc) { func makeAutoDiscoverable(urls []url.URL) *upnp_ssdp.Server { ssdp, err := upnp_ssdp.NewServer(log.Logger) if err != nil { - log.Error().Err(err).Msg("error creating UPnP/SSDP server") + strUrls := make([]string, len(urls)) + for idx := range urls { + strUrls[idx] = urls[idx].String() + } + log.Error().Strs("urls", strUrls).Msg("Unable to create UPnP/SSDP server. " + + "This means that Workers will not be able to automatically find this Manager. " + + "Run them with the `-manager URL` argument, picking a URL from this list.") return nil }