Nikita Pande created FLUME-3468:
-----------------------------------
Summary: 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
Fix For: notrack
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: [email protected]
For additional commands, e-mail: [email protected]