1. 程式人生 > >Dubbo消費者啟動報錯

Dubbo消費者啟動報錯

報錯如下:172.16.238.68是我的本機ip
[DUBBO] Failed to start NettyClient TS20160418002/172.16.234.102 connect to the server /172.16.238.68:20880 (check == false, ignore and retry later!), cause: client(url:dubbo://172.16.238.68:20880/com.tuhu.future.dubbo.service.DubboInterface?actives=0&anyhost=true&application=provider-test&async=false&check=false&codec=dubbo&dubbo=2.5.7&generic=false&group=test&heartbeat=60000&interface=com.tuhu.future.dubbo.service.DubboInterface&lazy=false&methods=getAllRecords,sayOk,getUserRecord,getNmae&pid=6872&register.ip=172.16.234.102&remote.timestamp=1531879689779&revision=1.0.0&sent=false&side=consumer&timestamp=1531879711858&version=1.0.0) failed to connect to server /172.16.238.68:20880, error message is:connection timed out: /172.16.238.68:20880, dubbo version: 2.5.7, current host: 172.16.234.102

–情況實際是:我本機啟動生產方和消費方沒有問題,測試dubbo服務正常,但是別的機器電腦A作為消費方去呼叫我的生產者服務時,出現以上啟動異常。

解決辦法:
1.電腦A上去ping 我的ip,能否通過,不能通過的話即兩臺機器之間不在同一網路下所以問題的根源不在dubbo的配置上,只需要處於同一網路環境下,那麼就能避免這個問題;如果是在同一個網路下可能是防火牆問題
2.解決方法:將生產方的防火牆關閉