dev@glassfish.java.net

Re: AS 9.1 EE build 28 - InstanceAlreadyExistsException on instance restart.

From: jothir ganesan <Jothir.Ganesan_at_Sun.COM>
Date: Fri, 22 Dec 2006 16:45:12 +0530

Hi Sreeni,

Thanks for the quick response.

The issue happens consistently. Our test procedure is:
- start the cluster
- send a(or 2-3) request(s) throught the lbplugin
- stop and start the instance(say instance1) that handled the request
- send the next (remaining) request(s) to check for session availability.

After restarting the instance, this exception is thrown and the
remaining requests fail. For the next test, instance1 again behaves
normally till restart happens and bombs with this exception on restart.

But initially (for the first few tests) there was no issue, and this
started happening somewhere in the middle of execution repeatedly.

Thanks
Jothir

sreeni wrote:

> jothir ganesan wrote:
>
>> Hi All,
>>
>> I am in appserver SQE team and I executed a list of tests using AS
>> 9.1 EE build 28. Most of my tests restart an instance in a
>> cluster(because we test for failover and highavailability features of
>> appserver). In the course of execution, when the instance was
>> restarted by one test, I noticed "InstanceAlreadyExistsException"
>> exception in DAS's server.log. After that, the instance didnot get
>> started completely. The stack trace is attached below.
>
> Jothir,
>
> What you see is possibly after the fact.
>
> Whenever a remote instance is stopped, the cascaded mBeans for that
> remote instance would disappear. Again when the remote instance is
> started, the DAS would cascade the mBeans for that remote instance. In
> this cases it notices that the remote instance mBeans are already
> cascaded, mostly because the previous shutdown was not completed
> successfully. Pl. let me know if you can repeat the issue consistently.
>
>>
>>
>> [#|2006-12-15T02:59:59.636+0530|WARNING|sun-appserver-ee9.1|javax.enterprise.system.stream.err|_ThreadID=1617;_ThreadName=RMI
>> TCP
>> Connection(5731)-10.12.163.195;_RequestID=3b3998ba-5df5-464b-8a54-c842326f3532;|
>> javax.management.InstanceAlreadyExistsException:
>> com.sun.appserv:type=CascadingAgent,serverName=instance1
>> 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 sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
>> com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:77)
>> at $Proxy1.registerMBean(Unknown Source)
>> at
>> com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.registerMBean(SunoneInterceptor.java:268)
>> at
>> com.sun.enterprise.ee.admin.cascading.CascadingLifecycleImpl.cascadeInstance(CascadingLifecycleImpl.java:380)
>> at
>> com.sun.enterprise.ee.admin.cascading.InstanceCascadingMBean.cascadeInstance(InstanceCascadingMBean.java:302)
>> at
>> com.sun.enterprise.ee.admin.cascading.InstanceCascadingMBean.invoke(InstanceCascadingMBean.java:216)
>> at
>> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
>> at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
>> at
>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
>> at
>> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
>> at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
>> com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:77)
>> at $Proxy1.invoke(Unknown Source)
>> at
>> com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
>> at
>> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1408)
>> at
>> javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
>> at
>> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1245)
>> at
>> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1341)
>> at
>> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:782)
>> at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
>> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
>> at sun.rmi.transport.Transport$1.run(Transport.java:153)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
>> at
>> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
>> at
>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
>> at java.lang.Thread.run(Thread.java:595)
>> |#]
>>
>> Could anyone please let me know the cause of this issue?
>>
>> Thanks
>> Jothir
>>
>