Petals SE Notification

On restart, the SE Notification is sending subscribe to wrong endpoints

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.0.3
  • Fix Version/s: 1.0.3
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    When the component restart, it tries to recover itself by replaying notification operations from its persisted data, it seems that messages are sent to the wrong services.
    In the current case, it is sending subscribe messages to the se-kpi which do not know how to handle this type of messages :

    [Petals.Container.Components.petals-se-notification]-FINE 2010-09-23 15:46:48,969 target producer Service to subscribe to : {http://petals.ow2.org/component}NotificationProducerService
    
    [Petals.Container.Components.petals-se-notification]-FINE 2010-09-23 15:46:48,969 target producer Interface to subscribe to : {http://docs.oasis-open.org/wsn/bw-2}NotificationProducer
    
    [Petals.Container.Components.petals-se-notification]-FINE 2010-09-23 15:46:48,969 target producer Endpoint to subscribe to : edpt-0F6EDB524A3CC2A7EA12852479437149770001
    
    [Petals.Container.Components.petals-se-notification]-FINEST 2010-09-23 15:46:48,973 Message in with Id 'petals:uid:C27E5794683EC5B323128524960897386400053' to send
    [Petals.Container.Components.petals-se-notification]-FINEST 2010-09-23 15:46:48,974 Operation : {http://docs.oasis-open.org/wsn/b-2}Subscribe
    [Petals.Container.Components.petals-se-notification]-FINEST 2010-09-23 15:46:48,974 MEP : http://www.w3.org/2004/08/wsdl/in-out
    [Petals.Container.Components.petals-se-notification]-FINEST 2010-09-23 15:46:48,975 Message Content : <?xml version="1.0" encoding="MacRoman" standalone="no"?><wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"><wsnt:ConsumerReference><wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://petals.ow2.org/cdk</wsa:Address><wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"><ebm:SOAParameter xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes"><ebm:InterfaceName xmlns="http://docs.oasis-open.org/wsn/brw-2">NotificationBroker</ebm:InterfaceName><ebm:ServiceName xmlns="http://petals.ow2.org/petals-se-notification">NotificationBrokerService</ebm:ServiceName><ebm:Endpoint>NotificationBrokerServiceEndpoint</ebm:Endpoint></ebm:SOAParameter></wsa:ReferenceParameters></wsnt:ConsumerReference><wsnt:Filter><wsnt:TopicExpression xmlns:petals="http://petals.ow2.org/topic" Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Full">petals:component/cdk/producer/fault[@wstop:topic='true']</wsnt:TopicExpression><wsnt:MessageContent Dialect="http://www.ebmwebsourcing.com/wsnotification/soaparameter"><ebm:SOAParameter xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes"><ebm:InterfaceName xmlns="http://notification.test.petals.ebmwebsourcing.com">NotifyImpl</ebm:InterfaceName><ebm:ServiceName xmlns="http://notification.test.petals.ebmwebsourcing.com">NotifyImpl</ebm:ServiceName><ebm:Endpoint>NotifyImplPort</ebm:Endpoint></ebm:SOAParameter></wsnt:MessageContent></wsnt:Filter><wsnt:SubscriptionPolicy><ebm:TransformPolicy xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes"><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output indent="yes" method="xml"/><xsl:template match="/"><wsnebm:NotifyContent xmlns:wsnebm="http://www.ebmwebsourcing.com/WS-BaseNotification/NotifyContent" processType="1"><wsnebm:params>	
    				
    				
    			</wsnebm:params>
    		</wsnebm:NotifyContent>
    	</xsl:template>
    </xsl:stylesheet></ebm:TransformPolicy><ebm:ProcessPolicy xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes" action="create"/><ebm:ContextPolicy xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes" correlationId="true" endpoint="true" interface="true" meuuid="true" notifDate="true" service="true" status="true"/></wsnt:SubscriptionPolicy></wsnt:Subscribe>
    [Petals.Container.Components.petals-se-kpi]-FINE 2010-09-23 15:46:48,979 Accepting a JBI message with Id : petals:uid:C27E5794683EC5B323128524960897386400053
    [Petals.Container.Components.petals-se-kpi]-FINEST 2010-09-23 15:46:48,979 Process an exchange as PROVIDER with id : petals:uid:C27E5794683EC5B323128524960897386400053
    [Petals.Container.Components.petals-se-kpi]-FINE 2010-09-23 15:46:48,980 Process an exchange managed directly by the component
    [Petals.Container.Components.petals-se-kpi]-FINE 2010-09-23 15:46:48,980 		 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [Petals.Container.Components.petals-se-kpi]-FINE 2010-09-23 15:46:48,980 Notification Message received on "onNotificationMessage" method !
    [Petals.Container.Components.petals-se-kpi]-FINEST 2010-09-23 15:46:48,981 Message out with Id 'petals:uid:C27E5794683EC5B323128524960897386400053' to send
    [Petals.Container.Components.petals-se-kpi]-FINEST 2010-09-23 15:46:48,981 Operation : {http://docs.oasis-open.org/wsn/b-2}Subscribe
    [Petals.Container.Components.petals-se-kpi]-FINEST 2010-09-23 15:46:48,981 MEP : http://www.w3.org/2004/08/wsdl/in-out
    [Petals.Container.Components.petals-se-kpi]-FINEST 2010-09-23 15:46:48,981 Message Content is null
    [Petals.Container.Components.petals-se-notification]-WARNING 2010-09-23 15:46:49,006  [forwardSubscriptionRequest(...) ] - A WS-Notification Fault have been return on "subscribe" request !!
    (inOutExchange Fault Content : 
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <faultcode>soapenv:Server</faultcode>
      <faultstring>The KPI process only WS-Notification Notify on InOnly</faultstring>
      <faultactor>http://petals.ow2.org/exception</faultactor>
      <detail>
        <stackTrace>org.ow2.petals.component.framework.api.exception.SOAP11FaultServerException: The KPI process only WS-Notification Notify on InOnly
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processInOutAsProvider(MessageExchangeProcessor.java:667)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processAsProvider(MessageExchangeProcessor.java:389)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.process(MessageExchangeProcessor.java:233)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.run(MessageExchangeProcessor.java:177)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:637)
    </stackTrace>
      </detail>
    </soapenv:Fault>
    

    To reproduce:
    1. start all notification components
    2. Stop all but se-notification
    3. Stop the se-notification
    4. Start all but se-notification
    5. Start the se-notification : PROBLEM

    Show
    When the component restart, it tries to recover itself by replaying notification operations from its persisted data, it seems that messages are sent to the wrong services. In the current case, it is sending subscribe messages to the se-kpi which do not know how to handle this type of messages :
    [Petals.Container.Components.petals-se-notification]-FINE 2010-09-23 15:46:48,969 target producer Service to subscribe to : {http://petals.ow2.org/component}NotificationProducerService
    
    [Petals.Container.Components.petals-se-notification]-FINE 2010-09-23 15:46:48,969 target producer Interface to subscribe to : {http://docs.oasis-open.org/wsn/bw-2}NotificationProducer
    
    [Petals.Container.Components.petals-se-notification]-FINE 2010-09-23 15:46:48,969 target producer Endpoint to subscribe to : edpt-0F6EDB524A3CC2A7EA12852479437149770001
    
    [Petals.Container.Components.petals-se-notification]-FINEST 2010-09-23 15:46:48,973 Message in with Id 'petals:uid:C27E5794683EC5B323128524960897386400053' to send
    [Petals.Container.Components.petals-se-notification]-FINEST 2010-09-23 15:46:48,974 Operation : {http://docs.oasis-open.org/wsn/b-2}Subscribe
    [Petals.Container.Components.petals-se-notification]-FINEST 2010-09-23 15:46:48,974 MEP : http://www.w3.org/2004/08/wsdl/in-out
    [Petals.Container.Components.petals-se-notification]-FINEST 2010-09-23 15:46:48,975 Message Content : <?xml version="1.0" encoding="MacRoman" standalone="no"?><wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"><wsnt:ConsumerReference><wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://petals.ow2.org/cdk</wsa:Address><wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"><ebm:SOAParameter xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes"><ebm:InterfaceName xmlns="http://docs.oasis-open.org/wsn/brw-2">NotificationBroker</ebm:InterfaceName><ebm:ServiceName xmlns="http://petals.ow2.org/petals-se-notification">NotificationBrokerService</ebm:ServiceName><ebm:Endpoint>NotificationBrokerServiceEndpoint</ebm:Endpoint></ebm:SOAParameter></wsa:ReferenceParameters></wsnt:ConsumerReference><wsnt:Filter><wsnt:TopicExpression xmlns:petals="http://petals.ow2.org/topic" Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Full">petals:component/cdk/producer/fault[@wstop:topic='true']</wsnt:TopicExpression><wsnt:MessageContent Dialect="http://www.ebmwebsourcing.com/wsnotification/soaparameter"><ebm:SOAParameter xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes"><ebm:InterfaceName xmlns="http://notification.test.petals.ebmwebsourcing.com">NotifyImpl</ebm:InterfaceName><ebm:ServiceName xmlns="http://notification.test.petals.ebmwebsourcing.com">NotifyImpl</ebm:ServiceName><ebm:Endpoint>NotifyImplPort</ebm:Endpoint></ebm:SOAParameter></wsnt:MessageContent></wsnt:Filter><wsnt:SubscriptionPolicy><ebm:TransformPolicy xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes"><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output indent="yes" method="xml"/><xsl:template match="/"><wsnebm:NotifyContent xmlns:wsnebm="http://www.ebmwebsourcing.com/WS-BaseNotification/NotifyContent" processType="1"><wsnebm:params>	
    				
    				
    			</wsnebm:params>
    		</wsnebm:NotifyContent>
    	</xsl:template>
    </xsl:stylesheet></ebm:TransformPolicy><ebm:ProcessPolicy xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes" action="create"/><ebm:ContextPolicy xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes" correlationId="true" endpoint="true" interface="true" meuuid="true" notifDate="true" service="true" status="true"/></wsnt:SubscriptionPolicy></wsnt:Subscribe>
    [Petals.Container.Components.petals-se-kpi]-FINE 2010-09-23 15:46:48,979 Accepting a JBI message with Id : petals:uid:C27E5794683EC5B323128524960897386400053
    [Petals.Container.Components.petals-se-kpi]-FINEST 2010-09-23 15:46:48,979 Process an exchange as PROVIDER with id : petals:uid:C27E5794683EC5B323128524960897386400053
    [Petals.Container.Components.petals-se-kpi]-FINE 2010-09-23 15:46:48,980 Process an exchange managed directly by the component
    [Petals.Container.Components.petals-se-kpi]-FINE 2010-09-23 15:46:48,980 		 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [Petals.Container.Components.petals-se-kpi]-FINE 2010-09-23 15:46:48,980 Notification Message received on "onNotificationMessage" method !
    [Petals.Container.Components.petals-se-kpi]-FINEST 2010-09-23 15:46:48,981 Message out with Id 'petals:uid:C27E5794683EC5B323128524960897386400053' to send
    [Petals.Container.Components.petals-se-kpi]-FINEST 2010-09-23 15:46:48,981 Operation : {http://docs.oasis-open.org/wsn/b-2}Subscribe
    [Petals.Container.Components.petals-se-kpi]-FINEST 2010-09-23 15:46:48,981 MEP : http://www.w3.org/2004/08/wsdl/in-out
    [Petals.Container.Components.petals-se-kpi]-FINEST 2010-09-23 15:46:48,981 Message Content is null
    [Petals.Container.Components.petals-se-notification]-WARNING 2010-09-23 15:46:49,006  [forwardSubscriptionRequest(...) ] - A WS-Notification Fault have been return on "subscribe" request !!
    (inOutExchange Fault Content : 
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <faultcode>soapenv:Server</faultcode>
      <faultstring>The KPI process only WS-Notification Notify on InOnly</faultstring>
      <faultactor>http://petals.ow2.org/exception</faultactor>
      <detail>
        <stackTrace>org.ow2.petals.component.framework.api.exception.SOAP11FaultServerException: The KPI process only WS-Notification Notify on InOnly
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processInOutAsProvider(MessageExchangeProcessor.java:667)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processAsProvider(MessageExchangeProcessor.java:389)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.process(MessageExchangeProcessor.java:233)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.run(MessageExchangeProcessor.java:177)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:637)
    </stackTrace>
      </detail>
    </soapenv:Fault>
    
    To reproduce: 1. start all notification components 2. Stop all but se-notification 3. Stop the se-notification 4. Start all but se-notification 5. Start the se-notification : PROBLEM
  • Environment:
    se-notif + se-kpi as consumer + bc-soap as provider

Issue Links

Activity

Hide
Roland Naudin added a comment - Fri, 24 Sep 2010 - 09:44:11 +0200

I think you should do like 'standard' SU autogeneration endpoint.
The fisrt time an SU autogenerate endpoint is registered, the endpoint is calculated then persisted in the JBI descriptor and the related WSDL, then activated in the bus.
You should do the same with the notification's endpoint.

Show
Roland Naudin added a comment - Fri, 24 Sep 2010 - 09:44:11 +0200 I think you should do like 'standard' SU autogeneration endpoint. The fisrt time an SU autogenerate endpoint is registered, the endpoint is calculated then persisted in the JBI descriptor and the related WSDL, then activated in the bus. You should do the same with the notification's endpoint.
Hide
Christophe Hamerling added a comment - Fri, 24 Sep 2010 - 09:00:59 +0200

IN fact, it is not only when the se-notification restart but when all components are restarting, ie notification subscribers are not the same due to autogenerate, so the se-notification try to resend subscribes to unknown endpoints

Show
Christophe Hamerling added a comment - Fri, 24 Sep 2010 - 09:00:59 +0200 IN fact, it is not only when the se-notification restart but when all components are restarting, ie notification subscribers are not the same due to autogenerate, so the se-notification try to resend subscribes to unknown endpoints
Hide
Frédéric Gardes added a comment - Fri, 24 Sep 2010 - 08:45:41 +0200 - edited

It 's a regression. Previously, the generated endpoint was stored into the wsdl into the repository. i.e. the string 'petals:autogenerated' was replaced by 'petals:uid:xxxx'. So when the bus restarted, the wsdl used the same endpoint name as previously, and the value into the se-notif was great.
You must check the part when we change the wsdl at the endpoint name generation time.

Show
Frédéric Gardes added a comment - Fri, 24 Sep 2010 - 08:45:41 +0200 - edited It 's a regression. Previously, the generated endpoint was stored into the wsdl into the repository. i.e. the string 'petals:autogenerated' was replaced by 'petals:uid:xxxx'. So when the bus restarted, the wsdl used the same endpoint name as previously, and the value into the se-notif was great. You must check the part when we change the wsdl at the endpoint name generation time.
Hide
Christophe Hamerling added a comment - Thu, 23 Sep 2010 - 23:43:21 +0200

Previous comment is false. Since the endpoint is an autogenerated one, on restart the endpoint name is not the same than the one which has been stored by the se-notification. In the se-notification code, the service endpoint returned is null and not checked, the interface is set on the message exchange and so the message router takes the first endpoint with the given interface : There are potentially tens of endpoint with this interface...

Show
Christophe Hamerling added a comment - Thu, 23 Sep 2010 - 23:43:21 +0200 Previous comment is false. Since the endpoint is an autogenerated one, on restart the endpoint name is not the same than the one which has been stored by the se-notification. In the se-notification code, the service endpoint returned is null and not checked, the interface is set on the message exchange and so the message router takes the first endpoint with the given interface : There are potentially tens of endpoint with this interface...
Hide
Christophe Hamerling added a comment - Thu, 23 Sep 2010 - 17:14:23 +0200

It seems that Petals ESB does not returns the right service on call org.ow2.petals.jbi.component.context.ComponentContextImpl.getEndpoint(QName, String) when endpoint is not found ie a ServiceEndpoint is returned even if there is no endpoint with the given value

Show
Christophe Hamerling added a comment - Thu, 23 Sep 2010 - 17:14:23 +0200 It seems that Petals ESB does not returns the right service on call org.ow2.petals.jbi.component.context.ComponentContextImpl.getEndpoint(QName, String) when endpoint is not found ie a ServiceEndpoint is returned even if there is no endpoint with the given value

People

Dates

  • Created:
    Thu, 23 Sep 2010 - 16:16:34 +0200
    Updated:
    Tue, 2 Nov 2010 - 17:23:26 +0100
    Resolved:
    Fri, 24 Sep 2010 - 16:35:27 +0200