Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address already in use error when binding ipv6 addresses in 2.95 #2983

Closed
lewisl9029 opened this issue Apr 27, 2022 · 1 comment
Closed

Address already in use error when binding ipv6 addresses in 2.95 #2983

lewisl9029 opened this issue Apr 27, 2022 · 1 comment

Comments

@lewisl9029
Copy link

Describe the bug

I've been running the chrislusf/seaweedfs container at 2.94 for a while now, and recently attempted to upgrade to 3.00, when I ran into the following error:

reflame-storage | F0427 22:17:12     1 master.go:141] Master startup error: listen tcp 127.0.0.1:9333: bind: address already in use
reflame-storage | goroutine 56 [running]:
reflame-storage | github.com/chrislusf/seaweedfs/weed/glog.stacks(0x0)        
reflame-storage |       /go/src/github.com/chrislusf/seaweedfs/weed/glog/glog.go:767 +0x8a
reflame-storage | github.com/chrislusf/seaweedfs/weed/glog.(*loggingT).output(0x3ccebc0, 0x3, 0xc0003f8000, {0x2e99990, 0xc000593df0}, 0x1, 0x0)
reflame-storage |       /go/src/github.com/chrislusf/seaweedfs/weed/glog/glog.go:718 +0x3ab
reflame-storage | github.com/chrislusf/seaweedfs/weed/glog.(*loggingT).printf(0x7fff3b836f36, 0x9, {0x23f2519, 0x18}, {0xc000593df0, 0x1, 0x1})
reflame-storage |       /go/src/github.com/chrislusf/seaweedfs/weed/glog/glog.go:656 +0x110
reflame-storage | github.com/chrislusf/seaweedfs/weed/glog.Fatalf(...)        
reflame-storage |       /go/src/github.com/chrislusf/seaweedfs/weed/glog/glog.go:1149
reflame-storage | github.com/chrislusf/seaweedfs/weed/command.startMaster({0xc000146fb8, 0xc000146fd0, 0xc0005ee2a0, 0xc0005ee2c0, 0xc0005eed70, 0xc0009b4d00, 0xc000146fd8, 0xc000146fed, 0xc0005eed90, 0xc000146ff8, ...}, ...)
reflame-storage |       /go/src/github.com/chrislusf/seaweedfs/weed/command/master.go:141 +0x2fc
reflame-storage | created by github.com/chrislusf/seaweedfs/weed/command.runServer
reflame-storage |       /go/src/github.com/chrislusf/seaweedfs/weed/command/server.go:288 +0x68d

I went backwards and found that the error started occurring at 2.95, and from the changelog, this line seemed like the most obvious culprit:

Master, Filer, S3, IAM also bind to localhost, in addition to -ip.bind. This should avoid exposing to all network interfaces while make most common use cases easy.

I need to bind to ipv6 for proper networking on https://fly.io/, so this is blocking my upgrade. Let me know if there's something wrong with my configuration, and if you're aware of any workarounds. Thanks!

System Setup

Here's a dockerfile to reproduce:

FROM chrislusf/seaweedfs:2.95

EXPOSE 58088

WORKDIR /app

COPY filer.toml /app/filer.toml

ENTRYPOINT [ "weed", "server", "-ip.bind=[::]", "-dir=/data", "-filer=true", "-filer.port=8888", "-master.port=9333", "-volume.port=8080" ]

Here's the content of filer.toml:

[leveldb3]
enabled = true
dir = "/data/filer-leveldb3"		

Expected behavior
Seaweed starts without errors.

Other than this small glitch, seaweed has been working like a dream! Thank you so much for your work on it!

@chrislusf
Copy link
Collaborator

Thanks! Added a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants