aboutsummaryrefslogtreecommitdiff
path: root/weed/command/filer.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-03-11 14:02:39 -0800
committerchrislu <chris.lu@gmail.com>2022-03-11 14:02:39 -0800
commit3a6eb8ca5ff6a8f3fbe76933847c0b804c26ba2a (patch)
tree18447926c32f7a8a7673137cb4d9bdd2fdc87845 /weed/command/filer.go
parent728bf50a731c2a171e4ca969f474a5565160a53a (diff)
downloadseaweedfs-3a6eb8ca5ff6a8f3fbe76933847c0b804c26ba2a.tar.xz
seaweedfs-3a6eb8ca5ff6a8f3fbe76933847c0b804c26ba2a.zip
default bind to one ip address
fix https://github.com/chrislusf/seaweedfs/issues/1937
Diffstat (limited to 'weed/command/filer.go')
-rw-r--r--weed/command/filer.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/command/filer.go b/weed/command/filer.go
index 9fb6191a7..d48e19873 100644
--- a/weed/command/filer.go
+++ b/weed/command/filer.go
@@ -60,7 +60,7 @@ func init() {
f.mastersString = cmdFiler.Flag.String("master", "localhost:9333", "comma-separated master servers")
f.collection = cmdFiler.Flag.String("collection", "", "all data will be stored in this default collection")
f.ip = cmdFiler.Flag.String("ip", util.DetectedHostAddress(), "filer server http listen ip address")
- f.bindIp = cmdFiler.Flag.String("ip.bind", "", "ip address to bind to")
+ f.bindIp = cmdFiler.Flag.String("ip.bind", "", "ip address to bind to. If empty, default to same as -ip option.")
f.port = cmdFiler.Flag.Int("port", 8888, "filer server http listen port")
f.portGrpc = cmdFiler.Flag.Int("port.grpc", 0, "filer server grpc listen port")
f.publicPort = cmdFiler.Flag.Int("port.readonly", 0, "readonly port opened to public")
@@ -188,6 +188,9 @@ func (fo *FilerOptions) startFiler() {
if *fo.portGrpc == 0 {
*fo.portGrpc = 10000 + *fo.port
}
+ if *fo.bindIp == "" {
+ *fo.bindIp = *fo.ip
+ }
defaultLevelDbDirectory := util.ResolvePath(*fo.defaultLevelDbDirectory + "/filerldb2")