You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flume.apache.org by "Nikita Pande (Jira)" <ji...@apache.org> on 2023/10/24 18:47:00 UTC

[jira] [Commented] (FLUME-3468) jms source cannot create connection factory with username if passwordFile property is absent

    [ https://issues.apache.org/jira/browse/FLUME-3468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17779205#comment-17779205 ] 

Nikita Pande commented on FLUME-3468:
-------------------------------------

[~rgoers] could u please review

> jms source cannot create connection factory with username if passwordFile property is absent
> --------------------------------------------------------------------------------------------
>
>                 Key: FLUME-3468
>                 URL: https://issues.apache.org/jira/browse/FLUME-3468
>             Project: Flume
>          Issue Type: Improvement
>    Affects Versions: notrack
>         Environment: RHEL 7
> Hadoop3
> Flume 1.11.0
>            Reporter: Nikita Pande
>            Assignee: Nikita Pande
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: notrack
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@flume.apache.org
For additional commands, e-mail: issues-help@flume.apache.org