Default host IP lookup order:
LocalHost.getLocalHost().127. * loopback address, then scan the network for host IPRegistered address if it is not correct, such as the need to register public address, you can do this:
edit /etc/hosts : add machinename and public ip, such as:
test1 205.182.23.201
in dubbo.xml add host address configuration:
<dubbo:protocol host="205.182.23.201">
or config that in dubbo.properties:
dubbo.protocol.host=205.182.23.201
The default port and protocol:
| Protocol | Port |
|---|---|
| dubbo | 20880 |
| rmi | 1099 |
| http | 80 |
| hessian | 80 |
| webservice | 80 |
| memcached | 11211 |
| redis | 6379 |
You can configure the port as follows:
in dubbo.xml add port configuration:
<dubbo:protocol name="dubbo" port="20880">
or config that in dubbo.properties:
dubbo.protocol.dubbo.port=20880