Repository navigation
Conversation
|
We could make this for test only though. |
| */ | ||
| static InetSocketAddress createBindSocketAddress(String host, int port) { | ||
| return host == null || host.isEmpty() ? | ||
| createSocketAddrForHost(WILDCARD_ADDRESS, port) : createSocketAddrForHost(host, port); |
There was a problem hiding this comment.
@amaliujia , some questions/comments:
-
Could we use JVM option
-Djava.net.preferIPv4Stack=true? -
Some systems may support IPv6 only. Then, this may not work.
-
I suggest to try-catch the binding methods such as ServerBuilder.forPort(port). When it fails, fall back to IPv4 wildcard.
There was a problem hiding this comment.
Sure. try -Djava.net.preferIPv4Stack=true first.
-Djava.net.preferIPv4Stack=true to root pom file for tests
szetszwo
left a comment
There was a problem hiding this comment.
+1 the change looks good
@adoroszlai , could you also take a look?
|
Thanks @amaliujia for working on this. The problem appears only in #1614, which bumps Therefore I propose the following:
Of course should these 2 problems turn out to be Surefire bugs, we can upgrade as soon as they are fixed in Surefire. Mockito error: |
What changes were proposed in this pull request?
When no host is configured, the gRPC and Netty servers build their bind address with new InetSocketAddress(port), which resolves to the IPv6 wildcard ::. On machines without IPv6 support, such as the GitHub Actions Ubuntu runners, the native epoll transport can't bind to that address, so the server fails to start.
Try adding
-Djava.net.preferIPv4Stack=trueto root pom file for tests so have tests use ipv4.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/RATIS-2744
Discovered from the github job: https://github.com/apache/ratis/actions/runs/36123180483/job/108033212253?pr=1614 with the following tracestack:
How was this patch tested?
Existing test