2017-02-20 7 views
0

私は次の記事に同様の問題を扱っています:JIRAチケットのを見て、また春XD - プレースホルダ 'xd.module.sequence' を解決できませんでした

Spring -XD Stream deployment failure

issue in spring xd cluster when deploying my module

オープンしました:https://jira.spring.io/browse/XD-3727

は、私は、カスタムトランスモジュールとの基本的な流れを作成:ローカルstream create test-stream --definition "file | enricher | log" --deploy 、ときR私のjarのアップロードとストリームが正常に作成されています。分散モードで実行している場合しかし、ストリームがオンに失敗します。ログに

2017-02-20T22:40:11+0000 1.3.0.RELEASE WARN 61699 DeploymentsPathChildrenCache-0 annotation.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt 
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'objectNameProperties' defined in null: Could not resolve placeholder 'xd.module.sequence' in string value "${xd.module.sequence}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'xd.module.sequence' in string value "${xd.module.sequence}" 
    at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:211) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
    at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:222) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
    at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:86) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:284) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:166) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:674) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:519) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686) [spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE] 
    at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139) [spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE] 
    at org.springframework.xd.module.core.SimpleModule.initialize(SimpleModule.java:213) [spring-xd-module-1.3.0.RELEASE.jar:1.3.0.RELEASE] 
    at org.springframework.xd.dirt.module.ModuleDeployer.doDeploy(ModuleDeployer.java:217) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 
    at org.springframework.xd.dirt.module.ModuleDeployer.deploy(ModuleDeployer.java:200) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 
    at org.springframework.xd.dirt.server.container.DeploymentListener.deployModule(DeploymentListener.java:365) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 
    at org.springframework.xd.dirt.server.container.DeploymentListener.deployStreamModule(DeploymentListener.java:334) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 
    at org.springframework.xd.dirt.server.container.DeploymentListener.onChildAdded(DeploymentListener.java:181) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 
    at org.springframework.xd.dirt.server.container.DeploymentListener.childEvent(DeploymentListener.java:149) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE] 
    at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:509) [curator-recipes-2.6.0.jar:na] 
    at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:503) [curator-recipes-2.6.0.jar:na] 
    at org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:92) [curator-framework-2.6.0.jar:na] 
    at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) [guava-16.0.1.jar:na] 
    at org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:83) [curator-framework-2.6.0.jar:na] 
    at org.apache.curator.framework.recipes.cache.PathChildrenCache.callListeners(PathChildrenCache.java:500) [curator-recipes-2.6.0.jar:na] 
    at org.apache.curator.framework.recipes.cache.EventOperation.invoke(EventOperation.java:35) [curator-recipes-2.6.0.jar:na] 
    at org.apache.curator.framework.recipes.cache.PathChildrenCache$10.run(PathChildrenCache.java:762) [curator-recipes-2.6.0.jar:na] 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_51] 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_51] 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_51] 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_51] 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_51] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_51] 
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51] 
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'xd.module.sequence' in string value "${xd.module.sequence}" 
      at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174) ~[spring-core-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
      at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126) ~[spring-core-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:258) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:282) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:204) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitMap(BeanDefinitionVisitor.java:262) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:198) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:141) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:82) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
      at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:208) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE] 
      ... 31 common frames omitted 

を、私はこれを見ています:

2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [zk-properties] 
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [commandLineArgs] 
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [systemProperties] 
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [systemEnvironment] 
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [random] 
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [applicationConfig: [classpath:/application.yml]#container] 
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [applicationConfig: [file:/opt/pivotal/spring-xd-1.3.0.RELEASE/xd/config//servers.yml]] 
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [applicationConfig: [file:./config/servers.yml]] 
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [applicationConfig: [classpath:/application.yml]] 
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [applicationConfig: [classpath:/servers.yml]] 
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Could not find key 'spring.profiles.default' in any property source. Returning [null] 

を私は私の上にあるapplication.yml中= defaultxd.module.sequenceを設定してみました私のモジュールのクラスパスは、ログが表示されてから:Searching for key 'spring.profiles.default' in [applicationConfig: [classpath:/application.yml]]です。しかし、同じ例外がスローされました。誰もこの問題を回避する方法についての洞察を提供できますか?

+0

ああ、私はあなたがJIRAを参照したのを見る - これは単に変です。明らかにコンテナに何か問題があります。プラグインがプロパティに値を設定していない理由を調べるために、そのコンテナでデバッガを実行する必要があるのではないかと心配しています。私たちはこの問題を再現できませんでした。 –

+0

あなたはどのバージョンのXDを使用していますか? –

+0

これはバージョン1.3.0です。リリース –

答えて

0

これは回避策ですが、Spring Integration MBeanが不要な場合はmbean-exporters.xml<int-jmx:mbean-exporter/>および関連するBeanを持たないものに置き換えることができます。

This answerは、その設定ファイルをカスタムファイルに置き換える方法を示しています。

また、servers.ymlでJMXを無効にすることもできます。

MBeanが必要な場合は、sequenceプロパティに固有の値を設定する必要があります。おそらく増加するAtomicInteger<bean/>

関連する問題