开发者社区> 问答> 正文

druid连接数据库报错,配置db.properties写的无错。?报错

11:40:47,779  INFO DubboProtocol:135 -  [DUBBO] disconected from /192.168.1.103:20881,url:dubbo://192.168.1.103:20881/com.pyg.manager.service.BrandService?anyhost=true&application=pyg-manager-web&check=false&codec=dubbo&dubbo=2.8.4&generic=false&heartbeat=60000&interface=com.pyg.manager.service.BrandService&methods=deleteIds,findOne,update,findBrandByPage,findPage,addBrand,findAll&pid=10796&retries=2&revision=0.0.1-SNAPSHOT&side=consumer&timeout=10000000&timestamp=1548733191429, dubbo version: 2.8.4, current host: 192.168.1.103
11:40:50,159  WARN AbstractClient:160 -  [DUBBO] client reconnect to 192.168.1.103:20881 find error . url: dubbo://192.168.1.103:20881/com.pyg.manager.service.BrandService?anyhost=true&application=pyg-manager-web&check=false&codec=dubbo&dubbo=2.8.4&generic=false&heartbeat=60000&interface=com.pyg.manager.service.BrandService&methods=deleteIds,findOne,update,findBrandByPage,findPage,addBrand,findAll&pid=10796&retries=2&revision=0.0.1-SNAPSHOT&side=consumer&timeout=10000000&timestamp=1548733191429, dubbo version: 2.8.4, current host: 192.168.1.103
com.alibaba.dubbo.remoting.RemotingException: client(url: dubbo://192.168.1.103:20881/com.pyg.manager.service.BrandService?anyhost=true&application=pyg-manager-web&check=false&codec=dubbo&dubbo=2.8.4&generic=false&heartbeat=60000&interface=com.pyg.manager.service.BrandService&methods=deleteIds,findOne,update,findBrandByPage,findPage,addBrand,findAll&pid=10796&retries=2&revision=0.0.1-SNAPSHOT&side=consumer&timeout=10000000&timestamp=1548733191429) failed to connect to server /192.168.1.103:20881, error message is:Connection refused: no further information: /192.168.1.103:20881
    at com.alibaba.dubbo.remoting.transport.netty.NettyClient.doConnect(NettyClient.java:141)
    at com.alibaba.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:280)
    at com.alibaba.dubbo.remoting.transport.AbstractClient$1.run(AbstractClient.java:145)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.ConnectException: Connection refused: no further information: /192.168.1.103:20881
    at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779)
    at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150)
    at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
    at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
    at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
    ... 3 more

展开
收起
爱吃鱼的程序员 2020-06-06 10:01:24 450 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>IP和端口号正确嘛?</p>
                    
    
                        <pre>你这dubbo配置写错了吧
    

    <!-- 使用zookeeper注册中心暴露服务地址 --> <dubbo:registry address="zookeeper://192.168.124.131:2181" /> <!-- 用dubbo协议在20881端口暴露服务 --> <dubbo:protocol name="dubbo" port="20881" />

    2020-06-06 10:01:42
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
2022 DTCC-阿里云一站式数据库上云最佳实践 立即下载
云时代的数据库技术趋势 立即下载
超大型金融机构国产数据库全面迁移成功实践 立即下载