Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2976

Exception when JMS source tries to connect to a Weblogic server without authentication

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.9.0
    • Component/s: Sinks+Sources
    • Labels:

      Description

      If no userName and passwordFile is set for the JMS source it sets the password to Optional("") (see: https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java#L127)
      This leads to an exception in the weblogic jndi context implementation when trying to connect to a weblogic jms server.

      java.lang.IllegalArgumentException: The 'java.naming.security.principal' property has not been specified
      	at weblogic.jndi.Environment.getSecurityUser(Environment.java:562)
      	at weblogic.jndi.WLInitialContextFactoryDelegate.pushSubject(WLInitialContextFactoryDelegate.java:665)
      	at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:485)
      	at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:373)
      	at weblogic.jndi.Environment.getContext(Environment.java:319)
      	at weblogic.jndi.Environment.getContext(Environment.java:288)
      	at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
      	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
      	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
      	at javax.naming.InitialContext.init(InitialContext.java:242)
      	at javax.naming.InitialContext.<init>(InitialContext.java:216)
      	at org.apache.flume.source.jms.InitialContextFactory.create(InitialContextFactory.java:28)
      	at org.apache.flume.source.jms.JMSSource.doConfigure(JMSSource.java:223)
      

      Changing the above mentioned line to Optional.absent() fixes the issue.

      Brock Noland: Is there any specific reason for setting the password to Optional("") when there is no passwordFile set?

        Attachments

        1. FLUME-2976.patch
          6 kB
          Denes Arvay
        2. FLUME-2976-2.patch
          6 kB
          Denes Arvay

          Issue Links

            Activity

              People

              • Assignee:
                denes Denes Arvay
                Reporter:
                denes Denes Arvay
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: