diff --git a/weed/command/server.go b/weed/command/server.go index 1c6439edc..87f404ed3 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -121,13 +121,17 @@ func runServer(cmd *Command, args []string) bool { *isStartingFiler = true } + _, peerList := checkPeers(*serverIp, *masterOptions.port, *masterOptions.peers) + peers := strings.Join(peerList, ",") + masterOptions.peers = &peers + masterOptions.ip = serverIp masterOptions.ipBind = serverBindIp - filerOptions.masters = masterOptions.peers + filerOptions.masters = &peers filerOptions.ip = serverBindIp serverOptions.v.ip = serverIp serverOptions.v.bindIp = serverBindIp - serverOptions.v.masters = masterOptions.peers + serverOptions.v.masters = &peers serverOptions.v.idleConnectionTimeout = serverTimeout serverOptions.v.dataCenter = serverDataCenter serverOptions.v.rack = serverRack