activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: InstanceAlreadyExistsException when creating Connections without start them
Date Thu, 06 Apr 2006 06:17:38 GMT
Which version of ActiveMQ are you using BTW? We did have some
JMX-related bugs a while back that have been fixed.  We now use
different MBean names for each transport connection so you shouldn't
receive this exception on 4.0-RC2 (I use JMX all the time with
multiple transports on the broker and haven't seen this in a long
while).

Incidentally if ever you're having trouble with JMX its very easy to
disable with the useJmx="false" property on BrokerService or <broker>

James

On 4/6/06, Li, Fan <fanli@amazon.com> wrote:
> Hi:
>
> I am doing a test where I am creating a number of TopicConnections on different TCP port
on my machine, in particular I am using the TransportConnector URIs: "tcp://localhost:61616",
"tcp://localhost:61626", "tcp://localhost:61636" and "tcp://localhost:61646". I have started
a BrokerService with these four TransportConnectors and I have created four TCP TopicConnections
without starting any of them, as a result I am getting InstanceAlreadyExistsException from
the registerMBean() method of ManagedTransportConnection class, with the stack trace similar
to:
>
> 2006-04-05 18:35:53,474 [127.0.0.1:61616] WARN  ActiveMQConnection             - Async
exception with no exception listener: java.net.SocketException: Connection reset
> java.net.SocketException: Connection reset
>         at java.net.SocketInputStream.read(SocketInputStream.java:168)
>         at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:48)
>         at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:55)
>         at java.io.DataInputStream.readInt(DataInputStream.java:353)
>         at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:270)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:135)
>         at java.lang.Thread.run(Thread.java:595)
> 2006-04-05 18:35:53,477 [mazon.com:61616] ERROR TransportConnector             - Could
not accept connection: java.io.IOException: org.apache.activemq:BrokerName=localhost,Type=Connection,Connection=1
> java.io.IOException: org.apache.activemq:BrokerName=localhost,Type=Connection,Connection=1
>         at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:36)
>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.registerMBean(ManagedTransportConnection.java:98)
>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.setConnectionId(ManagedTransportConnection.java:78)
>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.<init>(ManagedTransportConnection.java:57)
>         at org.apache.activemq.broker.jmx.ManagedTransportConnector.createConnection(ManagedTransportConnector.java:60)
>         at org.apache.activemq.broker.TransportConnector$1.onAccept(TransportConnector.java:135)
>         at org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransportServer.java:137)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.management.InstanceAlreadyExistsException: org.apache.activemq:BrokerName=localhost,Type=Connection,Connection=1
>         at com.sun.jmx.mbeanserver.RepositorySupport.addMBean(RepositorySupport.java:452)
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1410)
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:936)
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:337)
>         at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:497)
>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.registerMBean(ManagedTransportConnection.java:95)
>         ... 6 more
>
> Is it required in ActiveMQ to start a Connection right after its creation? It seems all
instances of ManagedTransportConnector for a particular BrokerService share the same MBeanServer.
When I run debugger on the registerMBean() method that throws the exception, the objects it
tries to register with the MBeanServer appears to be different, but the name it tries to register
them under seems to be the same "org.apache.activemq:BrokerName=localhost,Connection=1,Type=Connection".
Do anyone know what might be the cause of this?
>
> Thanks
> Fan
>
>
>
>


--

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message