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

jms source cannot create connection factory with username if passwordFile property is absent

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • notrack
    • notrack
    • None
    • RHEL 7
      Hadoop3
      Flume 1.11.0

    Description

      Currently, adding passwordFile properties for the JMS Source in the Flume agent config file becomes mandatory in flume config to pass username in connection factory.
      JQueue manager in IBM MQ can just require username and disable password checking
      ( Reference : https://www.ibm.com/docs/en/ibm-mq/9.1?topic=authentication-connection-configuration)

      Following are the error messages when trying to configure Flume with IBM MQ

      1. If_ passwordFile property contains null - due to
      com.ibm.msg.client.jms.DetailedJMSException: JMSCC0005: The specified value '<null>' is not allowed for 'XMSC_WMQ_CHANNEL'. This is due to setting null in https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java#L173

      2. _If passwordFile property doesn't exist _- get error
      Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').

      3. If passwordFile property contains a "" string/any other string, then it is able to connect to MQ server successfully. Since JMS source is configured to ignore password passed.

      Also going over JIRA https://issues.apache.org/jira/browse/FLUME-2976 suggests that when no user name and p/w is passed, null should be passed instead of empty string.

      I think,
      whenever username is passed default password should be set to Optional("") and a warn log can be enabled saying that default password is set since passwordFile property is not set.

      1. UN & P/W property set - pass both as set
      2. UN set - set p/w as "" and warn log
      3. UN & P/W not set - no change, same behaviour as of now

      password = Optional.absent();
      causes java.lang.IllegalStateException: Optional.get() cannot be called on an absent value

      Attachments

        Issue Links

          Activity

            People

              nikitapande Nikita Pande
              nikitapande Nikita Pande
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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