Closed rweland closed 2 years ago
I found this post in the golang issues https://github.com/golang/go/issues/9334 which seems to be a long standing issue with the net package of golang. The issue doesn't appear to be going anywhere at the moment.
I found a similar issue in echo servers history https://github.com/labstack/echo/issues/1658. Their solution was to add the aforementioned configuration setting I referenced in the issue. I think that may be the solution to go with.
I have put in a PR #21 to add transport as a config setting for api, grpc, and rest if that is the direction we want to take.
PR Merged
My Setup: 1 Node k3s deployment on IPv4 ONLY lab network Other workloads up and working as expected KubeMQ Community latest release (as of 2/25/22) deployed using default config
What happens: When the community edition is deployed it starts, however all listeners only bind to the containers IPv6 address. This makes it impossible to connect to the container with the CLI from an IPv4 network.
What's expected: Listeners should bind to both IPv4 and IPv6 interfaces.
Digging in the code, the raw TCP socket listeners appear to be correctly setting the bind port according to the
net.Listen
documentation. As well the echo servers appear to be setup correctly as well. Ref: grpc/server.go:111lis, err := net.Listen("tcp", fmt.Sprintf(":%d", port))
Ref: rest/server.go:172_ = s.echoWebServer.Start(fmt.Sprintf(":%d", conf.Port))
However as seen from the startup log output, it appears to ignore this.
This is confirmed by remoting into the container and listing the bound ipv4 and ipv6 ports Open IPv4 ports
Open IPv6 ports
Things I've tried:
ListenerNetwork
for echo servers totcp
The only thing that has successfully allowed the project to bind on ipv4 was to set the first param of Listen and the
ListenerNetwork
property of the echo servers totcp4
, which of course forced IPv4 only.2022-02-26T03:00:41.577Z INFO ⇨ http server started on 0.0.0.0:9090
I've run out of things to try to allow both ipv4 and ipv6, any ideas?