|
|
@ -18,6 +18,7 @@ package cmd |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"context" |
|
|
|
"context" |
|
|
|
|
|
|
|
"crypto/tls" |
|
|
|
"errors" |
|
|
|
"errors" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"net" |
|
|
|
"net" |
|
|
@ -31,6 +32,7 @@ import ( |
|
|
|
"github.com/minio/minio/cmd/config" |
|
|
|
"github.com/minio/minio/cmd/config" |
|
|
|
xhttp "github.com/minio/minio/cmd/http" |
|
|
|
xhttp "github.com/minio/minio/cmd/http" |
|
|
|
"github.com/minio/minio/cmd/logger" |
|
|
|
"github.com/minio/minio/cmd/logger" |
|
|
|
|
|
|
|
"github.com/minio/minio/cmd/rest" |
|
|
|
"github.com/minio/minio/pkg/auth" |
|
|
|
"github.com/minio/minio/pkg/auth" |
|
|
|
"github.com/minio/minio/pkg/bucket/bandwidth" |
|
|
|
"github.com/minio/minio/pkg/bucket/bandwidth" |
|
|
|
"github.com/minio/minio/pkg/certs" |
|
|
|
"github.com/minio/minio/pkg/certs" |
|
|
@ -137,6 +139,11 @@ func serverHandleCmdArgs(ctx *cli.Context) { |
|
|
|
globalEndpoints, setupType, err = createServerEndpoints(globalCLIContext.Addr, serverCmdArgs(ctx)...) |
|
|
|
globalEndpoints, setupType, err = createServerEndpoints(globalCLIContext.Addr, serverCmdArgs(ctx)...) |
|
|
|
logger.FatalIf(err, "Invalid command line arguments") |
|
|
|
logger.FatalIf(err, "Invalid command line arguments") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
globalProxyEndpoints = GetProxyEndpoints(globalEndpoints) |
|
|
|
|
|
|
|
globalInternodeTransport = newInternodeHTTPTransport(&tls.Config{ |
|
|
|
|
|
|
|
RootCAs: globalRootCAs, |
|
|
|
|
|
|
|
}, rest.DefaultTimeout)() |
|
|
|
|
|
|
|
|
|
|
|
// On macOS, if a process already listens on LOCALIPADDR:PORT, net.Listen() falls back
|
|
|
|
// On macOS, if a process already listens on LOCALIPADDR:PORT, net.Listen() falls back
|
|
|
|
// to IPv6 address ie minio will start listening on IPv6 address whereas another
|
|
|
|
// to IPv6 address ie minio will start listening on IPv6 address whereas another
|
|
|
|
// (non-)minio process is listening on IPv4 of given port.
|
|
|
|
// (non-)minio process is listening on IPv4 of given port.
|
|
|
@ -396,10 +403,6 @@ func serverMain(ctx *cli.Context) { |
|
|
|
// Initialize all sub-systems
|
|
|
|
// Initialize all sub-systems
|
|
|
|
newAllSubsystems() |
|
|
|
newAllSubsystems() |
|
|
|
|
|
|
|
|
|
|
|
var err error |
|
|
|
|
|
|
|
globalProxyEndpoints, err = GetProxyEndpoints(globalEndpoints) |
|
|
|
|
|
|
|
logger.FatalIf(err, "Invalid command line arguments") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
globalMinioEndpoint = func() string { |
|
|
|
globalMinioEndpoint = func() string { |
|
|
|
host := globalMinioHost |
|
|
|
host := globalMinioHost |
|
|
|
if host == "" { |
|
|
|
if host == "" { |
|
|
|