1
回答
启动多个jboot报错,提示端口占用
开发十年,就只剩下这套Java开发体系了   

在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

 

举报
君子之耀
发帖于2个月前 1回/119阅
顶部