我有一些在Spring中使用的定制模块。我可以使用“模块上传”来部署XD,没有任何问题,但在以分布式模式运行时,我有以下例外:
org.springframework.xd.dirt.module.NoSuchModuleException: Could not find module with name 'grobid' and type 'processor'我正在使用SpringXD1.1.1.RELEASE创建带有docker的XD集群。
server-unknown:>admin config server http://docker:9393
Successfully targeted http://docker:9393
xd:>module upload --type processor --name grobid --file /opt/.../grobid-1.0-SNAPSHOT.jar
Successfully uploaded module 'processor:grobid'
xd:>stream create --name grobidTest --definition "http --port=11001 | grobid --grobidHost=http://${GROBID_PORT_8080_TCP_ADDR}:${GROBID_PORT_8080_TCP_PORT} | processedXml:log"
Created new stream 'grobidTest'
xd:>stream deploy --name grobidTest --properties "module.grobid.count=1"
Deployed stream 'grobidTest'根据文档,我已经设置了一个独立的redis实例,并且在引导XD时没有日志,表明了它的任何连接问题。
是什么原因导致我的模块对节点不可用,而在shell中,我可以访问它的信息:
xd:>module info --name processor:grobid
Information about processor module 'grobid':
Option Name Description Default Type
----------- ----------------------------------------------------- ------- --------
grobidHost Grobid Host <none> String
outputType how this module should emit messages it produces <none> MimeType
inputType how this module should interpret messages it consumes <none> MimeType到目前为止,我在日志中看到的唯一问题(我不知道它是否是一个阻止程序)是,当我创建流时,会记录一些ZK错误:
zk_1 | 2015-04-13 19:55:37,257 [myid:] - INFO [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when processing sessionid:0x14cb4593f940001 type:create cxid:0x59 zxid:0x36 txntype:-1 reqpath:n/a Error Path:/xd/modules/sink/log/dependencies Error:KeeperErrorCode = NoNode for /xd/modules/sink/log/dependencies
zk_1 | 2015-04-13 19:55:37,273 [myid:] - INFO [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when processing sessionid:0x14cb4593f940001 type:create cxid:0x64 zxid:0x3c txntype:-1 reqpath:n/a Error Path:/xd/modules/processor/grobid/dependencies Error:KeeperErrorCode = NoNode for /xd/modules/processor/grobid/dependencies
zk_1 | 2015-04-13 19:55:37,289 [myid:] - INFO [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when processing sessionid:0x14cb4593f940001 type:create cxid:0x6e zxid:0x41 txntype:-1 reqpath:n/a Error Path:/xd/modules/source/http/dependencies Error:KeeperErrorCode = NoNode for /xd/modules/source/http/dependencies发布于 2015-04-14 13:09:32
Spring在https://github.com/spring-projects/spring-xd/commit/208181c9f4693d2ef2e4e0d4065d9d8727fa1601中添加了“共享远程模块注册表”的概念(在编写本报告时为1.2,未发布)。这依赖于共享位置,大概是HDFS。
在此之前,如果要使用带有自定义上载模块的集群,则需要以某种方式使所有容器都可以使用模块写入的位置。传统的方法是使用类似NFS的东西。
但是,如果您使用的是docker (而且您似乎正在使用,也不确定这是否仅在一个主机上),您可以为此使用一个码头数据体积。
为了澄清,这最后两段甚至适用于SpringXD1.1.x
https://stackoverflow.com/questions/29612243
复制相似问题