通过Http启动任务使用Cloudsteam和Cloudfoundary Tasklauncher

时间:2017-05-30 08:44:45

标签: spring-cloud-stream pivotal-cloud-foundry spring-cloud-task

我尝试按消息启动Spring Cloud任务(Http Post)。 http - >处理器("将消息转换为Tasklaunchrequest") - > CloudFoundaryTasklauncher。我使用3个单独的服务 HTTP-Cnntroller(Source),RequestTransformer(处理器),Tasklauncher(Sink)。将POST消息发送到HTTP-Cnntroller并且Requesttransformation工作正常。但似乎Tasklaunching不起作用......我需要帮助(没有Spring Cloud Dataflow的解决方案)

环境:pcfdev版本6.26.0 + 9c9a261.2017-04-06。

Tasklauncher

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
importorg.springframework.cloud.task.launcher.annotation.EnableTaskLauncher;

@SpringBootApplication
@EnableTaskLauncher
public class DtaTaskLauncherSink {
    public static void main(String[] args) {
        SpringApplication.run(DtaTaskLauncherSink.class, args);
    }

}

<dependencies
   <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-task-stream</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-deployer-cloudfoundry</artifactId>
            <version>1.0.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-core</artifactId>
            <version>3.0.2.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>io.projectreactor.ipc</groupId>
            <artifactId>reactor-netty</artifactId>
            <version>0.5.1.RELEASE</version>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Brixton.SR4</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

日志:

2017-05-30T09:31:18.877+02:00 [APP/PROC/WEB/0] [OUT] 2017-05-30 07:31:18.875 INFO 5 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2017-05-30T09:31:18.883+02:00 [APP/PROC/WEB/0] [OUT] 2017-05-30 07:31:18.882 INFO 5 --- [ main] d.s.e.d.c.service.TaskLauncherSink : Started TaskLauncherSink in 22.374 seconds (JVM running for 24.15)
2017-05-30T09:31:19.412+02:00 [CELL/0] [OUT] Container became healthy
2017-05-30T09:33:02.532+02:00 [APP/PROC/WEB/0] [OUT] 2017-05-30 07:33:02.530 INFO 5 --- [.tasklauncher-1] o.s.i.codec.kryo.CompositeKryoRegistrar : registering [40, java.io.File] with serializer org.springframework.integration.codec.kryo.FileSerializer
2017-05-30T09:33:02.718+02:00 [APP/PROC/WEB/0] [OUT] 2017-05-30 07:33:02.717 INFO 5 --- [.tasklauncher-1] o.s.c.task.launcher.TaskLauncherSink : Launching Task for the following resource TaskLaunchRequest{uri='https://github.com/../timestamptask/blob/master/batch-job-1.1.2.RELEASE.jar', commandlineArguments=[], environmentProperties={}, deploymentProperties={}}
2017-05-30T09:33:02.722+02:00 [APP/PROC/WEB/0] [OUT] 2017-05-30 07:33:02.719 INFO 5 --- [.tasklauncher-1] o.s.c.d.r.s.DelegatingResourceLoader : Caching file /home/vcap/tmp/deployer-resource-cache5745640166650726247/https-3521ce559a70afd69065873b946d20cc5dd24905-batch-job-1.1.2.RELEASE.jar as given location https://github.com/../timestamptask/blob/master/batch-job-1.1.2.RELEASE.jar
2017-05-30T09:33:35.411+02:00 [APP/PROC/WEB/0] [OUT] 2017-05-30 07:33:35.409 INFO 5 --- [.tasklauncher-1] o.s.c.task.launcher.TaskLauncherSink : Launching Task for the following resource TaskLaunchRequest{uri='...//batch-job-1.1.2.RELEASE.jar', commandlineArguments=[], environmentProperties={}, deploymentProperties={}}
2017-05-30T09:33:35.413+02:00 [APP/PROC/WEB/0] [OUT] 2017-05-30 07:33:35.411 INFO 5 --- [.tasklauncher-1] o.s.c.d.r.s.DelegatingResourceLoader : Reusing cached file /home/vcap/tmp/deployer-resource-cache5745640166650726247/https-3521ce559a70afd69065873b946d20cc5dd24905-batch-job-1.1.2.RELEASE.jar as given location https://github.com/xxxx/timestamptask/blob/master/batch-job-1.1.2.RELEASE.jar
2017-05-30T09:34:07.469+02:00 [APP/PROC/WEB/0] [OUT] 2017-05-30 07:34:07.468 INFO 5 --- [.tasklauncher-1] o.s.c.task.launcher.TaskLauncherSink : Launching Task for the following resource TaskLaunchRequest{uri='https://github.com/xxxx/timestamptask/blob/master/batch-job-1.1.2.RELEASE.jar', commandlineArguments=[], environmentProperties={}, deploymentProperties={}}
2017-05-30T09:34:07.504+02:00 [APP/PROC/WEB/0] [OUT] 2017-05-30 07:34:07.504 INFO 5 --- [.tasklauncher-1] o.s.c.d.r.s.DelegatingResourceLoader : Reusing cached file /home/vcap/tmp/deployer-resource-cache5745640166650726247/https-3521ce559a70afd69065873b946d20cc5dd24905-batch-job-1.1.2.RELEASE.jar as given location https://github.com/xxxx/timestamptask/blob/master/batch-job-1.1.2.RELEASE.jar
2017-05-30T09:34:37.797+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:330) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.797+02:00 [APP/PROC/WEB/0] [OUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
2017-05-30T09:34:37.797+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:317) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.797+02:00 [APP/PROC/WEB/0] [OUT] ... 54 common frames omitted
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.handleRetryExhausted(RetryTemplate.java:473) ~[spring-retry-1.1.3.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:333) ~[spring-retry-1.1.3.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:172) ~[spring-retry-1.1.3.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:1187) [spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessageHandlingException: nested exception is java.lang.IllegalStateException: Timeout on blocking read
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:423) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:373) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutputs(AbstractMessageProducingHandler.java:129) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] ... 24 common frames omitted
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.config.StatelessRetryOperationsInterceptorFactoryBean$1.recover(StatelessRetryOperationsInterceptorFactoryBean.java:66) ~[spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.interceptor.RetryOperationsInterceptor.invoke(RetryOperationsInterceptor.java:98) ~[spring-retry-1.1.3.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) ~[spring-aop-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:1165) [spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.amqp.AmqpRejectAndDontRequeueException: org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException: Listener threw exception
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] ... 18 common frames omitted
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.wrapToListenerExecutionFailedExceptionIfNeeded(AbstractMessageListenerContainer.java:870) ~[spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:780) ~[spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:95) [spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:187) ~[spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.interceptor.RetryOperationsInterceptor$1.doWithRetry(RetryOperationsInterceptor.java:74) ~[spring-retry-1.1.3.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:96) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:121) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45) ~[spring-messaging-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:105) ~[spring-messaging-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:292) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput(AbstractMessageProducingHandler.java:212) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.retry.RejectAndDontRequeueRecoverer.recover(RejectAndDontRequeueRecoverer.java:45) ~[spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at com.sun.proxy.$Proxy108.invokeListener(Unknown Source) ~[na:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1100(SimpleMessageListenerContainer.java:95) [spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException: Listener threw exception
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:148) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$1.onMessage(AmqpInboundChannelAdapter.java:95) ~[spring-integration-amqp-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] Caused by: java.lang.IllegalStateException: Timeout on blocking read
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException: Retry Policy Exhausted
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1312) [spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) ~[spring-aop-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] ... 12 common frames omitted
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115) ~[spring-messaging-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:115) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.endpoint.MessageProducerSupport.sendMessage(MessageProducerSupport.java:171) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] 2017-05-30 07:34:37.954 WARN 5 --- [.tasklauncher-1] s.a.r.l.ConditionalRejectingErrorHandler : Execution of Rabbit message listener failed.
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.config.StatelessRetryOperationsInterceptorFactoryBean$1.recover(StatelessRetryOperationsInterceptorFactoryBean.java:59) ~[spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.interceptor.RetryOperationsInterceptor$ItemRecovererCallback.recover(RetryOperationsInterceptor.java:124) ~[spring-retry-1.1.3.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:681) ~[spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:1149) [spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:700) ~[spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:276) ~[spring-retry-1.1.3.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:89) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.access$400(AmqpInboundChannelAdapter.java:45) ~[spring-integration-amqp-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:777) ~[spring-rabbit-1.6.1.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:107) ~[reactor-core-3.0.2.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at reactor.core.publisher.Mono.blockMillis(Mono.java:1121) ~[reactor-core-3.0.2.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at reactor.core.publisher.Mono.block(Mono.java:1099) ~[reactor-core-3.0.2.RELEASE.jar!/:na]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryTaskLauncher.launch(CloudFoundryTaskLauncher.java:137) ~[spring-cloud-deployer-cloudfoundry-1.0.0.RELEASE.jar!/:1.0.0.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.task.launcher.TaskLauncherSink.launchTask(TaskLauncherSink.java:67) ~[spring-cloud-task-stream-1.0.1.RELEASE.jar!/:1.0.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.task.launcher.TaskLauncherSink.taskLauncherSink(TaskLauncherSink.java:58) ~[spring-cloud-task-stream-1.0.1.RELEASE.jar!/:1.0.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:113) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:102) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:49) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:347) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:317) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:155) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] ... 54 common frames omitted
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:169) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:93) ~[spring-integration-core-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:131) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:330) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T09:34:37.981+02:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:88) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]

..... at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpress ion.java:330)

2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:330) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.R
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:155) ~[spring-integration-core-4.
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.retry.interceptor.RetryOperationsInterceptor$ItemRecovererCallback.recover(RetryOperationsInterceptor.java:124) ~[spring-
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:333) ~[spring-retry-1.1.3.RELEASE.jar!/:na]
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:172) ~[spring-retry-1.1.3.RELEASE.jar!/:na]
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.2.RELEASE.jar!/:4.
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.2.RELEASE.jar!/:4.
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:276) ~[spring-retry-1.1.3.RELEASE.jar!/:na]
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:89) ~[spring-integration-
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77) ~[spring-integration-core-4.3
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:423) ~[spring-integration-core-4.3.1.RELEASE.
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45) ~[spring-messaging-4.3.2.RELEASE.jar!/:4
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:105) ~[spring-messaging-4.3.2.RELE
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.cloud.task.launcher.TaskLauncherSink.launchTask(TaskLauncherSink.java:67) ~[spring-cloud-task-stream-1.0.1.RELEASE.jar!/:
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121]
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:49) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.REL
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:347) ~[spring-expression-4.3.2.RELEASE.j
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:169) ~[spring-integratio
2017-05-30T11:40:23.91+0200 [APP/PROC/WEB/0] OUT        at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:93) ~[spring-integr

...更多

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121]
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:102) ~[spring-expression-4.3.2.RELEASE.jar!/:4.
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:131) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.RELEA
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:330) ~[spring-expression-4.3.2.RELEASE.jar!/:4.3.2.R
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.wrapToListenerExecutionFailedExceptionIfNeeded(AbstractMessageListe
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:95) [spring-rabbit-1.6
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.3.2.RELEASE.j
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:172) [spring-retry-1.1.3.RELEASE.jar!/:na]
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) [spring-aop-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:1165) [spring
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:1149) [spring-r
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1100(SimpleMessageListenerContainer.java:95) [spring-rabbit-1.
2017-05-30T11:40:23.89+0200 [APP/PROC/WEB/0] OUT        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]

1 个答案:

答案 0 :(得分:0)

我注意到的事情很少。

1)

<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-deployer-cloudfoundry</artifactId> <version>1.0.0.RELEASE</version> </dependency>

1.0.0.RELEASE 严重旧。我们目前在1.2.0.RELEASE - 请使用最新版本。在流/任务应用程序周围有很多稳定性和性能改进,以及它们如何通过此库进行编排。另外,请同时使用最新版本的CF-server

2)错误:

  

2017-05-30T09:34:37.981 + 02:00 [APP / PROC / WEB / 0] [OUT]引起:org.springframework.messaging.MessageHandlingException:嵌套异常是java.lang.IllegalStateException:Timeout on阻止阅读

当预定义的超时设置不足以在CF上运行的SCDF中启动任务时,通常会观察到这种情况。我们有一个env-var SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_TASK_API_TIMEOUT,可以覆盖更大的值。在1.2.0中,我们默认为360s。