Uploaded image for project: 'ActiveMQ C++ Client'
  1. ActiveMQ C++ Client
  2. AMQCPP-377

Does not detect broken connection on Windows

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 3.3.0
    • None
    • Openwire
    • None
    • Windows XP, Windows 7

    Description

      Inactivity monitor does not detect broken connection.
      transportInterrupted and transportResumed not called.

      Attachments

        Activity

          Not really enough information to go on here. Under what circumstances is the problem occurring? What is your URI that you are using to connect?

          tabish Timothy A. Bish added a comment - Not really enough information to go on here. Under what circumstances is the problem occurring? What is your URI that you are using to connect?

          string brokerURI =
          "failover:(tcp://"servername":61616"
          "?wireFormat=openwire"
          "&soKeepAlive=true"
          "&jms.useCompression=true"
          "&jms.prefetchPolicy.queuePrefetch=1"
          ")";

          This problem occurs if the connection is dropped in the middle.
          For example, node A is connected to the router B, which is connected to the server C. If lost connection between nodes B and C, then node A about anything without getting caught.

          jao Pavel Jaoshvili added a comment - string brokerURI = "failover:(tcp://" servername ":61616" "?wireFormat=openwire" "&soKeepAlive=true" "&jms.useCompression=true" "&jms.prefetchPolicy.queuePrefetch=1" ")"; This problem occurs if the connection is dropped in the middle. For example, node A is connected to the router B, which is connected to the server C. If lost connection between nodes B and C, then node A about anything without getting caught.

          You may want to try out v3.4.0 to see if any of the fixes in that release help you out. Also the uri options in your example aren't quite correct. See the configuration page for CMS for the correct options: http://activemq.apache.org/cms/configuring.html.

          tabish Timothy A. Bish added a comment - You may want to try out v3.4.0 to see if any of the fixes in that release help you out. Also the uri options in your example aren't quite correct. See the configuration page for CMS for the correct options: http://activemq.apache.org/cms/configuring.html .

          On v3.4.0 problem still exists.

          May this be due to compilation warnings?
          c:\Temp\amq\activemq-cpp-library\src\main\decaf/lang/Throwable.h(44) : warning C4275: non dll-interface class 'std::exception' used as base for dll-interface class 'decaf::lang::Throwable'
          C:\Program Files\Microsoft Visual Studio 9.0\VC\include\exception(95) : see declaration of 'std::exception'
          c:\Temp\amq\activemq-cpp-library\src\main\decaf/lang/Throwable.h(44) : see declaration of 'decaf::lang::Throwable'

          What connection settings are responsible for the work of InactivityMonitor?

          jao Pavel Jaoshvili added a comment - On v3.4.0 problem still exists. May this be due to compilation warnings? c:\Temp\amq\activemq-cpp-library\src\main\decaf/lang/Throwable.h(44) : warning C4275: non dll-interface class 'std::exception' used as base for dll-interface class 'decaf::lang::Throwable' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\exception(95) : see declaration of 'std::exception' c:\Temp\amq\activemq-cpp-library\src\main\decaf/lang/Throwable.h(44) : see declaration of 'decaf::lang::Throwable' What connection settings are responsible for the work of InactivityMonitor?
          jao Pavel Jaoshvili added a comment - - edited

          string brokerURI =
          "failover:(tcp://"servername":61616"
          "?wireFormat=openwire"
          "&wireFormat.maxInactivityDuration=5000"
          ")";

          Not working too

          jao Pavel Jaoshvili added a comment - - edited string brokerURI = "failover:(tcp://" servername ":61616" "?wireFormat=openwire" "&wireFormat.maxInactivityDuration=5000" ")"; Not working too

          The InactivityMonitor looks at the wireFormat.maxInactivityDuration. Since this isn't reproducible on my end you will need to step into the inactivity monitor code and see why the timers aren't firing off errors when the connection drops.

          tabish Timothy A. Bish added a comment - The InactivityMonitor looks at the wireFormat.maxInactivityDuration. Since this isn't reproducible on my end you will need to step into the inactivity monitor code and see why the timers aren't firing off errors when the connection drops.

          To reproduce the problem, you can run producer in the virtual machine. After disabling the network producer will not detect broken connection.

          jao Pavel Jaoshvili added a comment - To reproduce the problem, you can run producer in the virtual machine. After disabling the network producer will not detect broken connection.

          Any suggestions?
          In addition. if connection is broken it's impossible to properly terminate the application. It hangs on session->close() or connection->close().

          jao Pavel Jaoshvili added a comment - Any suggestions? In addition. if connection is broken it's impossible to properly terminate the application. It hangs on session->close() or connection->close().

          I haven't had any time to work on it, my suggestion is still that you do some debugging of the InactivityMonitor class to see what is going on there that causes the connection drop to be missed. You can also take a look at trunk to see the recent patch to ActiveMQConnection and try that to see if that helps your close problem.

          tabish Timothy A. Bish added a comment - I haven't had any time to work on it, my suggestion is still that you do some debugging of the InactivityMonitor class to see what is going on there that causes the connection drop to be missed. You can also take a look at trunk to see the recent patch to ActiveMQConnection and try that to see if that helps your close problem.

          Can't seem to find any cases where the inactivity is not detected and the connection restored.

          tabish Timothy A. Bish added a comment - Can't seem to find any cases where the inactivity is not detected and the connection restored.

          People

            tabish Timothy A. Bish
            jao Pavel Jaoshvili
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: