rabbitmq链接超时_springSTOMP尝试使用Rabbitmq作为代理链接mq的时候总是超时。

springSTOMP尝试使用Rabbitmq作为代理链接mq的时候总是超时。

Rabbitmq已经开启stomp插件,并且61613是通的

ERROR:

17:42:46.147 [MessageBroker-3] DEBUG org.springframework.web.socket.sockjs.transport.handler.DefaultSockJsService - Closed 1 sessions: [csm5t2kx]

17:42:57.908 [tcp-client-loop-nio-5] DEBUG reactor.ipc.netty.tcp.TcpClient - [id: 0x5b1f7298] CLOSE

17:42:57.909 [tcp-client-loop-nio-5] DEBUG reactor.ipc.netty.tcp.TcpClient - [id: 0x5b1f7298] UNREGISTERED

17:42:57.909 [tcp-client-loop-nio-3] DEBUG reactor.ipc.netty.resources.DefaultPoolResources - Cannot acquire channel

io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection timed out: no further information: /192.168.11.33:61613

at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)

at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:327)

at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)

at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)

at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:591)

at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:508)

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)

at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)

at java.lang.Thread.run(Thread.java:745)

Caused by: java.net.ConnectException: Connection timed out: no further information

... 10 common frames omitted

17:42:57.909 [tcp-client-loop-nio-3] WARN org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler - TCP connection failure in session _system_: Failed to connect: Connection timed out: no further information: /192.168.11.33:61613

io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection timed out: no further information: /192.168.11.33:61613

at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)

at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:327)

at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)

at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)

at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:591)

at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:508)

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)

at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)

at java.lang.Thread.run(Thread.java:745)

Caused by: java.net.ConnectException: Connection timed out: no further information

... 10 common frames omitted

17:42:57.909 [tcp-client-loop-nio-3] DEBUG org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler - Cleaning up connection state for session _system_

17:42:57.909 [tcp-client-loop-nio-3] DEBUG reactor.ipc.netty.channel.PooledClientContextHandler - Acquiring existing channel from pool: DefaultPromise@14889f71(incomplete) SimpleChannelPool{activeConnections=0, inactiveConnections=0}

17:42:57.910 [tcp-client-loop-nio-6] DEBUG reactor.ipc.netty.resources.DefaultPoolResources - [id: 0xfdcce73f] Created new pooled channel, now 0 active connections and 1 inactive connections

17:42:57.910 [tcp-client-loop-nio-6] DEBUG reactor.ipc.netty.channel.ContextHandler - [id: 0xfdcce73f] After pipeline DefaultChannelPipeline{(reactor.left.loggingHandler = io.netty.handler.logging.LoggingHandler), (SimpleChannelPool$1#0 = io.netty.channel.pool.SimpleChannelPool$1), (reactor.right.reactiveBridge = reactor.ipc.netty.channel.ChannelOperationsHandler)}

17:42:57.911 [tcp-client-loop-nio-6] DEBUG reactor.ipc.netty.tcp.TcpClient - [id: 0xfdcce73f] REGISTERED

17:42:57.911 [tcp-client-loop-nio-6] DEBUG reactor.ipc.netty.tcp.TcpClient - [id: 0xfdcce73f] CONNECT: /192.168.11.33:61613

17:43:13.715 [MessageBroker-3] INFO org.springframework.web.socket.config.WebSocketMessageBrokerStats - WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 1 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(1)-CONNECTED(0)-DISCONNECT(0)], stompBrokerRelay[1 sessions, 192.168.11.33:61613 (not available), processed CONNECT(1)-CONNECTED(0)-DISCONNECT(0)], inboundChannel[pool size = 6, active threads = 0, queued tasks = 0, completed tasks = 6], outboundChannelpool size = 2, active threads = 0, queued tasks = 0, completed tasks = 2], sockJsScheduler[pool size = 8, active threads = 1, queued tasks = 1, completed tasks = 8]

17:43:18.911 [tcp-client-loop-nio-6] DEBUG reactor.ipc.netty.tcp.TcpClient - [id: 0xfdcce73f] CLOSE

websocketconfig

@Configuration

@EnableWebSocketMessageBroker

public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {

@Override

public void configureMessageBroker(MessageBrokerRegistry registry){

registry.enableStompBrokerRelay("/topic","/queue").setRelayHost("192.168.11.33").setRelayPort(61613).setSystemLogin("guest").

setSystemPasscode("guest").setClientLogin("guest").setClientPasscode("guest").setAutoStartup(true).setSystemHeartbeatSendInterval(10000)

.setSystemHeartbeatReceiveInterval(10000).setUserRegistryBroadcast("/topic/vil-user-registry")

.setUserDestinationBroadcast("/topic/vil-unresolved-user-destination");

//        registry.enableSimpleBroker("topic");

registry.setApplicationDestinationPrefixes("/app");

}

@Override

public void registerStompEndpoints(StompEndpointRegistry registry){

registry.addEndpoint("/chat").withSockJS();

}

}

pom.xml

<!-- https://mvnrepository.com/artifact/io.projectreactor/reactor-net -->

<dependency>

<groupId>io.projectreactor</groupId>

<artifactId>reactor-net</artifactId>

<version>2.0.8.RELEASE</version>

</dependency>

<!-- https://mvnrepository.com/artifact/io.projectreactor/reactor-core -->

<!-- https://mvnrepository.com/artifact/io.projectreactor/reactor-core -->

<dependency>

<groupId>io.projectreactor</groupId>

<artifactId>reactor-core</artifactId>

<version>3.2.5.RELEASE</version>

</dependency>

<!-- https://mvnrepository.com/artifact/io.projectreactor.ipc/reactor-netty -->

<dependency>

<groupId>io.projectreactor.ipc</groupId>

<artifactId>reactor-netty</artifactId>

<version>0.7.14.RELEASE</version>

</dependency>

我已经无计可施了…..

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值