Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-5869

JMS Connection Fails After JMS servers Change behind JNDI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.8.0
    • 1.9.0
    • Extensions
    • None

    Description

      JMS Connection Fails After JMS servers Change behind JNDI.

      Reproduce:

      1. Define and enable JNDI Controller Service
      2. Create a flow with ConsumeJMS or PublishJMS processors with controller service defined in #1.
      3. Consume and publish at least one message to ensure the connectivity can be established.
      4. Change JNDI configuration for the same connection factory to point to new JMS servers.
      5. Stop JMS service on previous servers
      6. Observe failure in ConsumeJMS/PublishJMS (Caused by: javax.jms.JMSException: Failed to connect to any server at: tcp://jms_server1:12345)

       

      Work Around:

      1. Disable JNDI Controller Service
      2. Enable JNDI Controller Service and dependent processors.

       

      Possible Issue/Fix:

      • AbstractJMSProcessor has a method "buildTargetResource", in which connection factory is instantiated and then cached in workerPool in onTrigger .
      • Issue: Once cached, it will be reused forever.
      • Fix: on connectivity failure there should be an attempt to rebuild the worker. 

      Attachments

        1. 3261.patch.txt
          15 kB
          Ed Berezitsky
        2. JNDI_JMS_Exception.txt
          5 kB
          Ed Berezitsky

        Issue Links

          Activity

            People

              bdesert Ed Berezitsky
              bdesert Ed Berezitsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m