无法在云代工厂中使用流执行任务

时间:2017-08-24 05:54:38

标签: cloudfoundry spring-cloud-stream pivotal-cloud-foundry spring-cloud-dataflow

我创建了一个在本地工作的流,并且能够通过将spring-cloud-deployer-local依赖保持在接收器应用程序的类路径中来执行任务。现在,我希望通过使用spring-cloud-deployer-cloudfoundry更改部署程序,在PCF中测试相同的应用程序,但应用程序无法在PCF中启动。请找到相同的PCF日志。

PCF日志

2017-08-24T11:14:08.916+05:30 [APP/PROC/WEB/0] [OUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
2017-08-24T11:14:08.916+05:30 [APP/PROC/WEB/0] [OUT] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
2017-08-24T11:14:08.916+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [app/:na]
2017-08-24T11:14:08.916+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [app/:na]
2017-08-24T11:14:08.916+05:30 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cloudFoundryClient' defined in class path resource [org/springframework/cloud/deployer/spi/cloudfoundry/CloudFoundryDeployerAutoConfiguration.class]: Unsatisfied dependency expressed through method 'cloudFoundryClient' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionContext' defined in class path resource [org/springframework/cloud/deployer/spi/cloudfoundry/CloudFoundryDeployerAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.cloudfoundry.reactor.ConnectionContext]: Factory method 'connectionContext' threw exception; nested exception is java.lang.NoClassDefFoundError: reactor/core/Loopback
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] ... 67 common frames omitted
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] ... 40 common frames omitted
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.cloudfoundry.reactor.ConnectionContext]: Factory method 'connectionContext' threw exception; nested exception is java.lang.NoClassDefFoundError: reactor/core/Loopback
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.cloudfoundry.reactor.DefaultConnectionContext$InitShim.getHttpClient(DefaultConnectionContext.java:80) ~[cloudfoundry-client-reactor-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.cloudfoundry.reactor.DefaultConnectionContext$Builder.build(DefaultConnectionContext.java:707) ~[cloudfoundry-client-reactor-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] Caused by: java.lang.ClassNotFoundException: reactor.core.Loopback
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionContext' defined in class path resource [org/springframework/cloud/deployer/spi/cloudfoundry/CloudFoundryDeployerAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.cloudfoundry.reactor.ConnectionContext]: Factory method 'connectionContext' threw exception; nested exception is java.lang.NoClassDefFoundError: reactor/core/Loopback
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] ... 54 common frames omitted
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] Caused by: java.lang.NoClassDefFoundError: reactor/core/Loopback
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.cloudfoundry.reactor.DefaultConnectionContext.<init>(DefaultConnectionContext.java:58) ~[cloudfoundry-client-reactor-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryDeployerAutoConfiguration$$EnhancerBySpringCGLIB$$2fcccf4d.connectionContext(<generated>) ~[spring-cloud-deployer-cloudfoundry-1.0.0.RELEASE.jar!/:1.0.0.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94) ~[app/:na]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.cloudfoundry.reactor._DefaultConnectionContext.getHttpClient(_DefaultConnectionContext.java:76) ~[cloudfoundry-client-reactor-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.cloudfoundry.reactor.DefaultConnectionContext.<init>(DefaultConnectionContext.java:26) ~[cloudfoundry-client-reactor-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryDeployerAutoConfiguration$$EnhancerBySpringCGLIB$$2fcccf4d.CGLIB$connectionContext$5(<generated>) ~[spring-cloud-deployer-cloudfoundry-1.0.0.RELEASE.jar!/:1.0.0.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryDeployerAutoConfiguration$$EnhancerBySpringCGLIB$$2fcccf4d$$FastClassBySpringCGLIB$$ec33067f.invoke(<generated>) ~[spring-cloud-deployer-cloudfoundry-1.0.0.RELEASE.jar!/:1.0.0.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] ... 68 common frames omitted
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.cloudfoundry.reactor.DefaultConnectionContext.access$1101(DefaultConnectionContext.java:26) ~[cloudfoundry-client-reactor-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryDeployerAutoConfiguration.connectionContext(CloudFoundryDeployerAutoConfiguration.java:78) ~[spring-cloud-deployer-cloudfoundry-1.0.0.RELEASE.jar!/:1.0.0.RELEASE]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_131]
2017-08-24T11:14:08.917+05:30 [APP/PROC/WEB/0] [OUT] ... 97 common frames omitted
2017-08-24T11:14:08.951+05:30 [APP/PROC/WEB/0] [OUT] Exit status 1
2017-08-24T11:14:08.973+05:30 [CELL/0] [OUT] Exit status 0
2017-08-24T11:14:08.978+05:30 [CELL/0] [OUT] Destroying container
2017-08-24T11:14:09.022+05:30 [API/0] [OUT] Process has crashed with type: "web"
2017-08-24T11:14:09.042+05:30 [API/0] [OUT] App instance exited with guid 6c0ef8e6-e143-4ee6-a323-5290222ed17c payload: {"instance"=>"", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 2 error(s) occurred:\n\n* Exited with status 1\n* cancelled\n* cancelled", "crash_count"=>3, "crash_timestamp"=>1503553448976863055, "version"=>"64342f00-d9a7-460b-a8e1-ed9e61dfcc0c"}
2017-08-24T11:14:09.784+05:30 [CELL/0] [OUT] Successfully destroyed container

了解更多信息,请告诉我

1 个答案:

答案 0 :(得分:1)

显然,你错过了这个反应堆核心依赖:

<dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-core</artifactId> <version>${reactor.version}</version> </dependency>

选择反应堆堆芯的兼容版本。例如,如果您使用的是CF deployer 1.2.x,那么请选择任何3.0.x版本的reactor-core。

相关问题