当前位置: 首页 > news >正文

dubbo启动提示端口号已经被占用

本地dubbo项目启动提示:


java.lang.IllegalStateException: Failed to load ApplicationContext

    at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132)
    at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123)
    at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
    at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
    at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:244)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: com.alibaba.dubbo.rpc.RpcException: Fail to start server(url: dubbo://192.168.8.2:20880/geex.fundApply.service.front.FrontVCardApplyService?anyhost=true&application=geex-apply-hrj&bind.ip=192.168.8.2&bind.port=20880&channel.readonly.sent=true&codec=dubbo&dubbo=2.6.0&generic=false&group=HRJ31&heartbeat=60000&interface=geex.fundApply.service.front.FrontVCardApplyService&logger=slf4j&methods=apply,creditResultQuery,applyResultQuery,applyAuditResultQuery&owner=vector&pid=8012&retries=0&revision=2.6.7&side=provider&timeout=120000&timestamp=1698027152346) Failed to bind NettyServer on /192.168.8.2:20880, cause: Failed to bind to: /0.0.0.0:20880
    at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:277)
    at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.openServer(DubboProtocol.java:254)
    at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.export(DubboProtocol.java:241)
    at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:68)
    at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:93)
    at com.alibaba.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
    at com.alibaba.dubbo.registry.integration.RegistryProtocol.doLocalExport(RegistryProtocol.java:181)
    at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:121)
    at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:66)
    at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:91)
    at com.alibaba.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
    at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:505)
    at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:357)
    at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:316)
    at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:215)
    at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:121)
    at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:50)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:898)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
    at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:120)
    at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)
    at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)
    ... 24 more
Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to bind NettyServer on /192.168.8.2:20880, cause: Failed to bind to: /0.0.0.0:20880
    at com.alibaba.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:68)
    at com.alibaba.dubbo.remoting.transport.netty.NettyServer.<init>(NettyServer.java:61)
    at com.alibaba.dubbo.remoting.transport.netty.NettyTransporter.bind(NettyTransporter.java:31)
    at com.alibaba.dubbo.remoting.Transporter$Adaptive.bind(Transporter$Adaptive.java)
    at com.alibaba.dubbo.remoting.Transporters.bind(Transporters.java:56)
    at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchanger.bind(HeaderExchanger.java:42)
    at com.alibaba.dubbo.remoting.exchange.Exchangers.bind(Exchangers.java:70)
    at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:275)
    ... 54 more
Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:20880
    at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:303)
    at com.alibaba.dubbo.remoting.transport.netty.NettyServer.doOpen(NettyServer.java:92)
    at com.alibaba.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:63)
    ... 61 more
Caused by: java.net.BindException: Address already in use: bind
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.bind(NioServerSocketPipelineSink.java:148)
    at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleServerSocket(NioServerSocketPipelineSink.java:100)
    at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:74)
    at org.jboss.netty.channel.Channels.bind(Channels.java:468)
    at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:192)
    at org.jboss.netty.bootstrap.ServerBootstrap$Binder.channelOpen(ServerBootstrap.java:348)
    at org.jboss.netty.channel.Channels.fireChannelOpen(Channels.java:176)
    at org.jboss.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:85)
    at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:142)
    at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:90)
    at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:282)
    ... 63 more

是因为20880端口号已经被占用了,所以只要关闭该端口号重启dubbo服务即可。

1.Win+R键输入cmd,输入 netstat -ano |finstr 20880 找到对应的进程号

2.强制杀死进程:taskkill /f /t /im 进程号

3.重新启动dubbo服务即可。

相关文章:

dubbo启动提示端口号已经被占用

本地dubbo项目启动提示&#xff1a; java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132) at org.sp…...

LeetCode每日一题——2678. Number of Senior Citizens

文章目录 一、题目二、题解 一、题目 You are given a 0-indexed array of strings details. Each element of details provides information about a given passenger compressed into a string of length 15. The system is such that: The first ten characters consist o…...

按摩 推拿上门服务小程序源码 家政上门服务系统源码

按摩 推拿上门服务小程序源码 家政上门服务系统源码 上门服务系统是一款基于互联网和移动应用的高端家政服务预订平台&#xff0c;它集成了用户、服务员、客户三方的需求于一体&#xff0c;为广大市民提供方便、高效、安全、舒适的家居服务体验&#xff0c;让你在家当皇帝&…...

排列排序问题---2023 年华中科技大学程序设计竞赛新生赛

解析&#xff1a; 将序列分为多段&#xff0c;每段必须连续并且单调&#xff0c;输出段数-1即可 #include<bits/stdc.h> using namespace std; #define int long long const int N1e65; int n,a[N]; signed main(){scanf("%lld",&n);for(int i1;i<n;i)…...

数据恢复怎么做?记好这款堪比数据恢复专家的软件!

“我真的受够了数据总是莫名其妙丢失了&#xff01;但是我的电脑知识又很有限&#xff0c;文件丢失后我都不知道应该采取什么方法来进行恢复。谁能给我介绍一些方法呀&#xff1f;” 数据丢失是一场噩梦&#xff0c;无论是因为误删除、硬盘损坏、病毒攻击还是其他原因。然而&am…...

远程监控高并发高吞吐java进程

文章目录 背景工具jconsole和jvisualvm 压测实战以太坊Java程序监控1.使用jconsole监控2.使用jvisualvm监控 问题分析堆内存使用异常通过调整内存策略来应对&#xff1a; 交易虚增问题 背景 作为使用java技术栈的金融类公司&#xff0c;确保Java程序在生产环境中的稳定性和性能…...

MapperStruct实现类为空

​ 问题描述&#xff1a; MapperStruct生成的实现了为空 按照在MapperStruct官网Installation – MapStruct中的方法配置后&#xff0c;生成的实现了是空的&#xff0c;如下&#xff1a; Overridepublic DeployHistory toEntity(DeployHistoryDto arg0) {if ( arg0 null ) …...

【webpack】wabpack5 知识梳理

1、简单介绍 默认功能 可处理 js、json文件&#xff0c;处理 js 文件引入将其打包&#xff1b; 可处理字体、图片、音视频等静态资源&#xff08;webpack5有内置loader&#xff1a;asset&#xff09;&#xff1b; 将es6的import规范编译为浏览器可识别的commonjs规范&#xf…...

ThinkPHP 3.2 常用内置函数

ThinkPHP 3.2 内置函数CDM疑问&#xff1a; D与M方法的相同点与不同点IAR 内置函数 C C方法是用于获取或修改&#xff0c;系统配置参数 语法&#xff1a; 获取&#xff1a;C&#xff08;需要获得的配置参数Name&#xff09; $value C(config_name);设置&#xff1a;C&…...

STM32F4_USB读卡器(USB_Slave)/USB U盘(Host)

前言 STM32F4芯片自带了USB OTG FS&#xff08;FS&#xff0c;即全速&#xff0c;12Mbps&#xff09;和USB OTG HS&#xff0c;支持USB Host和USB Device。 1. USB简介 USB&#xff0c;是英文Universal Serial BUS&#xff08;通用串行总线&#xff09;的缩写&#xff0c;是一…...

【网络安全入门】学习网络安全必须知道的100 个网络基础知识

前言 先领取资料再阅读哦 【282G】网络安全&黑客技术零基础到进阶全套学习大礼包&#xff08;附面试题答案&#xff09;&#xff0c;免费分享&#xff01; 【282G】网络安全&黑客技术零基础到进阶全套学习大礼包&#xff08;附面试题答案&#xff09;&#xff0c;免…...

96核的AMD锐龙Threadripper PRO 7995WX性能如何?

AMD新推出的锐龙Threadripper 7000系列可以说是目前最快的工作站处理器&#xff0c;最顶级的锐龙Threadripper PRO 7995WX拥有96个Zen 4内核&#xff0c;共192线程&#xff0c;基础频率2.5GHz&#xff0c;加速频率5.15GHz&#xff0c;拥有384MB L3缓存和多达128条PCI-E 5.0通道…...

TS和JS的区别

1.TS和JS的区别 ts 是js的超集。 从执行环境上来看&#xff0c;浏览器、node.js 可以直接执行js,但不能执行ts;编译层面&#xff0c;Ts 有编译阶段&#xff0c;js 没有&#xff0c;只有转译阶段和lint阶段&#xff1b;ts更难写一点&#xff0c;但类型更安全。ts 代码写出来就是…...

顺序栈的实现----数据结构

栈的概念 对于栈&#xff08;Stack&#xff09;&#xff0c;后进先出&#xff08;Last In First Out&#xff0c;LIFO&#xff09;&#xff0c;栈也是一种线性表&#xff0c;只不过是一种操作受限的线性表&#xff0c;只能在一端操作&#xff0c;也就是不允许在中间进行查找、…...

k8s calico 网络原理

一、cluster ip Cluster IP 是 Kubernetes 中 Service 的 IP 地址&#xff0c;它是一个虚拟 IP 地址&#xff0c;用于集群内的 Pod 相互通信。 例如&#xff1a; Cluster IP&#xff1a;2.2.2.2负载的真实Pod IP&#xff1a;1.1.1.1 场景&#xff1a; Pod A 的 IP 地址是 …...

【Python学习笔记】循环

Python中有两种类型的循环: while 循环 和 for 循环 1. while 循环 while循环是&#xff1a; 检查一个条件表达式&#xff0c;只要条件表达式计算结果为True 时&#xff0c; 就执行下面缩进的代码。 如此反复&#xff0c;直到条件表达式计算结果为False时&#xff0c;结束 循…...

1 如何入门TensorFlow

近年来人工智能的火爆吸引了很多人&#xff0c;网上相关的热门课程报名的人很多&#xff0c;但是坚持下去的人却少。那些晦涩的原理没有一定知识的积累很难能理解。 如果你对人工智能感兴趣&#xff0c;且想利用人工智能去实现某项功能&#xff0c;而不是对人工智能本身感兴趣&…...

QTday02(常用类、UI界面下的开发、信号与槽)

今日任务 1. 使用手动连接&#xff0c;将登录框中的取消按钮使用qt4版本的连接到自定义的槽函数中&#xff0c;在自定义的槽函数中调用关闭函数 将登录按钮使用qt5版本的连接到自定义的槽函数中&#xff0c;在槽函数中判断ui界面上输入的账号是否为"admin"&#x…...

自然语言处理---RNN经典案例之使用seq2seq实现英译法

1 seq2seq介绍 1.1 seq2seq模型架构 seq2seq模型架构分析&#xff1a; seq2seq模型架构&#xff0c;包括两部分分别是encoder(编码器)和decoder(解码器)&#xff0c;编码器和解码器的内部实现都使用了GRU模型&#xff0c;这里它要完成的是一个中文到英文的翻译&#xff1a;欢迎…...

Python【判断列表的存在与否关系】

要求&#xff1a;使用列表判断一个列表是否在另外一个列表中 代码如下&#xff1a; list1 [1, 2, 6, 8, 7, 10, 5] print("列表1为&#xff1a;", list1) list2 [2, 6, 5, 10] print("列表2为&#xff1a;",list2) res False a 0 for i in list2:if …...

后进先出(LIFO)详解

LIFO 是 Last In, First Out 的缩写&#xff0c;中文译为后进先出。这是一种数据结构的工作原则&#xff0c;类似于一摞盘子或一叠书本&#xff1a; 最后放进去的元素最先出来 -想象往筒状容器里放盘子&#xff1a; &#xff08;1&#xff09;你放进的最后一个盘子&#xff08…...

使用docker在3台服务器上搭建基于redis 6.x的一主两从三台均是哨兵模式

一、环境及版本说明 如果服务器已经安装了docker,则忽略此步骤,如果没有安装,则可以按照一下方式安装: 1. 在线安装(有互联网环境): 请看我这篇文章 传送阵>> 点我查看 2. 离线安装(内网环境):请看我这篇文章 传送阵>> 点我查看 说明&#xff1a;假设每台服务器已…...

设计模式和设计原则回顾

设计模式和设计原则回顾 23种设计模式是设计原则的完美体现,设计原则设计原则是设计模式的理论基石, 设计模式 在经典的设计模式分类中(如《设计模式:可复用面向对象软件的基础》一书中),总共有23种设计模式,分为三大类: 一、创建型模式(5种) 1. 单例模式(Sing…...

Linux 文件类型,目录与路径,文件与目录管理

文件类型 后面的字符表示文件类型标志 普通文件&#xff1a;-&#xff08;纯文本文件&#xff0c;二进制文件&#xff0c;数据格式文件&#xff09; 如文本文件、图片、程序文件等。 目录文件&#xff1a;d&#xff08;directory&#xff09; 用来存放其他文件或子目录。 设备…...

【Java学习笔记】Arrays类

Arrays 类 1. 导入包&#xff1a;import java.util.Arrays 2. 常用方法一览表 方法描述Arrays.toString()返回数组的字符串形式Arrays.sort()排序&#xff08;自然排序和定制排序&#xff09;Arrays.binarySearch()通过二分搜索法进行查找&#xff08;前提&#xff1a;数组是…...

vue3 定时器-定义全局方法 vue+ts

1.创建ts文件 路径&#xff1a;src/utils/timer.ts 完整代码&#xff1a; import { onUnmounted } from vuetype TimerCallback (...args: any[]) > voidexport function useGlobalTimer() {const timers: Map<number, NodeJS.Timeout> new Map()// 创建定时器con…...

多模态大语言模型arxiv论文略读(108)

CROME: Cross-Modal Adapters for Efficient Multimodal LLM ➡️ 论文标题&#xff1a;CROME: Cross-Modal Adapters for Efficient Multimodal LLM ➡️ 论文作者&#xff1a;Sayna Ebrahimi, Sercan O. Arik, Tejas Nama, Tomas Pfister ➡️ 研究机构: Google Cloud AI Re…...

SpringTask-03.入门案例

一.入门案例 启动类&#xff1a; package com.sky;import lombok.extern.slf4j.Slf4j; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cache.annotation.EnableCach…...

服务器--宝塔命令

一、宝塔面板安装命令 ⚠️ 必须使用 root 用户 或 sudo 权限执行&#xff01; sudo su - 1. CentOS 系统&#xff1a; yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh2. Ubuntu / Debian 系统…...

技术栈RabbitMq的介绍和使用

目录 1. 什么是消息队列&#xff1f;2. 消息队列的优点3. RabbitMQ 消息队列概述4. RabbitMQ 安装5. Exchange 四种类型5.1 direct 精准匹配5.2 fanout 广播5.3 topic 正则匹配 6. RabbitMQ 队列模式6.1 简单队列模式6.2 工作队列模式6.3 发布/订阅模式6.4 路由模式6.5 主题模式…...