activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curtis Bradley <curtis.brad...@yahoo.com>
Subject [newbie] can't get brokers on two computers to connect
Date Sun, 04 Dec 2011 05:21:32 GMT
I'm a CORBA guy entering the AMQ world.  I've read "Active MQ in action
(©2011 by Manning Publications Co)".  I've gone through most of the book and
managed to get most of the examples to work on a single computer.  As a
first-shot at computer to computer communicatoin, I've modified the Static
networks example on pg 85 to run on two computers.  I cannot get the Broker
to connect!

The following is my setup and output.  I am by no means a Linux or
networking Guru so it's real likely I'm doing something dumb in that arena. 
I trying to show my co-workers that AMQ will handle our MOM needs.  I'm not
having much luck.  I really need help!  Thanks a BUNCH!

[CENTOS 5.3, Windows XP (AMQ 5.5.1,  java 1.6 on both platforms)]
 
[[[[[[[[[[[[Linux]]]]]]]]]]]]]]]]]]]]]]]]
--- ifconfig -------------------------------------------------------------
[root@localhost bin]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:14:22:39:65:9F  
          inet addr:192.168.0.106  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::214:22ff:fe39:659f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:116200 errors:0 dropped:0 overruns:0 frame:0
          TX packets:59263 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:131382646 (125.2 MiB)  TX bytes:5864826 (5.5 MiB)
          Interrupt:169 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3407 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3407 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2509108 (2.3 MiB)  TX bytes:2509108 (2.3 MiB)

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

--- install/run as root --------------------------------------------------
[root@localhost bin]# activemq start xbean:brokerB.xml 
INFO: Loading '/etc/default/activemq'
INFO: Using java '/usr/java/default/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and
log4j.properties to get details
INFO: pidfile created : '/opt/apache-activemq-5.5.1/data/activemq.pid' (pid
'10647')
---activemq.log-------------------
2011-12-03 20:29:35,133 | INFO  | Refreshing
org.apache.activemq.xbean.XBeanBrokerFactory$1@199f91c: startup date [Sat
Dec 03 20:29:35 PST 2011]; root of context hierarchy |
org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
2011-12-03 20:29:36,233 | INFO  |
PListStore:${activemq.base}/data/BrokerB/tmp_storage started |
org.apache.activemq.store.kahadb.plist.PListStore | main
2011-12-03 20:29:36,388 | INFO  | JMX consoles can connect to
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi |
org.apache.activemq.broker.jmx.ManagementContext | JMX connector
2011-12-03 20:29:36,407 | INFO  | Using Persistence Adapter:
KahaDBPersistenceAdapter[/opt/apache-activemq-5.5.1/bin/${activemq.base}/data/BrokerB/KahaDB]
| org.apache.activemq.broker.BrokerService | main
2011-12-03 20:29:37,316 | INFO  | KahaDB is version 3 |
org.apache.activemq.store.kahadb.MessageDatabase | main
2011-12-03 20:29:37,350 | INFO  | Recovering from the journal ... |
org.apache.activemq.store.kahadb.MessageDatabase | main
2011-12-03 20:29:37,351 | INFO  | Recovery replayed 1 operations from the
journal in 0.027 seconds. | org.apache.activemq.store.kahadb.MessageDatabase
| main
2011-12-03 20:29:37,363 | INFO  | ActiveMQ 5.5.1 JMS Message Broker
(BrokerB) is starting | org.apache.activemq.broker.BrokerService | main
2011-12-03 20:29:37,364 | INFO  | For help or more information please see:
http://activemq.apache.org/ | org.apache.activemq.broker.BrokerService |
main
2011-12-03 20:29:37,562 | INFO  | Listening for connections at:
tcp://localhost.localdomain:61617 |
org.apache.activemq.transport.TransportServerThreadSupport | main
2011-12-03 20:29:37,562 | INFO  | Connector openwire Started |
org.apache.activemq.broker.TransportConnector | main
2011-12-03 20:29:37,565 | INFO  | ActiveMQ JMS Message Broker (BrokerB,
ID:localhost.localdomain-45075-1322972977392-0:1) started |
org.apache.activemq.broker.BrokerService | main
--- brokerB.xml----------------------------
<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.apache.org/schema/core"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">

    <broker xmlns="http://activemq.apache.org/schema/core"
brokerName="BrokerB" dataDirectory="${activemq.base}/data">

        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://localhost:61617"
/>
        </transportConnectors>

    </broker>

</beans>



[[[[[[[[[[[[[[[Windows]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
=== ipconfig ===============
c:\>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : lca8pce00269417
        Primary Dns Suffix  . . . . . . . : northgrum.com
        Node Type . . . . . . . . . . . . : Hybrid
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No
        DNS Suffix Search List. . . . . . : Northgrum.com
                                            NGIT.Northgrum.com
                                            NGMS.Northgrum.com

Ethernet adapter Wireless Network Connection:

        Media State . . . . . . . . . . . : Media disconnected
        Description . . . . . . . . . . . : Intel(R) Centrino(R) Advanced-N
620
 AGN
        Physical Address. . . . . . . . . : 18-3D-A2-73-0A-BC

Ethernet adapter Northrop Grumman LAN:

        Connection-specific DNS Suffix  . : sd.cox.net
        Description . . . . . . . . . . . : Intel(R) 82577LM Gigabit Network
Co
nection
        Physical Address. . . . . . . . . : 88-AE-1D-AE-96-6F
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 192.168.0.107
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.0.1
        DHCP Server . . . . . . . . . . . : 192.168.0.1
        DNS Servers . . . . . . . . . . . : 192.168.0.1
        Lease Obtained. . . . . . . . . . : Saturday, December 03, 2011
10:53:4
 AM
        Lease Expires . . . . . . . . . . : Saturday, December 10, 2011
10:53:4
 AM

=== output ===============
c:\apache-activemq-5.5.1\bin>activemq xbean:brokerA.xml
Java Runtime: Sun Microsystems Inc. 1.6.0_29
C:\Progra~1\Java\jdk1.6.0_29\jre
  Heap sizes: current=15872k  free=14525k  max=506816k
    JVM args: -Dcom.sun.management.jmxremote -Xmx512M
-Dorg.apache.activemq.UseD
edicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties
-Dact
ivemq.classpath=c:\apache-activemq-5.5.1\bin\../conf;c:\apache-activemq-5.5.1\bi
n\../conf; -Dactivemq.home=c:\apache-activemq-5.5.1\bin\..
-Dactivemq.base=c:\ap
ache-activemq-5.5.1\bin\..
ACTIVEMQ_HOME: c:\apache-activemq-5.5.1\bin\..
ACTIVEMQ_BASE: c:\apache-activemq-5.5.1\bin\..
Loading message broker from: xbean:brokerA.xml
 INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@13f3045:
start
up date [Sat Dec 03 20:25:48 PST 2011]; root of context hierarchy
 INFO | PListStore:${activemq.base}\data\BrokerA\tmp_storage started
 INFO | Using Persistence Adapter:
KahaDBPersistenceAdapter[c:\apache-activemq-5
.5.1\bin\${activemq.base}\data\BrokerA\KahaDB]
 INFO | JMX consoles can connect to
service:jmx:rmi:///jndi/rmi://localhost:1099
/jmxrmi
 INFO | ActiveMQ 5.5.1 JMS Message Broker (BrokerA) is starting
 INFO | For help or more information please see: http://activemq.apache.org/
 INFO | Listening for connections at: tcp://localhost:61616
 INFO | Connector openwire Started
 INFO | Establishing network connection from
vm://BrokerA?async=false&network=tr
ue to tcp://192.168.0.106:61617
 INFO | Connector vm://BrokerA Started
 INFO | Connector vm://BrokerA Stopped
 INFO | BrokerA Shutting down
 WARN | Could not start network bridge between:
vm://BrokerA?async=false&network
=true and: tcp://192.168.0.106:61617 due to:
java.net.NoRouteToHostException: No
 route to host: connect
 INFO | BrokerA bridge to Unknown stopped
 INFO | Network Connector
DiscoveryNetworkConnector:NC:BrokerService[BrokerA] St
arted
 INFO | Establishing network connection from
vm://BrokerA?async=false&network=tr
ue to tcp://192.168.0.106:61617
 INFO | Connector vm://BrokerA Started
 INFO | ActiveMQ JMS Message Broker (BrokerA,
ID:lca8pce00269417-3490-1322972748
875-0:1) started
 INFO | BrokerA Shutting down
 INFO | BrokerA bridge to Unknown stopped
 INFO | Connector vm://BrokerA Stopped
 WARN | Could not start network bridge between:
vm://BrokerA?async=false&network
=true and: tcp://192.168.0.106:61617 due to:
java.net.NoRouteToHostException: No
 route to host: connect
 INFO | Establishing network connection from
vm://BrokerA?async=false&network=tr
ue to tcp://192.168.0.106:61617
 INFO | Connector vm://BrokerA Started
 INFO | BrokerA Shutting down
 INFO | BrokerA bridge to Unknown stopped
 INFO | Connector vm://BrokerA Stopped
 WARN | Could not start network bridge between:
vm://BrokerA?async=false&network
=true and: tcp://192.168.0.106:61617 due to:
java.net.NoRouteToHostException: No
 route to host: connect
 INFO | Establishing network connection from
vm://BrokerA?async=false&network=tr
ue to tcp://192.168.0.106:61617
 INFO | Connector vm://BrokerA Started
 INFO | BrokerA Shutting down
 INFO | BrokerA bridge to Unknown stopped
 INFO | Connector vm://BrokerA Stopped
 WARN | Could not start network bridge between:
vm://BrokerA?async=false&network
=true and: tcp://192.168.0.106:61617 due to:
java.net.NoRouteToHostException: No
 route to host: connect
 INFO | Establishing network connection from
vm://BrokerA?async=false&network=tr
ue to tcp://192.168.0.106:61617
 INFO | Connector vm://BrokerA Started
==== brokerA.xml
<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.apache.org/schema/core"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">

    <broker xmlns="http://activemq.apache.org/schema/core"
brokerName="BrokerA" dataDirectory="${activemq.base}/data">

        <networkConnectors>
           <networkConnector uri="static:(tcp://192.168.0.106:61617)" />
	</networkConnectors>

        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://localhost:61616"
/>
        </transportConnectors>
        

    </broker>

</beans>




--
View this message in context: http://activemq.2283324.n4.nabble.com/newbie-can-t-get-brokers-on-two-computers-to-connect-tp4156142p4156142.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message