在windows idea环境下测试没有问题,但是打jar包到centos环境下,启动时,有时候能成功运行,有时候运行发生连接失败错误。运行失败错误的次数更多一些。
01:22:25 [ioGameThread-2] ERROR c.i.game.bolt.broker.core.client.BrokerClientItem (BrokerClientItem.java:324) - Create connection failed. The address is 10.0.4.15:10200 com.alipay.remoting.exception.RemotingException: Create connection failed. The address is 10.0.4.15:10200 at com.alipay.remoting.DefaultConnectionManager.create(DefaultConnectionManager.java:479) at com.alipay.remoting.DefaultConnectionManager.doCreate(DefaultConnectionManager.java:783) at com.alipay.remoting.DefaultConnectionManager.access$000(DefaultConnectionManager.java:52) at com.alipay.remoting.DefaultConnectionManager$ConnectionPoolCall.call(DefaultConnectionManager.java:710) at com.alipay.remoting.DefaultConnectionManager$ConnectionPoolCall.call(DefaultConnectionManager.java:676) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at com.alipay.remoting.util.RunStateRecordedFutureTask.run(RunStateRecordedFutureTask.java:39) at com.alipay.remoting.DefaultConnectionManager.getConnectionPoolAndCreateIfAbsent(DefaultConnectionManager.java:568) at com.alipay.remoting.DefaultConnectionManager.getAndCreateIfAbsent(DefaultConnectionManager.java:429) at com.alipay.remoting.rpc.RpcClientRemoting.getConnectionAndInitInvokeContext(RpcClientRemoting.java:141) at com.alipay.remoting.rpc.RpcClientRemoting.oneway(RpcClientRemoting.java:53) at com.alipay.remoting.rpc.RpcRemoting.oneway(RpcRemoting.java:91) at com.alipay.remoting.rpc.RpcClient.oneway(RpcClient.java:175) at com.iohao.game.bolt.broker.core.client.BrokerClientItem.send(BrokerClientItem.java:322) at com.iohao.game.bolt.broker.core.client.BrokerClientItem.startup(BrokerClientItem.java:316) at com.iohao.game.bolt.broker.core.client.BrokerClientManager.register(BrokerClientManager.java:109) at com.iohao.game.bolt.broker.core.client.BrokerClientManager.init(BrokerClientManager.java:87) at com.iohao.game.bolt.broker.core.client.BrokerClient.initBrokerClientManager(BrokerClient.java:220) at com.iohao.game.bolt.broker.core.client.BrokerClient.init(BrokerClient.java:158) at com.iohao.game.bolt.broker.client.BrokerClientApplication.start(BrokerClientApplication.java:62) at com.iohao.game.bolt.broker.client.BrokerClientApplication.start(BrokerClientApplication.java:48) at com.iohao.game.external.core.netty.simple.InternalRunOne.lambda$startupLogic$0(InternalRunOne.java:63) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: java.lang.Exception: Create connection to 10.0.4.15:10200 error! at com.alipay.remoting.connection.AbstractConnectionFactory.doCreateConnection(AbstractConnectionFactory.java:338) at com.alipay.remoting.connection.AbstractConnectionFactory.createConnection(AbstractConnectionFactory.java:186) at com.alipay.remoting.DefaultConnectionManager.create(DefaultConnectionManager.java:476) ... 24 common frames omitted Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /10.0.4.15:10200 Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused at io.netty.channel.unix.Errors.newConnectException0(Errors.java:166) at io.netty.channel.unix.Errors.handleConnectErrno(Errors.java:131) at io.netty.channel.unix.Socket.finishConnect(Socket.java:359) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:710) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:687) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:567) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:489) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:397) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.base/java.lang.Thread.run(Thread.java:1583) 01:22:25 [ioGameThread-1] INFO CommonStdout (BrokerServer.java:97) - 启动游戏网关 port: [10200] 启动模式: [单机启动模式 standalone]
在windows idea环境下测试没有问题,但是打jar包到centos环境下,启动时,有时候能成功运行,有时候运行发生连接失败错误。运行失败错误的次数更多一些。
01:22:25 [ioGameThread-2] ERROR c.i.game.bolt.broker.core.client.BrokerClientItem (BrokerClientItem.java:324) - Create connection failed. The address is 10.0.4.15:10200 com.alipay.remoting.exception.RemotingException: Create connection failed. The address is 10.0.4.15:10200 at com.alipay.remoting.DefaultConnectionManager.create(DefaultConnectionManager.java:479) at com.alipay.remoting.DefaultConnectionManager.doCreate(DefaultConnectionManager.java:783) at com.alipay.remoting.DefaultConnectionManager.access$000(DefaultConnectionManager.java:52) at com.alipay.remoting.DefaultConnectionManager$ConnectionPoolCall.call(DefaultConnectionManager.java:710) at com.alipay.remoting.DefaultConnectionManager$ConnectionPoolCall.call(DefaultConnectionManager.java:676) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at com.alipay.remoting.util.RunStateRecordedFutureTask.run(RunStateRecordedFutureTask.java:39) at com.alipay.remoting.DefaultConnectionManager.getConnectionPoolAndCreateIfAbsent(DefaultConnectionManager.java:568) at com.alipay.remoting.DefaultConnectionManager.getAndCreateIfAbsent(DefaultConnectionManager.java:429) at com.alipay.remoting.rpc.RpcClientRemoting.getConnectionAndInitInvokeContext(RpcClientRemoting.java:141) at com.alipay.remoting.rpc.RpcClientRemoting.oneway(RpcClientRemoting.java:53) at com.alipay.remoting.rpc.RpcRemoting.oneway(RpcRemoting.java:91) at com.alipay.remoting.rpc.RpcClient.oneway(RpcClient.java:175) at com.iohao.game.bolt.broker.core.client.BrokerClientItem.send(BrokerClientItem.java:322) at com.iohao.game.bolt.broker.core.client.BrokerClientItem.startup(BrokerClientItem.java:316) at com.iohao.game.bolt.broker.core.client.BrokerClientManager.register(BrokerClientManager.java:109) at com.iohao.game.bolt.broker.core.client.BrokerClientManager.init(BrokerClientManager.java:87) at com.iohao.game.bolt.broker.core.client.BrokerClient.initBrokerClientManager(BrokerClient.java:220) at com.iohao.game.bolt.broker.core.client.BrokerClient.init(BrokerClient.java:158) at com.iohao.game.bolt.broker.client.BrokerClientApplication.start(BrokerClientApplication.java:62) at com.iohao.game.bolt.broker.client.BrokerClientApplication.start(BrokerClientApplication.java:48) at com.iohao.game.external.core.netty.simple.InternalRunOne.lambda$startupLogic$0(InternalRunOne.java:63) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: java.lang.Exception: Create connection to 10.0.4.15:10200 error! at com.alipay.remoting.connection.AbstractConnectionFactory.doCreateConnection(AbstractConnectionFactory.java:338) at com.alipay.remoting.connection.AbstractConnectionFactory.createConnection(AbstractConnectionFactory.java:186) at com.alipay.remoting.DefaultConnectionManager.create(DefaultConnectionManager.java:476) ... 24 common frames omitted Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /10.0.4.15:10200 Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused at io.netty.channel.unix.Errors.newConnectException0(Errors.java:166) at io.netty.channel.unix.Errors.handleConnectErrno(Errors.java:131) at io.netty.channel.unix.Socket.finishConnect(Socket.java:359) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:710) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:687) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:567) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:489) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:397) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.base/java.lang.Thread.run(Thread.java:1583) 01:22:25 [ioGameThread-1] INFO CommonStdout (BrokerServer.java:97) - 启动游戏网关 port: [10200] 启动模式: [单机启动模式 standalone]
使用的是分模块开发,基于ioMMO项目的基础上进行开发的,导出的是单机模式一个包运行。