osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error ActiveMQ / Websocket configuration


So... You're using an embedded broker, but then trying to connect to it via
a websocket? Is that really what you mean to do, and if so, why? Before we
sink too much time into solving your problem, let's make sure it's the
RIGHT problem.

Also, have you confirmed via netstat that the broker is actually listening
on port 61613?

It seems like your questions are really about Spring Boot rather than
ActiveMQ. Have you posted this question on the Spring forums and/or a
general question site such as StackOverflow?

Tim

On Thu, Dec 20, 2018, 7:19 AM FM <fabrice.maupin@xxxxxxxxxxx wrote:

> Hi,
>
> I try to configure my Websockets with ActiveMQ.
>
> When I launch my Springboot application I obtain this message :
>
> /8.12.20 10:57:44.705 [tcp-client-loop-nio-3] INFO
> o.s.m.s.s.StompBrokerRelayMessageHandler - TCP connection failure in
> session
> _system_: Failed to connect: Connection timed out: no further information:
> /192.168.1.88:61613
> io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection
> timed
> out: no further information: /192.168.1.88:61613
>         at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>         at
> sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
>         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:636)
>         at
>
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:583)
>         at
>
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500)
>         at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462)
>         at
>
> io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.net.ConnectException: Connection timed out: no further
> information
> /
>
> This is the configuration of ActiveMQ in application.yml :
>
> /activemq:
>       broker-url:
> vm://embedded?broker.persistent=false,useShutdownHook=false
>       in-memory: true
>       non-blocking-redelivery: true
>       packages:
>         trust-all: false
>         trusted: com.memorynotfound
>       pool:
>         block-if-full: true
>         block-if-full-timeout: -1
>         enabled: false
>         idle-timeout: 30000
>         max-connections: 1
>         max-sessions-per-connection: 500
>         time-between-expiration-check: -1
>         use-anonymous-producers: true
>
>   # Spring JMS Settings
>   jms:
>     listener:
>       acknowledge-mode: auto
>       auto-startup: true
>       concurrency: 5
>       max-concurrency: 10
>     pub-sub-domain: false
>     template:
>       default-destination:
>       delivery-mode: NON_PERSISTENT
>       priority: 100
>       qos-enabled: true
>       receive-timeout: 1000
>       time-to-live: 36000/
>
> This is the Websocket configuration class :
>
> /@Configuration
> @EnableWebSocketMessageBroker
> public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
>
>   @Override
>   public void configureMessageBroker(MessageBrokerRegistry config) {
>
>
> config.enableStompBrokerRelay("/topic").setRelayHost("192.168.1.88").setRelayPort(61613);
>
>     config.setApplicationDestinationPrefixes("/app");
>   }
>
>   @Override
>   public void registerStompEndpoints(StompEndpointRegistry registry) {
>                 ...
>   }
> }/
>
> I don't know if the relayHost and relayPort have the right values - i try
> several couple of host/port without success (localhost, vm://localhost,
> vm://embedded, ...)
>
> What is the nature of this error(?) message : problem with timeout of
> ActiveMQ ? The current values of relayHost and relayPort are correct ?
>
> Any ideas ?
>
> Thank you for advance.
>
>
>
>
>
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>