zoukankan      html  css  js  c++  java
  • Failed to bind NettyServer on /10.254.4.57:20880, cause: Failed to bind to: /0.0.0.0:20880 配置dubbo遇到的问题

    早上重新配置了一下dubbo,报了这个异常

    Initialization of bean failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Fail to start server
    
    ...
    
    Failed to bind NettyServer on /10.254.4.57:20880, cause: Failed to bind to: /0.0.0.0:20880

    无法绑定,找半天发现是端口冲突,起了两个提供者,端口占用,后面把测试的关了就行了,或者把配置里面的端口换一下也行。

    顺带提一下,dubbo起提供者的时候,一定要记得配置一个容器!,这里一般是服务层,配置一个监听器就好了。

    如果注册中心是zookeeper,启动完成后看看控制台有没有zookeeper打印的心跳检测机制。

    web.xml配置:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
             version="3.1">
    
      <welcome-file-list>
        <welcome-file>index.html</welcome-file>
      </welcome-file-list>
    
      <!-- 加载spring容器 -->
      <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:spring-service.xml</param-value>
      </context-param>
      <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
    </web-app>
  • 相关阅读:
    二分题目
    求最小公倍数的最简模板
    用 vue 脚手架 vue-cli 初始化(新建)项目
    电脑没有声音
    node.js 安装步骤
    phpStrom编辑器 通过 git 提交代码到 gitlab
    jq 实现头像(气泡式浮动)
    微信网页授权 、获取用户昵称 头像等信息
    秒格式化 “秒” 为 天 时 分 秒
    改变swiper 按钮swiper-button-next 颜色
  • 原文地址:https://www.cnblogs.com/cmmplb/p/11897056.html
Copyright © 2011-2022 走看看