activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Gies <andr...@soa-knowledge.net>
Subject Re: Cannot connect to remote activemq broker
Date Tue, 02 Jun 2009 16:47:52 GMT
Just a thought....


may be the brokers are listening only on the local loopback.
You can check the netstat output, if it contains something like  
127.0.0.1 listening on 61616
then you need to configure AMQ to listen on the outbound network  
interface.


Regards
Andreas

On Jun 2, 2009, at 10:31 AM, shaldar wrote:

>
> Hi all - I installed the fuse activemq distribution on 2 Windows  
> machines:
> - a Windows vista test client connected over DSL
> - a remote VPS running Windows Web Server 2008 - where I want to run  
> the
> test broker and eventually the production broker
>
> I was able to successfully test publish/ subscribe examples using  
> the local
> vm - but I am unable to do
> so in a real distributed environment (clients and broker on separate
> machines connected over the Internet) - because they don't seem to  
> connect.
>
> What can I do to make it work?  Am I configuring it wrong? Please  
> help.
>
> Best regards - Susmit
>
>
> Screen outputs below:
>
> On both the machines I have opened the firewall to TCP port 61616  
> for the
> test:
> =========================================================
> netsh>firewall show state
>
> Firewall status:
> -------------------------------------------------------------------
> Profile                           = Standard
> Operational mode                  = Disable
> Exception mode                    = Enable
> Multicast/broadcast response mode = Enable
> Notification mode                 = Enable
> Group policy version              = Windows Firewall
> Remote admin mode                 = Disable
>
> Ports currently open on all network interfaces:
> Port   Protocol  Version  Program
> -------------------------------------------------------------------
> 61616  TCP       Any      (null)
> =========================================================
>
> On the client vista machine - when I run the producer ant - I get the
> following (truncated) result:
>
> =========================================================
> c:\IONA\fuse-message-broker-5.3\example>ant  producer
> -Durl=tcp://207.150.194.15
> 5:61616
> Buildfile: build.xml
>
> init:
>
> compile:
>
> producer:
>     [echo] Running producer against server at $url =
> tcp://207.150.194.155:6161
> 6 for subject $subject = TEST.FOO
>     [java] Connecting to URL: tcp://207.150.194.155:61616
>     [java] Publishing a Message with size 1000 to queue: TEST.FOO
>     [java] Using non-persistent messages
>     [java] Sleeping between publish 0 ms
>     [java] Caught: javax.jms.JMSException: Could not connect to  
> broker URL:
> tcp
> ://207.150.194.155:61616. Reason: java.net.ConnectException:  
> Connection
> timed out: connect
> =========================================================
>
> Same with the activemq-cpp chat client:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> c:\activemq-cpp-client\activemq-cpp-2.2.6\src\examples\topics\chat 
> \Release>chat2
> -b tcp://207.150.194.155:61616 -u testuser
> ==================================================
> = Failed to Connect To Broker, Is it Running?    =
> ==================================================
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> And this is what the broker looks like when I start it on the VPS:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> c:\iona\fuse-message-broker-5.3.0.2\bin>activemq-admin start
>
> Warning: JAVA_HOME environment variable is not set.
>
> Java Runtime: Sun Microsystems Inc. 1.6.0_13 C:\Program Files\Java 
> \jre6
>  Heap sizes: current=5056k  free=4440k  max=520256k
>    JVM args: -Dcom.sun.management.jmxremote -Xmx512M
> -Dorg.apache.activemq.UseD
> edicatedTaskRunner=true
> -Dactivemq.classpath=c:\iona\fuse-message-broker-5.3.0.2
> \bin\../conf; -Dactivemq.home=c:\iona\fuse-message-broker-5.3.0.2\bin 
> \..
> -Dactiv
> emq.base=c:\iona\fuse-message-broker-5.3.0.2\bin\..
> ACTIVEMQ_HOME: c:\iona\fuse-message-broker-5.3.0.2\bin\..
> ACTIVEMQ_BASE: c:\iona\fuse-message-broker-5.3.0.2\bin\..
> Loading message broker from: xbean:activemq.xml
> INFO  DefaultCamelContext            - JMX enabled. Using
> InstrumentationLifecyc
> leStrategy.
> INFO  BrokerService                  - Using Persistence Adapter:
> AMQPersistence
> Adapter(c:\iona\fuse-message-broker-5.3.0.2\bin\..\data)
> INFO  AMQPersistenceAdapter          - AMQStore starting using  
> directory:
> c:\ion
> a\fuse-message-broker-5.3.0.2\bin\..\data
> INFO  KahaStore                      - Kaha Store using data directory
> c:\iona\f
> use-message-broker-5.3.0.2\bin\..\data\kr-store\state
> INFO  AMQPersistenceAdapter          - Active data files: []
> WARN  AMQPersistenceAdapter          - The ReferenceStore is not  
> valid -
> recover
> ing ...
> INFO  KahaStore                      - Kaha Store successfully  
> deleted data
> dire
> ctory c:\iona\fuse-message-broker-5.3.0.2\bin\..\data\kr-store\data
> INFO  AMQPersistenceAdapter          - Journal Recovery Started from:
> DataManage
> r:(data-)
> INFO  AMQPersistenceAdapter          - Recovered 0 operations from  
> redo log
> in 0
> .047 seconds.
> INFO  AMQPersistenceAdapter          - Finished recovering the
> ReferenceStore
> INFO  BrokerService                  - ActiveMQ 5.3.0.2-fuse JMS  
> Message
> Broker
> (localhost) is starting
> INFO  BrokerService                  - For help or more information  
> please
> see:
> http://activemq.apache.org/
> INFO  KahaStore                      - Kaha Store using data directory
> c:\iona\f
> use-message-broker-5.3.0.2\bin\..\data\kr-store\data
> INFO  TransportServerThreadSupport   - Listening for connections at:
> tcp://127.0
> .0.1:61616
> INFO  TransportConnector             - Connector openwire Started
> INFO  TransportServerThreadSupport   - Listening for connections at:
> ssl://127.0
> .0.1:61617
> INFO  TransportConnector             - Connector ssl Started
> INFO  TransportServerThreadSupport   - Listening for connections at:
> stomp://127
> .0.0.1:61613
> INFO  TransportConnector             - Connector stomp Started
> INFO  TransportServerThreadSupport   - Listening for connections at:
> xmpp://127.
> 0.0.1:61222
> INFO  TransportConnector             - Connector xmpp Started
> INFO  BrokerService                  - ActiveMQ JMS Message Broker
> (localhost, I
> D:wtfs435-50883-1243952667486-0:0) started
> INFO  log                            - Logging to
> org.slf4j.impl.JCLLoggerAdapte
> r(org.mortbay.log) via org.mortbay.log.Slf4jLog
> INFO  log                            - jetty-6.1.14
> INFO  WebConsoleStarter              - ActiveMQ WebConsole  
> initialized.
> INFO  /admin                         - Initializing Spring  
> FrameworkServlet
> 'dis
> patcher'
> INFO  log                            - ActiveMQ Console at
> http://0.0.0.0:8161/a
> dmin
> INFO  log                            - ActiveMQ Web Demos at
> http://0.0.0.0:8161
> /demo
> INFO  log                            - RESTful file access  
> application at
> http:/
> /0.0.0.0:8161/fileserver
> INFO  log                            - FUSE Web Console at
> http://0.0.0.0:8161/c
> onsole
> INFO  log                            - Started
> SelectChannelConnector@0.0.0.0:81
> 61
> INFO  DefaultCamelContext            - Apache Camel 1.6.0.0-fuse
> (CamelContext:c
> amel) is starting
> INFO  TransportConnector             - Connector vm://localhost  
> Started
> INFO  DefaultCamelContext            - Apache Camel 1.6.0.0-fuse
> (CamelContext:c
> amel) started
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> -- 
> View this message in context: http://www.nabble.com/Cannot-connect-to-remote-activemq-broker-tp23833774p23833774.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Mime
View raw message