diff --git a/cmd/server-main.go b/cmd/server-main.go index 7b595f665..007d355c1 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -531,19 +531,6 @@ func serverMain(ctx *cli.Context) { } } - if globalBrowserEnabled { - srv, err := initConsoleServer() - if err != nil { - logger.FatalIf(err, "Unable to initialize console service") - } - - setConsoleSrv(srv) - - go func() { - logger.FatalIf(newConsoleServerFn().Serve(), "Unable to initialize console server") - }() - } - newObject, err := newObjectLayer(GlobalContext, globalEndpoints) if err != nil { logFatalErrs(err, Endpoint{}, true) @@ -576,6 +563,19 @@ func serverMain(ctx *cli.Context) { logger.LogIf(GlobalContext, err) } + if globalBrowserEnabled { + srv, err := initConsoleServer() + if err != nil { + logger.FatalIf(err, "Unable to initialize console service") + } + + setConsoleSrv(srv) + + go func() { + logger.FatalIf(newConsoleServerFn().Serve(), "Unable to initialize console server") + }() + } + // Populate existing buckets to the etcd backend if globalDNSConfig != nil { // Background this operation.