You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Joe Fernandez (JIRA)" <ji...@apache.org> on 2009/06/25 14:44:36 UTC

[jira] Created: (AMQ-2305) TransportConnection Ignores isShutdownOnSlaveFailure

TransportConnection Ignores isShutdownOnSlaveFailure
----------------------------------------------------

                 Key: AMQ-2305
                 URL: https://issues.apache.org/activemq/browse/AMQ-2305
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
         Environment: ActiveMQ 5.2, Java 5, Windoze XP Pro 
            Reporter: Joe Fernandez


In a pure Master/Slave configuration, when the slave fails the TransportConnection invokes the MasterBroker's stop() method without taking into consideration the shutdownOnSlaveFailure boolean, which by default is set to false.  So even if shutdownOnSlaveFailure  is set to false, all my plugin brokers' stop methods get invoked when the slave fails.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2305) TransportConnection Ignores isShutdownOnSlaveFailure

Posted by "Joe Fernandez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Fernandez updated AMQ-2305:
-------------------------------

    Attachment: TransportConnection.patch

attached patch

> TransportConnection Ignores isShutdownOnSlaveFailure
> ----------------------------------------------------
>
>                 Key: AMQ-2305
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2305
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: ActiveMQ 5.2, Java 5, Windoze XP Pro 
>            Reporter: Joe Fernandez
>         Attachments: TransportConnection.patch
>
>
> In a pure Master/Slave configuration, when the slave fails the TransportConnection invokes the MasterBroker's stop() method without taking into consideration the shutdownOnSlaveFailure boolean, which by default is set to false.  So even if shutdownOnSlaveFailure  is set to false, all my plugin brokers' stop methods get invoked when the slave fails.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2305) TransportConnection Ignores isShutdownOnSlaveFailure

Posted by "Joe Fernandez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52493#action_52493 ] 

Joe Fernandez commented on AMQ-2305:
------------------------------------

gary, i don't have a stack trace but below is some debug output

note my embedded notes, which i've pointed out with  '<----'

the cfg files for the master and slave follow the debug output; both brokers wrote to the same log file 

2009-06-25 21:09:33,718 [/127.0.0.1:3457] INFO  TransportConnection            - Slave Broker slave is attached
2009-06-25 21:09:39,078 [Thread-4       ] INFO  BrokerService                  - ActiveMQ Message Broker (slave, ID:DIEGO-3454-1245978572796-1:0) is shutting down
2009-06-25 21:09:39,078 [Thread-4       ] DEBUG BrokerService                  - Caught exception, must be shutting down: java.lang.IllegalStateException: Shutdown in progress
2009-06-25 21:09:39,093 [Thread-4       ] DEBUG VMTransportFactory             - Shutting down VM connectors for broker: slave
2009-06-25 21:09:39,093 [r: vm://slave#0] DEBUG TransportConnection            - Stopping connection: vm://slave#0
2009-06-25 21:09:39,093 [r: vm://slave#0] DEBUG TransportConnection            - Stopped transport: vm://slave#0
2009-06-25 21:09:39,093 [r: vm://slave#0] DEBUG TransportConnection            - Cleaning up connection resources: vm://slave#0
2009-06-25 21:09:39,093 [r: vm://slave#0] DEBUG TransportConnection            - Connection Stopped: vm://slave#0
2009-06-25 21:09:39,093 [Thread-4       ] INFO  TransportConnector             - Connector vm://slave Stopped
2009-06-25 21:09:39,109 [Thread-4       ] DEBUG TcpTransport                   - Stopping transport tcp://localhost/127.0.0.1:61616
2009-06-25 21:09:39,109 [/127.0.0.1:3457] DEBUG TransportConnection            - Stopping connection: /127.0.0.1:3457

2009-06-25 21:09:39,109 [/127.0.0.1:3457] DEBUG JoeBroker                  - stop: Entered <---- this is my Broker plugin's stop method getting called

2009-06-25 21:09:39,109 [Thread-4       ] INFO  TransportConnector             - Connector tcp://localhost:61617 Stopped
2009-06-25 21:09:39,125 [Thread-4       ] INFO  BrokerService                  - ActiveMQ JMS Message Broker (slave, ID:DIEGO-3454-1245978572796-1:0) stopped
org.apache.activemq:BrokerName=master,Type=XXXXX, XXXX=ActiveMQ XXXXX
2009-06-25 21:09:39,156 [/127.0.0.1:3457] DEBUG TcpTransport                   - Stopping transport tcp:///127.0.0.1:3457
2009-06-25 21:09:39,156 [/127.0.0.1:3457] DEBUG TransportConnection            - Stopped transport: /127.0.0.1:3457
2009-06-25 21:09:39,156 [/127.0.0.1:3457] DEBUG TransportConnection            - Connection Stopped: /127.0.0.1:3457
2009-06-25 21:09:43,437 [MQ ShutdownHook] INFO  BrokerService                  - ActiveMQ Message Broker (master, ID:DIEGO-3450-1245978553937-0:0) is shutting down
2009-06-25 21:09:43,437 [MQ ShutdownHook] DEBUG BrokerService                  - Caught exception, must be shutting down: java.lang.IllegalStateException: Shutdown in progress
2009-06-25 21:09:45,359 [MQ ShutdownHook] INFO  TransportConnector             - Connector tcp://localhost:61616 Stopped

2009-06-25 21:09:45,375 [MQ ShutdownHook] DEBUG JoeBroker                  - stop: Entered <---- This is my plugin's stop method getting called a second time
2009-06-25 21:09:45,375 [MQ ShutdownHook] DEBUG JoeBroker                  - stop: JoeBroker has already been stopped

2009-06-25 21:09:45,375 [MQ ShutdownHook] INFO  BrokerService                  - ActiveMQ JMS Message Broker (master, ID:DIEGO-3450-1245978553937-0:0) stopped


This is the slave's  cfg file

<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.org/config/1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.org/config/1.0 http://activemq.apache.org/schema/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">

  <!-- Allows us to use system properties as variables in this configuration file -->
  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker xmlns="http://activemq.org/config/1.0" brokerName="slave" masterConnectorURI="tcp://localhost:61616" deleteAllMessagesOnStartup="true" persistent="false">
  
    <!-- The transport connectors ActiveMQ will listen to -->
    <transportConnectors>
       <transportConnector uri="tcp://localhost:61617" />
    </transportConnectors>

  </broker>

</beans>


This is the master's cfg file 

<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.org/config/1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.org/config/1.0 http://activemq.apache.org/schema/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">

  <!-- Allows us to use system properties as variables in this configuration file -->
  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker xmlns="http://activemq.org/config/1.0" brokerName="master" persistent="false" deleteAllMessagesOnStartup="true" plugins="#joe">
  
    <!-- The transport connectors ActiveMQ will listen to -->
    <transportConnectors>
       <transportConnector uri="tcp://localhost:61616" />      
    </transportConnectors>

  </broker>
  
  <bean id="joe" class="com.ttm.activemq.joe.JoePlugin"/>	

</beans>






> TransportConnection Ignores isShutdownOnSlaveFailure
> ----------------------------------------------------
>
>                 Key: AMQ-2305
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2305
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: ActiveMQ 5.2, Java 5, Windoze XP Pro 
>            Reporter: Joe Fernandez
>            Assignee: Gary Tully
>         Attachments: TransportConnection.patch
>
>
> In a pure Master/Slave configuration, when the slave fails the TransportConnection invokes the MasterBroker's stop() method without taking into consideration the shutdownOnSlaveFailure boolean, which by default is set to false.  So even if shutdownOnSlaveFailure  is set to false, all my plugin brokers' stop methods get invoked when the slave fails.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2305) TransportConnection Ignores isShutdownOnSlaveFailure

Posted by "Joe Fernandez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Fernandez updated AMQ-2305:
-------------------------------

    Affects Version/s: 5.2.0

> TransportConnection Ignores isShutdownOnSlaveFailure
> ----------------------------------------------------
>
>                 Key: AMQ-2305
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2305
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: ActiveMQ 5.2, Java 5, Windoze XP Pro 
>            Reporter: Joe Fernandez
>
> In a pure Master/Slave configuration, when the slave fails the TransportConnection invokes the MasterBroker's stop() method without taking into consideration the shutdownOnSlaveFailure boolean, which by default is set to false.  So even if shutdownOnSlaveFailure  is set to false, all my plugin brokers' stop methods get invoked when the slave fails.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-2305) TransportConnection Ignores isShutdownOnSlaveFailure

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-2305.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 5.3.0

Joe, it did not commit your patch as is, but changed the MasterBroker filter to not propagate the stop request and just remove it's self. I think this is the correct thing to do in this scenario as not stopping the MasterBroker filter will just ensure that it fails to sync with the slave. The test case shows that this fix stops a plugin getting a stop request.

> TransportConnection Ignores isShutdownOnSlaveFailure
> ----------------------------------------------------
>
>                 Key: AMQ-2305
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2305
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: ActiveMQ 5.2, Java 5, Windoze XP Pro 
>            Reporter: Joe Fernandez
>            Assignee: Gary Tully
>             Fix For: 5.3.0
>
>         Attachments: TransportConnection.patch
>
>
> In a pure Master/Slave configuration, when the slave fails the TransportConnection invokes the MasterBroker's stop() method without taking into consideration the shutdownOnSlaveFailure boolean, which by default is set to false.  So even if shutdownOnSlaveFailure  is set to false, all my plugin brokers' stop methods get invoked when the slave fails.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2305) TransportConnection Ignores isShutdownOnSlaveFailure

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52476#action_52476 ] 

Gary Tully commented on AMQ-2305:
---------------------------------

joe, do u have a stack trace to the stop call. I see serviceTransportException has the check, I am wondering what the other path to stop is?

> TransportConnection Ignores isShutdownOnSlaveFailure
> ----------------------------------------------------
>
>                 Key: AMQ-2305
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2305
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: ActiveMQ 5.2, Java 5, Windoze XP Pro 
>            Reporter: Joe Fernandez
>            Assignee: Gary Tully
>         Attachments: TransportConnection.patch
>
>
> In a pure Master/Slave configuration, when the slave fails the TransportConnection invokes the MasterBroker's stop() method without taking into consideration the shutdownOnSlaveFailure boolean, which by default is set to false.  So even if shutdownOnSlaveFailure  is set to false, all my plugin brokers' stop methods get invoked when the slave fails.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AMQ-2305) TransportConnection Ignores isShutdownOnSlaveFailure

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully reassigned AMQ-2305:
-------------------------------

    Assignee: Gary Tully

> TransportConnection Ignores isShutdownOnSlaveFailure
> ----------------------------------------------------
>
>                 Key: AMQ-2305
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2305
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: ActiveMQ 5.2, Java 5, Windoze XP Pro 
>            Reporter: Joe Fernandez
>            Assignee: Gary Tully
>         Attachments: TransportConnection.patch
>
>
> In a pure Master/Slave configuration, when the slave fails the TransportConnection invokes the MasterBroker's stop() method without taking into consideration the shutdownOnSlaveFailure boolean, which by default is set to false.  So even if shutdownOnSlaveFailure  is set to false, all my plugin brokers' stop methods get invoked when the slave fails.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.