【发布时间】:2015-11-21 01:00:34
【问题描述】:
我在 1.3.0 版本中遇到以下问题:
xd:>stream create test1 --definition 'http |路由器 --script="file:/tmp/file1.groovy"' --deploy
这部署得很好。
xd:>stream create test2 --definition 'http --port=9999 |路由器 --script="file:/tmp/file2.groovy"' --deploy
这是第二个流的日志跟踪:
2015-11-20T16:57:45-0800 1.3.0.RELEASE 错误 DeploymentsPathChildrenCache-0 container.DeploymentListener - 异常部署模块 org.springframework.jmx.export.UnableToRegisterMBeanException:无法 注册 MBean [org.springframework.integration.config.RouterFactoryBean#0] 带键 'org.springframework.integration.config.RouterFactoryBean#0';嵌套的 异常是 javax.management.InstanceAlreadyExistsException: org.springframework.integration.router:name=org.springframework.integration.config.RouterFactoryBean#0,type=MethodInvokingRouter 在 org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:625) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] 在 org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:550) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] 在 org.springframework.jmx.export.MBeanExporter.afterSingletonsInstantiated(MBeanExporter.java:432) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] 在 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:792) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 在 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:835) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] 在 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] 在 org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686) ~[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE] 在 org.springframework.boot.SpringApplication.run(SpringApplication.java:320) ~[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE] 在 org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139) ~[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE] 在 org.springframework.xd.module.core.SimpleModule.initialize(SimpleModule.java:213) ~[spring-xd-module-1.3.0.RELEASE.jar:1.3.0.RELEASE] 在 org.springframework.xd.dirt.module.ModuleDeployer.doDeploy(ModuleDeployer.java:217) ~[spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 在 org.springframework.xd.dirt.module.ModuleDeployer.deploy(ModuleDeployer.java:200) ~[spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 在 org.springframework.xd.dirt.server.container.DeploymentListener.deployModule(DeploymentListener.java:365) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 在 org.springframework.xd.dirt.server.container.DeploymentListener.deployStreamModule(DeploymentListener.java:334) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 在 org.springframework.xd.dirt.server.container.DeploymentListener.onChildAdded(DeploymentListener.java:181) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 在 org.springframework.xd.dirt.server.container.DeploymentListener.childEvent(DeploymentListener.java:149) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 在 org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:509) [curator-recipes-2.6.0.jar:na] 在 org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:503) [curator-recipes-2.6.0.jar:na] 在 org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:92) [curator-framework-2.6.0.jar:na] 在 com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) [guava-16.0.1.jar:na] 在 org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:83) [curator-framework-2.6.0.jar:na] 在 org.apache.curator.framework.recipes.cache.PathChildrenCache.callListeners(PathChildrenCache.java:500) [curator-recipes-2.6.0.jar:na] 在 org.apache.curator.framework.recipes.cache.EventOperation.invoke(EventOperation.java:35) [curator-recipes-2.6.0.jar:na] 在 org.apache.curator.framework.recipes.cache.PathChildrenCache$10.run(PathChildrenCache.java:762) [curator-recipes-2.6.0.jar:na] 在 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_45] 在 java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45] 在 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_45] 在 java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45] 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45] 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45] 在 java.lang.Thread.run(Thread.java:745) [na:1.8.0_45] 引起:javax.management.InstanceAlreadyExistsException: org.springframework.integration.router:name=org.springframework.integration.config.RouterFactoryBean#0,type=MethodInvokingRouter 在 com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437) ~[na:1.8.0_45] 在 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898) ~[na:1.8.0_45] 在 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966) ~[na:1.8.0_45] 在 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900) ~[na:1.8.0_45] 在 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324) ~[na:1.8.0_45] 在 com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) ~[na:1.8.0_45] 在 org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:195) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] 在 org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBeanExporter.java:678) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] 在 org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:615) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] ... 30 常见 框架省略 2015-11-20T16:57:45-0800 1.3.0.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - 路径 缓存事件: 路径=/deployments/modules/allocated/e38af683-03a1-4f46-abd9-abccb8aae1f3/test2.sink.router.1, type=CHILD_REMOVED 2015-11-20T16:57:45-0800 1.3.0.RELEASE 信息 DeploymentsPathChildrenCache-0 container.DeploymentListener - 取消部署模块 [ModuleDescriptor@56110771 moduleName = 'router', moduleLabel = '路由器',组 = 'test2',sourceChannelName = [null], sinkChannelName = [null], index = 1, type = sink, parameters = 地图['脚本'-> '文件:/tmp/dirt/att-example/groovy/transfer.router.cps.groovy'], 孩子=列表[[空]]]
【问题讨论】:
-
我确实尝试向路由器模块添加标签但不可用。
标签: spring-xd