xiaolin310 opened a new issue, #1933:
URL: https://github.com/apache/incubator-brpc/issues/1933

   **Describe the bug (描述bug)**
   I use following `channel Init` API to resolve full dns hostname.
   ```c++
   
   std::string naming_service_url("http://myhost0.local:8002";);
   const char *load_balancer_name = "random";
   brpc::Channel channel;
   if (0 != channel.Init(naming_service_url.c_str(), load_balancer_name, 
nullptr) )
   {
      xxxxxx
   }
   
   ```
   Another two hosts called `myhost1.local`, `myhost2.local` , use above API to 
init brpc channel.
   But got following logs,
   ```
   I0923 09:32:26.908915    29 
/data/workspace/brpc/src/brpc/details/naming_service_thread.cpp:202] 
brpc::policy::DomainNamingService("myhost0.local:8002"): added 1
   W0923 09:32:30.874791    54 
/data/workspace/brpc/src/brpc/details/naming_service_thread.cpp:305] 
`http://myhost0.local:8002' is empty! RPC over the channel will fail until 
servers appear
   W0923 09:32:35.877102    54 
/data/workspace/brpc/src/brpc/details/naming_service_thread.cpp:305] 
`http://myhost0.local:8002' is empty! RPC over the channel will fail until 
servers appear
   W0923 09:32:40.879414    54 
/data/workspace/brpc/src/brpc/details/naming_service_thread.cpp:305] 
`http://myhost0.local:8002' is empty! RPC over the channel will fail until 
servers appear
   W0923 09:32:45.881746    54 
/data/workspace/brpc/src/brpc/details/naming_service_thread.cpp:305] 
`http://myhost0.local:8002' is empty! RPC over the channel will fail until 
servers appear
   W0923 09:32:50.884365    54 
/data/workspace/brpc/src/brpc/details/naming_service_thread.cpp:305] 
`http://myhost0.local:8002' is empty! RPC over the channel will fail until 
servers appear
   W0923 09:32:55.886679    54 
/data/workspace/brpc/src/brpc/details/naming_service_thread.cpp:305] 
`http://myhost0.local:8002' is empty! RPC over the channel will fail until 
servers appear
   W0923 09:33:00.889066    54 
/data/workspace/brpc/src/brpc/details/naming_service_thread.cpp:305] 
`http://myhost0.local:8002' is empty! RPC over the channel will fail until 
servers appear
   W0923 09:33:05.891879    54 
/data/workspace/brpc/src/brpc/details/naming_service_thread.cpp:305] 
`http://myhost0.local:8002' is empty! RPC over the channel will fail until 
servers appear
   W0923 09:33:10.894347    54 
/data/workspace/brpc/src/brpc/details/naming_service_thread.cpp:305] 
`http://myhost0.local:8002' is empty! RPC over the channel will fail until 
servers appear
   ```
   It seems that the other two hosts has resolved the host, but still print 
`empty` cyclically.
   There are also other three port served on host`myhost0.local` named `8000, 
8001, 8003`, but those are resolved well since there is nothing to print 
cyclically as above. 
   By the way, the dns name `myhost0.local:8002` could be resolved by command 
shell (`nslookup` or `telnet`) in terminal on the other two hosts.
   
   **To Reproduce (复现方法)**
   
   
   **Expected behavior (期望行为)**
   
   
   **Versions (各种版本)**
   OS: ubuntu 20.04
   Compiler: gcc
   brpc: master  d0b71ffc34b73cbec39cd9773b01137f85b4ffde
   protobuf: 3.6.1
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to