Petals ESB Container

Trying to unregister not registred endpoint

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 3.1.1
  • Fix Version/s: 5.0.0
  • Component/s: Registry
  • Security Level: Public
  • Description:
    Hide

    After a few day (4 days the last time), if I stop the container, an error occurs:

    [Petals.Container.ComponentLifeCycle.petals-bc-soap]-SEVERE 2011-01-13 16:32:31,834 Failed to stop the component 'petals-bc-soap'
    javax.jbi.messaging.MessagingException: org.ow2.petals.jbi.messaging.registry.RegistryException: Can not unregister not registered endpoint...
            at org.ow2.petals.jbi.messaging.exchange.DeliveryChannelImpl.close(DeliveryChannelImpl.java:169)
            at org.ow2.petals.container.lifecycle.ComponentLifeCycle.doShutdown(ComponentLifeCycle.java:187)
            at org.ow2.petals.container.lifecycle.ComponentLifeCycle.stopComponentLifeCycle(ComponentLifeCycle.java:327)
            at org.ow2.petals.container.lifecycle.ComponentLifeCycle.stopFc(ComponentLifeCycle.java)
            at org.objectweb.fractal.julia.generated.Cbd2013d7_0.setFcContentState(BasicControllerMixin.java:8130)
            at org.objectweb.fractal.julia.generated.Cbd2013d7_0.setFcStopped(BasicControllerMixin.java:8087)
            at org.objectweb.fractal.julia.generated.C18c4c884_0.setFcStopped(INTERFACE[LifeCycleCoordinator])
            at org.objectweb.fractal.julia.generated.Cbd2013d7_0.stopFc(BasicControllerMixin.java:3187)
            at org.objectweb.fractal.julia.generated.Cbd2013d7_0.stopFc(BasicControllerMixin.java:4131)
            at org.objectweb.fractal.julia.generated.C18c4c884_0.stopFc(INTERFACE[LifeCycleCoordinator])
            at org.ow2.petals.kernel.server.FractalHelper.stopComponent(FractalHelper.java:379)
            at org.ow2.petals.kernel.server.PetalsServerImpl.stopPetalsComposite(PetalsServerImpl.java:507)
            at org.ow2.petals.kernel.server.PetalsServerImpl.stop(PetalsServerImpl.java:219)
            at org.ow2.petals.kernel.server.PetalsStopThread.run(PetalsStopThread.java:49)
    Caused by: org.ow2.petals.jbi.messaging.registry.RegistryException: Can not unregister not registered endpoint...
            at org.ow2.petals.jbi.messaging.registry.BaseEndpointRegistry.deactivateEndpoint(BaseEndpointRegistry.java:173)
            at org.objectweb.fractal.julia.generated.C2304ecde_0.deactivateEndpoint(INTERCEPTOR[EndpointRegistry])
            at org.objectweb.fractal.julia.generated.C2eb804c9_0.deactivateEndpoint(INTERFACE[EndpointRegistry])
            at org.ow2.petals.jbi.component.context.ComponentContextImpl.deregisterAllEndpoints(ComponentContextImpl.java:237)
            at org.ow2.petals.jbi.messaging.exchange.DeliveryChannelImpl.close(DeliveryChannelImpl.java:167)
            ... 13 more

    Of course, I think there is a connection lost or something like that, maybe under my own database and not into the esb.
    Then the database (mysql) is empty, and all is ok at the start time...but this error occurs permanently further. I must purge the esb (shutdown + manual remove of work and repository + manual remove of the database tables), and then it's ok and the next start...further the next time . The bc soap seems to be great unless the failed stop. it's not linked to "component endpoints" but only "service unit endpoints".
    Maybe catch it and just create a trace at the info (or debug) level?

    Show
    After a few day (4 days the last time), if I stop the container, an error occurs:
    [Petals.Container.ComponentLifeCycle.petals-bc-soap]-SEVERE 2011-01-13 16:32:31,834 Failed to stop the component 'petals-bc-soap'
    javax.jbi.messaging.MessagingException: org.ow2.petals.jbi.messaging.registry.RegistryException: Can not unregister not registered endpoint...
            at org.ow2.petals.jbi.messaging.exchange.DeliveryChannelImpl.close(DeliveryChannelImpl.java:169)
            at org.ow2.petals.container.lifecycle.ComponentLifeCycle.doShutdown(ComponentLifeCycle.java:187)
            at org.ow2.petals.container.lifecycle.ComponentLifeCycle.stopComponentLifeCycle(ComponentLifeCycle.java:327)
            at org.ow2.petals.container.lifecycle.ComponentLifeCycle.stopFc(ComponentLifeCycle.java)
            at org.objectweb.fractal.julia.generated.Cbd2013d7_0.setFcContentState(BasicControllerMixin.java:8130)
            at org.objectweb.fractal.julia.generated.Cbd2013d7_0.setFcStopped(BasicControllerMixin.java:8087)
            at org.objectweb.fractal.julia.generated.C18c4c884_0.setFcStopped(INTERFACE[LifeCycleCoordinator])
            at org.objectweb.fractal.julia.generated.Cbd2013d7_0.stopFc(BasicControllerMixin.java:3187)
            at org.objectweb.fractal.julia.generated.Cbd2013d7_0.stopFc(BasicControllerMixin.java:4131)
            at org.objectweb.fractal.julia.generated.C18c4c884_0.stopFc(INTERFACE[LifeCycleCoordinator])
            at org.ow2.petals.kernel.server.FractalHelper.stopComponent(FractalHelper.java:379)
            at org.ow2.petals.kernel.server.PetalsServerImpl.stopPetalsComposite(PetalsServerImpl.java:507)
            at org.ow2.petals.kernel.server.PetalsServerImpl.stop(PetalsServerImpl.java:219)
            at org.ow2.petals.kernel.server.PetalsStopThread.run(PetalsStopThread.java:49)
    Caused by: org.ow2.petals.jbi.messaging.registry.RegistryException: Can not unregister not registered endpoint...
            at org.ow2.petals.jbi.messaging.registry.BaseEndpointRegistry.deactivateEndpoint(BaseEndpointRegistry.java:173)
            at org.objectweb.fractal.julia.generated.C2304ecde_0.deactivateEndpoint(INTERCEPTOR[EndpointRegistry])
            at org.objectweb.fractal.julia.generated.C2eb804c9_0.deactivateEndpoint(INTERFACE[EndpointRegistry])
            at org.ow2.petals.jbi.component.context.ComponentContextImpl.deregisterAllEndpoints(ComponentContextImpl.java:237)
            at org.ow2.petals.jbi.messaging.exchange.DeliveryChannelImpl.close(DeliveryChannelImpl.java:167)
            ... 13 more
    Of course, I think there is a connection lost or something like that, maybe under my own database and not into the esb. Then the database (mysql) is empty, and all is ok at the start time...but this error occurs permanently further. I must purge the esb (shutdown + manual remove of work and repository + manual remove of the database tables), and then it's ok and the next start...further the next time . The bc soap seems to be great unless the failed stop. it's not linked to "component endpoints" but only "service unit endpoints". Maybe catch it and just create a trace at the info (or debug) level?
  • Environment:
    rhel 5, jdk 1.6

Activity

Hide
Christophe DENEUX added a comment - Tue, 3 May 2011 - 16:58:24 +0200

I reproduce the problem with the following steps:

  1. Start a Petals ESB node
  2. Install a component
  3. Deploy a service provider
  4. Delete the endpoint of the service provider into the registry database
  5. Stop the Petals ESB node using the script 'stop.sh'
  6. The stack trace previously mentioned occurs


If the database is stop during the stop of the container, you will get a stack trace similar to the following:

[Petals.Container.ComponentLifeCycle.petals-bc-soap]-SEVERE 2011-05-03 16:52:45,690 Failed to stop the component 'petals-bc-soap'
javax.jbi.messaging.MessagingException: org.ow2.petals.jbi.messaging.registry.RegistryException: could not execute query
	at org.ow2.petals.jbi.messaging.exchange.DeliveryChannelImpl.close(DeliveryChannelImpl.java:169)
	at org.ow2.petals.container.lifecycle.ComponentLifeCycle.doShutdown(ComponentLifeCycle.java:187)
	at org.ow2.petals.container.lifecycle.ComponentLifeCycle.stopComponentLifeCycle(ComponentLifeCycle.java:327)
	at org.ow2.petals.container.lifecycle.ComponentLifeCycle.stopFc(ComponentLifeCycle.java)
	at org.objectweb.fractal.julia.generated.Cbd2013d7_0.setFcContentState(BasicControllerMixin.java:8130)
	at org.objectweb.fractal.julia.generated.Cbd2013d7_0.setFcStopped(BasicControllerMixin.java:8087)
	at org.objectweb.fractal.julia.generated.C18c4c884_0.setFcStopped(INTERFACE[LifeCycleCoordinator])
	at org.objectweb.fractal.julia.generated.Cbd2013d7_0.stopFc(BasicControllerMixin.java:3187)
	at org.objectweb.fractal.julia.generated.Cbd2013d7_0.stopFc(BasicControllerMixin.java:4131)
	at org.objectweb.fractal.julia.generated.C18c4c884_0.stopFc(INTERFACE[LifeCycleCoordinator])
	at org.ow2.petals.kernel.server.FractalHelper.stopComponent(FractalHelper.java:379)
	at org.ow2.petals.kernel.server.PetalsServerImpl.stopPetalsComposite(PetalsServerImpl.java:508)
	at org.ow2.petals.kernel.server.PetalsServerImpl.stop(PetalsServerImpl.java:220)
	at org.ow2.petals.kernel.server.PetalsStopThread.run(PetalsStopThread.java:49)
Caused by: org.ow2.petals.jbi.messaging.registry.RegistryException: could not execute query
	at org.ow2.petals.jbi.messaging.registry.BaseEndpointRegistry.deactivateEndpoint(BaseEndpointRegistry.java:177)
	at org.objectweb.fractal.julia.generated.C2304ecde_0.deactivateEndpoint(INTERCEPTOR[EndpointRegistry])
	at org.objectweb.fractal.julia.generated.C2eb804c9_0.deactivateEndpoint(INTERFACE[EndpointRegistry])
	at org.ow2.petals.jbi.component.context.ComponentContextImpl.deregisterAllEndpoints(ComponentContextImpl.java:248)
	at org.ow2.petals.jbi.messaging.exchange.DeliveryChannelImpl.close(DeliveryChannelImpl.java:167)
	... 13 more
Show
Christophe DENEUX added a comment - Tue, 3 May 2011 - 16:58:24 +0200 I reproduce the problem with the following steps:
  1. Start a Petals ESB node
  2. Install a component
  3. Deploy a service provider
  4. Delete the endpoint of the service provider into the registry database
  5. Stop the Petals ESB node using the script 'stop.sh'
  6. The stack trace previously mentioned occurs

If the database is stop during the stop of the container, you will get a stack trace similar to the following:
[Petals.Container.ComponentLifeCycle.petals-bc-soap]-SEVERE 2011-05-03 16:52:45,690 Failed to stop the component 'petals-bc-soap'
javax.jbi.messaging.MessagingException: org.ow2.petals.jbi.messaging.registry.RegistryException: could not execute query
	at org.ow2.petals.jbi.messaging.exchange.DeliveryChannelImpl.close(DeliveryChannelImpl.java:169)
	at org.ow2.petals.container.lifecycle.ComponentLifeCycle.doShutdown(ComponentLifeCycle.java:187)
	at org.ow2.petals.container.lifecycle.ComponentLifeCycle.stopComponentLifeCycle(ComponentLifeCycle.java:327)
	at org.ow2.petals.container.lifecycle.ComponentLifeCycle.stopFc(ComponentLifeCycle.java)
	at org.objectweb.fractal.julia.generated.Cbd2013d7_0.setFcContentState(BasicControllerMixin.java:8130)
	at org.objectweb.fractal.julia.generated.Cbd2013d7_0.setFcStopped(BasicControllerMixin.java:8087)
	at org.objectweb.fractal.julia.generated.C18c4c884_0.setFcStopped(INTERFACE[LifeCycleCoordinator])
	at org.objectweb.fractal.julia.generated.Cbd2013d7_0.stopFc(BasicControllerMixin.java:3187)
	at org.objectweb.fractal.julia.generated.Cbd2013d7_0.stopFc(BasicControllerMixin.java:4131)
	at org.objectweb.fractal.julia.generated.C18c4c884_0.stopFc(INTERFACE[LifeCycleCoordinator])
	at org.ow2.petals.kernel.server.FractalHelper.stopComponent(FractalHelper.java:379)
	at org.ow2.petals.kernel.server.PetalsServerImpl.stopPetalsComposite(PetalsServerImpl.java:508)
	at org.ow2.petals.kernel.server.PetalsServerImpl.stop(PetalsServerImpl.java:220)
	at org.ow2.petals.kernel.server.PetalsStopThread.run(PetalsStopThread.java:49)
Caused by: org.ow2.petals.jbi.messaging.registry.RegistryException: could not execute query
	at org.ow2.petals.jbi.messaging.registry.BaseEndpointRegistry.deactivateEndpoint(BaseEndpointRegistry.java:177)
	at org.objectweb.fractal.julia.generated.C2304ecde_0.deactivateEndpoint(INTERCEPTOR[EndpointRegistry])
	at org.objectweb.fractal.julia.generated.C2eb804c9_0.deactivateEndpoint(INTERFACE[EndpointRegistry])
	at org.ow2.petals.jbi.component.context.ComponentContextImpl.deregisterAllEndpoints(ComponentContextImpl.java:248)
	at org.ow2.petals.jbi.messaging.exchange.DeliveryChannelImpl.close(DeliveryChannelImpl.java:167)
	... 13 more
Christophe DENEUX made changes - Tue, 3 May 2011 - 16:58:37 +0200
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Minor [ 4 ]
Assignee Roland Naudin [ rnaudin ] Christophe DENEUX [ cdeneux ]
Hide
Christophe DENEUX added a comment - Tue, 3 May 2011 - 17:14:37 +0200

Analyzing the problem in greater depth, we can see the following problem:

  • Endpoints are unregistered when stopping the container. IMO, a endpoint should be unregistered only when its service is undeployed or its component is uninstalled. Ans so, messages should be queued until the endpoint becomes available again.
  • Endpoints are unregistered when closing the delivery channel of their component. When closing the delivery channel, only messages should be stopped

In view of the fact that the initial problem is only a log size problem without other side-effects, in view of the risk of fixing these problems in a maintenance release, this issue will be taken into account with the rework of the registry.

Show
Christophe DENEUX added a comment - Tue, 3 May 2011 - 17:14:37 +0200 Analyzing the problem in greater depth, we can see the following problem:
  • Endpoints are unregistered when stopping the container. IMO, a endpoint should be unregistered only when its service is undeployed or its component is uninstalled. Ans so, messages should be queued until the endpoint becomes available again.
  • Endpoints are unregistered when closing the delivery channel of their component. When closing the delivery channel, only messages should be stopped
In view of the fact that the initial problem is only a log size problem without other side-effects, in view of the risk of fixing these problems in a maintenance release, this issue will be taken into account with the rework of the registry.
Hide
Frédéric Gardes added a comment - Tue, 3 May 2011 - 17:17:53 +0200

I'm agree: we've got a lot of issue with the current registry. Delete all et recreate all at each start/stop container action is better than let all today, in term of global robustness (less of installation corruption seen...)
Yes, let's rework the registry .

Show
Frédéric Gardes added a comment - Tue, 3 May 2011 - 17:17:53 +0200 I'm agree: we've got a lot of issue with the current registry. Delete all et recreate all at each start/stop container action is better than let all today, in term of global robustness (less of installation corruption seen...) Yes, let's rework the registry .
Hide
Christophe Hamerling added a comment - Tue, 3 May 2011 - 17:27:51 +0200

The problem is not in the registry itself but on how the registry is used by the petals kernel ie The kernel component which is in charge in initializing the registry instance or stopping it also calls some reset methods provided by the registry implementation to clean data when the node starts, stops, ...

Show
Christophe Hamerling added a comment - Tue, 3 May 2011 - 17:27:51 +0200 The problem is not in the registry itself but on how the registry is used by the petals kernel ie The kernel component which is in charge in initializing the registry instance or stopping it also calls some reset methods provided by the registry implementation to clean data when the node starts, stops, ...
Hide
Christophe DENEUX added a comment - Wed, 4 May 2011 - 08:43:29 +0200

I agree with you Christophe. The registry rework consists in:

  • improving the registry itself,
  • reviewing its usage by the kernel,
  • getting the registry implementation out of the kernel
Show
Christophe DENEUX added a comment - Wed, 4 May 2011 - 08:43:29 +0200 I agree with you Christophe. The registry rework consists in:
  • improving the registry itself,
  • reviewing its usage by the kernel,
  • getting the registry implementation out of the kernel
Hide
Christophe Hamerling added a comment - Wed, 4 May 2011 - 08:49:56 +0200

"getting the registry implementation out of the kernel"

I do not understand what it means. The registry implementation is already out of the kernel. The kernel only has a small facade implementation to map the JBI API to registry API ie activateEndpoint(ep) -> registry.add(ep), deactivateEndpoint(ep) -> registry.delete(ep) for example

Show
Christophe Hamerling added a comment - Wed, 4 May 2011 - 08:49:56 +0200 "getting the registry implementation out of the kernel" I do not understand what it means. The registry implementation is already out of the kernel. The kernel only has a small facade implementation to map the JBI API to registry API ie activateEndpoint(ep) -> registry.add(ep), deactivateEndpoint(ep) -> registry.delete(ep) for example
Hide
Christophe DENEUX added a comment - Wed, 4 May 2011 - 09:13:54 +0200

The registry implementation is not completely out of the kernel. Some implementation classes are always present in the kernel. In the kernel, it should remain only the Registry interface.

For example, if I want to implement a registry based on a DHT framework as Hazelcast, I don't need remaining implementation classes.

Show
Christophe DENEUX added a comment - Wed, 4 May 2011 - 09:13:54 +0200 The registry implementation is not completely out of the kernel. Some implementation classes are always present in the kernel. In the kernel, it should remain only the Registry interface. For example, if I want to implement a registry based on a DHT framework as Hazelcast, I don't need remaining implementation classes.
Hide
Frédéric Gardes added a comment - Wed, 4 May 2011 - 09:16:54 +0200

I'm agree with you: the "registry" name is just a shortcut to talk about the global registry subject into the esb, mainly drived by the kernel. So it's the global architectural philosophy of what's an esb registry, and what to put (and not put!) in that have to be done one day...
We've got any powerful hibernate controlled databases, with great performance and robustness (not excellent of course, it always will be less efficent that a database kind dedicated layer "hand-made"! Wrapping running...). So the hibernate layer can be kept, but a refactoring is needed to improve and fix already found bugs.
My 20 cents...

Show
Frédéric Gardes added a comment - Wed, 4 May 2011 - 09:16:54 +0200 I'm agree with you: the "registry" name is just a shortcut to talk about the global registry subject into the esb, mainly drived by the kernel. So it's the global architectural philosophy of what's an esb registry, and what to put (and not put!) in that have to be done one day... We've got any powerful hibernate controlled databases, with great performance and robustness (not excellent of course, it always will be less efficent that a database kind dedicated layer "hand-made"! Wrapping running...). So the hibernate layer can be kept, but a refactoring is needed to improve and fix already found bugs. My 20 cents...
Christophe DENEUX made changes - Mon, 5 Oct 2015 - 11:16:09 +0200
Status Open [ 10002 ] In Progress [ 10003 ]
Hide
Christophe DENEUX added a comment - Mon, 5 Oct 2015 - 11:16:28 +0200

As a new distributed registry, based on Hazelcast, has been introduced with Petals ESB 5.0.0, this issue will not be fixed.

Show
Christophe DENEUX added a comment - Mon, 5 Oct 2015 - 11:16:28 +0200 As a new distributed registry, based on Hazelcast, has been introduced with Petals ESB 5.0.0, this issue will not be fixed.
Christophe DENEUX made changes - Mon, 5 Oct 2015 - 11:16:28 +0200
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 5.0.0 [ 10413 ]
Resolution Won't Fix [ 2 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
109d 23h 17m
1
Christophe DENEUX
Tue, 3 May 2011 - 16:58:37 +0200
Open Open In Progress In Progress
1615d 18h 17m
1
Christophe DENEUX
Mon, 5 Oct 2015 - 11:16:09 +0200
In Progress In Progress Resolved Resolved
19s
1
Christophe DENEUX
Mon, 5 Oct 2015 - 11:16:28 +0200



People

Dates

  • Created:
    Thu, 13 Jan 2011 - 16:41:32 +0100
    Updated:
    Mon, 5 Oct 2015 - 11:16:28 +0200
    Resolved:
    Mon, 5 Oct 2015 - 11:16:28 +0200