开发者社区> 问答> 正文

启动多个jboot报错,提示端口占用?报错

在idea中,启动多个main,端口8080,启动成功了一个,改了另外一个main的启动端口为8090,但是启动后还是抱端口占用的错误。

[DEBUG][2018-08-15 10:17:09][buffer.ByteBufUtil.debug(76)]> -Dio.netty.maxThreadLocalCharBufferSize: 16384
java.lang.RuntimeException: java.net.BindException: Address already in use
	at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:600)
	at io.jboot.server.undertow.UnderTowServer.initUndertowServer(UnderTowServer.java:104)
	at io.jboot.server.undertow.UnderTowServer.start(UnderTowServer.java:192)
	at io.jboot.Jboot.startServer(Jboot.java:168)
	at io.jboot.Jboot.start(Jboot.java:149)
	at io.jboot.Jboot.run(Jboot.java:92)
	at com.jzdoctor.component.system.Application.main(Application.java:82)
Caused by: java.net.BindException: Address already in use
	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 io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:558)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1283)
	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501)
	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486)
	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:989)
	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:254)
	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:365)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
	at java.lang.Thread.run(Thread.java:748)
[ERROR][2018-08-15 10:17:09][undertow.UnderTowServer.start(196)]> can not start undertow with port:8090

 

展开
收起
爱吃鱼的程序员 2020-06-06 15:48:48 622 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>找到问题的原因了,是因为两个应用的如下配置默认都是8000,手动改下即可</p> 
    
    jboot.rpc.defaultPort
    2020-06-06 15:49:01
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载