-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
sometimes dubbo can choose wrong IP which hangs brave's integration test. #1557
Comments
Dubbo will try to retrieve ip in the following orders:
As for guessing approach, Dubbo almost uses the same approach as zipkin/brave does: https://github.com/openzipkin/brave/blob/master/brave/src/main/java/brave/internal/Platform.java#L63, except for it does not check The deploy environment for dubbo varies, we highly recommend rely on the first two approaches, specifying the ip you want explicitly can be the best way, avoid guessing as it's unpredictable. In a docker environment, bind the docker ip or host ip can depends, leave the choice to users. |
PS I think what you have is ok (except accidentally guessing docker IP when
not in a docker container), but I will offer advice.
We want people to test dubbo, like do good testing in junit etc. Making a
special flag to allow loopback for test only would be a very nice feature
and avoid all of this. Right now, it is impossible to use loopback in tests
due to production concerns that don't have anything to do with tests.
|
Good advice, we will take look at it. |
Adrian Cole @adriancole mentions on gitter.im:
fyi I noticed sometimes dubbo can choose wrong IP. for example hangs our integration tests openzipkin/brave#680
we use this approach when guessing
https://github.com/openzipkin/brave/blob/master/brave/src/main/java/brave/internal/Platform.java#L63
anyway not sure it breaks other people as unit tests are one thing.. production use another
If I debugged right, we were getting this one which accidentally chose docker IP so hung trying to connect https://github.com/apache/incubator-dubbo/blob/master/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java#L193
but also depends a lot on my network. ex only happens sometimes (I change network a lot)
The text was updated successfully, but these errors were encountered: