我正在尝试设置一个使用JMS作为源和HDFS作为接收器的水槽代理。
我遵循的步骤是
1)通过
创建.binding文件```
git clone https://github.com/ibm-messaging/mq-docker.git
docker volume create qm1data
docker run \
--env LICENSE=accept \
--env MQ_QMGR_NAME=QM1 \
--publish 1414:1414 \
--publish 9443:9443 \
--volume mqvol:/tmp/mq --detach mq
转至/ opt / mqm / java / bin / JMSAdmin - >
DEFINE QCF(confact) QMGR(QM1) tran(client) chan(DEV.ADMIN.SVRCONN) host(10.2.201.80) port(1414)
DEFINE Q(DEV.QUEUE.1) QUEUE(DEV.QUEUE.1) QMGR(QM1)
end
```
2)使用以下有用链接how to use .binding file for JMS to HDFS
删除相关的jar和.binding文件。3)启动flume agent仅获取以下错误消息
org.apache.flume.FlumeException: Could not lookup ConnectionFactory
at org.apache.flume.source.jms.JMSSource.doConfigure(JMSSource.java:233)
at org.apache.flume.source.BasicSourceSemantics.configure(BasicSourceSemantics.java:65)
at org.apache.flume.source.AbstractPollableSource.configure(AbstractPollableSource.java:65)
at org.apache.flume.conf.Configurables.configure(Configurables.java:41)
at org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:326)
at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:101)
at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:141)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.naming.NameNotFoundException: confact
at com.sun.jndi.fscontext.RefFSContext.getObjectFromBindings(RefFSContext.java:400)
at com.sun.jndi.fscontext.RefFSContext.lookupObject(RefFSContext.java:327)
at com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
at com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.apache.flume.source.jms.JMSSource.doConfigure(JMSSource.java:231)
其中confact
是我创建的工厂。
绑定文件类似于
cat /var/lib/flume-ng/plugins.d/ibmmqjms/jndi/.binding|head -10
#This file is used by the JNDI FSContext.
#Sun Feb 18 13:41:26 UTC 2018
confact/RefAddr/30/Encoding=String
confact/RefAddr/19/Content=unspecified
confact/RefAddr/26/Content=1
confact/RefAddr/33/Content=0
confact/RefAddr/70/Content=443
confact/RefAddr/15/Content=false
confact/RefAddr/22/Content=1
confact/RefAddr/102/Type=XMSC_CONNECTION_TYPE
我怀疑由于某种原因JNDI绑定没有发生。 任何帮助表示赞赏。
由于 ..Manas
答案 0 :(得分:0)
问题是绑定文件名应该被称为.bindings
而不是.binding