启动dubbo服务时,报此错误:
com.alibaba.dubbo.rpc.RpcException:
Fail to start server(url: dubbo://192.178.103.223:20880/com.locat.server.DemoService?anyhost=true&application=demo-provider&channel.readonly.sent=true&codec=dubbo&dubbo=2.5.4&heartbeat=60000&interface=com.locat.server.DemoService&methods=sayHello&pid=3804&revision=1.0-SNAPSHOT&side=provider×tamp=1522293965284) Failed to bind NettyServer on /192.178.103.223:20880, cause: Failed to bind to: /0.0.0.0:20880
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:289)
原因分析:
此原因是本地20880端口已被占用,修改dubbo配置文件中的
<dubbo:protocol name="dubbo" port="20880"/>端口号即可.