2016-03-21 4 views
0

私はエラーの下に取得しています、春-XDでのpythonモジュールを使用しようとしている時はいつでも:、私の経験で春-XDストリームが閉じ - Pythonモジュール

[ stream create pytest --definition "time | shell --command='python /home/Ubuntu/xd/echo2.py' --encoder=LF | log" --deploy] 
[] 

2016-03-21T19:23:38+0000 1.2.0.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Path cache event: path=/deployments/modules/allocated/ed02510e-f8b3-4f53-9848-e2268fbbade1/pytest.processor.shell.1, type=CHILD_ADDED 
2016-03-21T19:23:38+0000 1.2.0.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Deploying module 'shell' for stream 'pytest' 
2016-03-21T19:23:38+0000 1.2.0.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Deploying module [[email protected] moduleName = 'shell', moduleLabel = 'shell', group = 'pytest', sourceChannelName = [null], sinkChannelName = [null], index = 1, type = processor, parameters = map['command' -> 'python /home/Ubuntu/xd/echo2.py', 'encoder' -> 'LF'], children = list[[empty]]] 
2016-03-21T19:23:39+0000 1.2.0.RELEASE ERROR SimpleAsyncTaskExecutor-1 process.ShellCommandProcessor - python: can't open file '/home/Ubuntu/xd/echo2.py': [Errno 2] No such file or directory 
2016-03-21T19:23:39+0000 1.2.0.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Path cache event: path=/deployments/modules/allocated/ed02510e-f8b3-4f53-9848-e2268fbbade1/pytest.source.time.1, type=CHILD_ADDED 
2016-03-21T19:23:39+0000 1.2.0.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Deploying module 'time' for stream 'pytest' 
2016-03-21T19:23:39+0000 1.2.0.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Deploying module [[email protected] moduleName = 'time', moduleLabel = 'time', group = 'pytest', sourceChannelName = [null], sinkChannelName = [null], index = 0, type = source, parameters = map[[empty]], children = list[[empty]]] 
2016-03-21T19:23:39+0000 1.2.0.RELEASE INFO DeploymentSupervisor-0 zk.ZKStreamDeploymentHandler - Deployment status for stream 'pytest': DeploymentStatus{state=deployed} 
2016-03-21T19:23:39+0000 1.2.0.RELEASE ERROR task-scheduler-1 process.ShellCommandProcessor - Stream closed 
java.io.IOException: Stream closed 
     at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:434) ~[na:1.7.0_95] 
     at java.io.OutputStream.write(OutputStream.java:116) ~[na:1.7.0_95] 
     at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) ~[na:1.7.0_95] 
     at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) ~[na:1.7.0_95] 
     at org.springframework.integration.ip.tcp.serializer.ByteArraySingleTerminatorSerializer.serialize(ByteArraySingleTerminatorSerializer.java:94) ~[spring-integration-ip-4.1.5.RELEASE.jar!/:na] 

答えて

0

10のうち9回、ということPythonのプロセスがシーンの背後でクラッシュし、XDプロセッサがそれを認識していないことが原因です。あなたのログでpythonプロセスがまだ実行中であることを確認してください。

関連する問題