[GitHub] [brpc] leaf-potato commented on issue #2084: my_ip_cstr获取本机ip为127.0.0.1

2023-01-12 Thread GitBox


leaf-potato commented on issue #2084:
URL: https://github.com/apache/brpc/issues/2084#issuecomment-1380558694

   看着挺奇怪的,可能是机器哪儿的配置不对。brpc是调用系统的接口获取hostname后解析ip:
   1. 可能hostname配置了多个ip地址,brpc只会选择第1个返回。
   1. 可以考虑手动将真实的ip写到`/etc/hosts`文件里。


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



[GitHub] [brpc] leaf-potato commented on issue #2084: my_ip_cstr获取本机ip为127.0.0.1

2023-01-12 Thread GitBox


leaf-potato commented on issue #2084:
URL: https://github.com/apache/brpc/issues/2084#issuecomment-1380235911

   机器上执行下面命令看看输出结果是否正常:
   ```bash
   host `hostname`
   ```


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org