-
Notifications
You must be signed in to change notification settings - Fork 0
minio minio Allow binding to available addresses. If no binding is possible then fail otherwise proceed silently
Allan Roger Reid edited this page Jan 25, 2023
·
1 revision
Status: Open
https://github.com/minio/minio/pull/16388
https://github.com/minio/minio/issues/16305
Linux version A
ubuntu@minio:~$ uname -a
Linux minio 5.4.0-136-generic #153-Ubuntu SMP Thu Nov 24 15:59:04 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
go version
ubuntu@minio:~/minio$ go version
go version go1.19.4 linux/arm64
MacOS B
➜ ~ uname -a
Darwin Allans-MBP 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 arm64
go version
➜ ~ go version
go version go1.19.4 darwin/arm64
Allow binding to available addresses. If no binding is possible then report failure otherwise proceed silently Fixes: https://github.com/minio/minio/issues/16305
Even though user may not have ipv6 interfaces defined, on lo0 for example ifconfig lo0
, dns may be listening ipv6 sudo lsof -i :53 -S
. In this case, minio attempts to bind to that unbindable ipv6 address [::1]
and is unable to start. It fails with error:
Error: listen tcp [::1]:9000: bind: can't assign requested address (*net.OpError)
- Clone, checkout and build minio:master
git clone https://github.com/minio/minio.git
cd minio
git checkout master
make build
go install -v
- Temporarily disable ipv6: A
ip addr show
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
ip addr show
B
sudo ifconfig lo0 inet6 ::1 delete
- Run minio server with:
minio server --address "localhost:9000" --console-address "localhost:9090" <some empty folder>
- Observe failure
Error: listen tcp [::1]:9000: bind: can't assign requested address (*net.OpError)
A

B

- Pull, checkout and build fix
git clone https://github.com/allanrogerr/minio.git
cd minio
git pull --all
git checkout handle-unsupported-ipv6
make build
go install -v
- Run minio server with:
minio server --address "localhost:9000" --console-address "localhost:9090" <some empty folder>
- Observe no failure
- Revert ipv6 interface from Lo0: A
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
B
sudo ifconfig lo0 inet6 ::1 add
- Run minio server with:
minio server --address "localhost:9000" --console-address "localhost:9090" <some empty folder>

- Observe no failure