LDAP Network Connector in AMQ 5.2. JMX InstanceAlreadyExists Exception

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

LDAP Network Connector in AMQ 5.2. JMX InstanceAlreadyExists Exception

Eric-AWL
Hi !

I have a full "network of brokers/embedded brokers" topology . I want to connect together all my embedded brokers with LDAP rules.

Excuse-me I'm not an LDAP expert ...

I created entries in LDAP directory (dc=instances), under which I created leaves (cn=server1, cn=server2, cn=server3, ... , cn=servern)

Then, I tell my first embedded broker (ex : server1) that it must be connected to all the embedded brokers of the group "dc=instances". And I do the same, for server2, server3, ... servern. It's a kind of "multicast group" driven by LDAP directory rules.

Then I start the first server of the group (it is the SIBBusSupervisor-td0sib01s embedded broker). The other servers of the group (and their embedded brokers) are stopped.

here are the trace of the start of my embedded broker (vm://SIBBusSupervisor-td0sib01s)

2009-07-30 13:55:51,397 [main           ] DEBUG ManagementContext              - Probably not using JRE 1.4: mx4j.tools.naming.NamingService
2009-07-30 13:55:51,405 [main           ] INFO  BrokerService                  - Using Persistence Adapter: MemoryPersistenceAdapter
2009-07-30 13:55:51,406 [main           ] INFO  BrokerService                  - ActiveMQ 5.2.0 JMS Message Broker (SIBBusSupervisor-td0sib01s) is starting
2009-07-30 13:55:51,406 [main           ] INFO  BrokerService                  - For help or more information please see: http://activemq.apache.org/
2009-07-30 13:55:51,412 [JMX connector  ] INFO  ManagementContext              - JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
2009-07-30 13:55:51,568 [main           ] INFO  TransportServerThreadSupport   - Listening for connections at: tcp://td0sib01s.priv.atos.fr:61600?useLocalHost=false
2009-07-30 13:55:51,568 [main           ] INFO  TransportConnector             - Connector instance Started
2009-07-30 13:55:51,573 [main           ] INFO  TransportServerThreadSupport   - Listening for connections at: tcp://td0sib01s.priv.atos.fr:61601?useLocalHost=false
2009-07-30 13:55:51,573 [main           ] INFO  TransportConnector             - Connector busModule Started
2009-07-30 13:55:51,578 [main           ] INFO  TransportServerThreadSupport   - Listening for connections at: tcp://td0sib01s.priv.atos.fr:61602?useLocalHost=false
2009-07-30 13:55:51,579 [main           ] INFO  TransportConnector             - Connector busSupervisor Started
2009-07-30 13:55:51,579 [main           ] INFO  LdapNetworkConnector           - connecting...
2009-07-30 13:55:51,579 [main           ] DEBUG LdapNetworkConnector           -     URI [ldap://td0sib01v.priv.atos.fr:389]
2009-07-30 13:55:51,579 [main           ] DEBUG LdapNetworkConnector           -     login credentials [anonymous]
2009-07-30 13:55:51,610 [main           ] INFO  LdapNetworkConnector           - searching for network connectors...
2009-07-30 13:55:51,610 [main           ] DEBUG LdapNetworkConnector           -     base   [dc=instances-nc,dc=sib,dc=com]
2009-07-30 13:55:51,610 [main           ] DEBUG LdapNetworkConnector           -     filter [(&(&(objectClass=ipHost)(objectClass=ipService))((cn=*)))]
2009-07-30 13:55:51,610 [main           ] DEBUG LdapNetworkConnector           -     scope  [2]
2009-07-30 13:55:51,626 [main           ] DEBUG LdapNetworkConnector           - retrieved UUID from SearchResult [cn=chargebusServer-td0sib01v,dc=instances-nc,dc=sib,dc=com]
2009-07-30 13:55:51,626 [main           ] DEBUG LdapNetworkConnector           - retrieved URI from SearchResult [static:(tcp://td0sib01v.priv.atos.fr:61617)]
2009-07-30 13:55:51,632 [main           ] INFO  DiscoveryNetworkConnector      - Establishing network connection between from vm://SIBBusSupervisor-td0sib01s to tcp://td0sib01v.priv.atos.fr:61617
2009-07-30 13:55:51,686 [main           ] DEBUG VMTransportFactory             - binding to broker: SIBBusSupervisor-td0sib01s
2009-07-30 13:55:51,686 [main           ] INFO  TransportConnector             - Connector vm://SIBBusSupervisor-td0sib01s Started
2009-07-30 13:55:51,717 [main           ] DEBUG VMTransportFactory             - Shutting down VM connectors for broker: SIBBusSupervisor-td0sib01s
2009-07-30 13:55:51,719 [sor-td0sib01s#1] DEBUG Transport                      - Transport failed: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://SIBBusSupervisor-td0sib01s#0) disposed.
org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://SIBBusSupervisor-td0sib01s#0) disposed.
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:203)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
2009-07-30 13:55:51,720 [sor-td0sib01s#0] DEBUG TransportConnection            - Stopping connection: vm://SIBBusSupervisor-td0sib01s#0
2009-07-30 13:55:51,720 [sor-td0sib01s#0] DEBUG TransportConnection            - Stopped transport: vm://SIBBusSupervisor-td0sib01s#0
2009-07-30 13:55:51,720 [sor-td0sib01s#0] DEBUG TransportConnection            - Connection Stopped: vm://SIBBusSupervisor-td0sib01s#0
2009-07-30 13:55:51,720 [main           ] INFO  TransportConnector             - Connector vm://SIBBusSupervisor-td0sib01s Stopped
2009-07-30 13:55:51,720 [main           ] DEBUG TcpTransport                   - Stopping transport tcp://null:0
2009-07-30 13:55:51,721 [main           ] WARN  DiscoveryNetworkConnector      - Could not start network bridge between: vm://SIBBusSupervisor-td0sib01s and: tcp://td0sib01v.priv.atos.fr:61617 due to: java.net.ConnectException: Connection refused
2009-07-30 13:55:51,721 [main           ] DEBUG DiscoveryNetworkConnector      - Start failure exception: java.net.ConnectException: Connection refused
.... Exception
2009-07-30 13:55:51,722 [main           ] DEBUG DemandForwardingBridge         -  stopping SIBBusSupervisor-td0sib01s bridge to Unknown is disposed already ? false
2009-07-30 13:55:51,723 [main           ] DEBUG NetworkConnector               - Network bridge could not be unregistered in JMX: org.apache.activemq:BrokerName=SIBBusSupervisor-td0sib01s,Type=NetworkBridge,NetworkConnectorName=localhost,Name=null
javax.management.InstanceNotFoundException: org.apache.activemq:BrokerName=SIBBusSupervisor-td0sib01s,Type=NetworkBridge,NetworkConnectorName=localhost,Name=null
.... Exception
2009-07-30 13:55:51,725 [NetworkBridge  ] DEBUG DemandForwardingBridge         - Caught exception sending shutdown
org.apache.activemq.transport.TransportDisposedIOException: Transport disposed.
.... Exception
2009-07-30 13:55:51,725 [main           ] INFO  DemandForwardingBridge         - SIBBusSupervisor-td0sib01s bridge to Unknown stopped
2009-07-30 13:55:51,726 [main           ] INFO  NetworkConnector               - Network Connector localhost Started
2009-07-30 13:55:51,726 [main           ] INFO  LdapNetworkConnector           - connector added with URI [static:(tcp://td0sib01v.priv.atos.fr:61617)]
2009-07-30 13:55:51,726 [main           ] DEBUG LdapNetworkConnector           - retrieved UUID from SearchResult [cn=chargebusClient-td0sib01v,dc=instances-nc,dc=sib,dc=com]
2009-07-30 13:55:51,726 [main           ] DEBUG LdapNetworkConnector           - retrieved URI from SearchResult [static:(tcp://td0sib01v.priv.atos.fr:61616)]
2009-07-30 13:55:51,727 [0, empty queue]] DEBUG SimpleDiscoveryAgent           - Failure occured soon after the discovery event was generated.  It will be clasified as a connection failure: org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent$SimpleDiscoveryEvent@449fea8a
2009-07-30 13:55:51,727 [0, empty queue]] DEBUG SimpleDiscoveryAgent           - Waiting 1000 ms before attepting to reconnect.
2009-07-30 13:55:51,728 [main           ] ERROR BrokerService                  - Failed to start ActiveMQ JMS Message Broker. Reason: java.io.IOException: Network Connector could not be registered in JMX: org.apache.activemq:BrokerName=SIBBusSupervisor-td0sib01s,Type=NetworkConnector,NetworkConnectorName=localhost
java.io.IOException: Network Connector could not be registered in JMX: org.apache.activemq:BrokerName=SIBBusSupervisor-td0sib01s,Type=NetworkConnector,NetworkConnectorName=localhost

... Exception
Caused by: javax.management.InstanceAlreadyExistsException: org.apache.activemq:BrokerName=SIBBusSupervisor-td0sib01s,Type=NetworkConnector,NetworkConnectorName=localhost... Exception
2009-07-30 13:55:51,728 [main           ] INFO  BrokerService                  - ActiveMQ Message Broker (SIBBusSupervisor-td0sib01s, null) is shutting down
2009-07-30 13:55:51,729 [main           ] INFO  LdapNetworkConnector           - stopping context...
2009-07-30 13:55:51,729 [main           ] INFO  NetworkConnector               - Network Connector localhost Stopped
2009-07-30 13:55:51,729 [main           ] INFO  NetworkConnector               - Network Connector localhost Stopped
2009-07-30 13:55:53,569 [main           ] INFO  TransportConnector             - Connector instance Stopped
2009-07-30 13:55:53,574 [main           ] INFO  TransportConnector             - Connector busModule Stopped
2009-07-30 13:55:53,579 [main           ] INFO  TransportConnector             - Connector busSupervisor Stopped
2009-07-30 13:55:53,582 [main           ] INFO  BrokerService                  - ActiveMQ JMS Message Broker (SIBBusSupervisor-td0sib01s, null) stopped

It seems that, all non established LDAP connector have the same name "localhost" instead of the "iphost" value. As soon as 2 non established connection are tried. the second one finishes with a JMX InstanceAlreadyExists exception.

Eric-AWL