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>
  • 相关阅读:
    verdi issues on license
    geci
    组合数据类型练习
    熟悉常用的Linux操作
    1.大数据概述
    c语言文法分析
    词法分析器#include<stdio.h> #include<string.h> #include<iostream.h> char prog[80],token[8]; char ch; int syn,p,m=0,n,row,sum=0; char *rwtab[6]={"begin","if","then","while","do","end"
    关于编译原理
    可变参数
    函数和指针
  • 原文地址:https://www.cnblogs.com/cmmplb/p/11897056.html
Copyright © 2011-2022 走看看