2016-04-14 3 views
0

のPython/SpringXDは私の以前の記事で書かれたエラーが生じ組み合わせではありません実行に失敗し、一人でspringxdのシェルは、私のシステム上で実行成功することはできませんSpringXDは、シェルコマンド

ストリーム定義:

ここ
trigger --cron='0 */1 * * * *' | shell --command='ls' | log 

エラーメッセージです:

2016-04-19T16:06:06-0400 1.3.1.SNAP ERROR inbound.awef-p2_7-log.0-redis:queue-inbound-channel-adapter1 redis.RedisMessageBus$1 - Failed to deliver message; retries exhausted; message sent to queue 'ERRORS:awef-p2_7-log.0' org.springframework.messaging.MessageHandlingException: nested exception is java.lang.RuntimeException: Stream closed 
2016-04-19T16:06:17-0400 1.3.1.SNAP ERROR inbound.test-ls.0-redis:queue-inbound-channel-adapter1 process.ShellCommandProcessor - Stream closed 
java.io.IOException: Stream closed 
     at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:433) ~[na:1.8.0_66] 
     at java.io.OutputStream.write(OutputStream.java:116) ~[na:1.8.0_66] 
     at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) ~[na:1.8.0_66] 
     at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) ~[na:1.8.0_66] 
     at org.springframework.xd.extension.process.ShellCommandProcessor.send(ShellCommandProcessor.java:156) [spring-xd-extension-process-1.3.1.BUILD-SNAPSHOT.jar!/:na] 
     at org.springframework.xd.extension.process.ShellCommandProcessor.sendAndReceive(ShellCommandProcessor.java:171) [spring-xd-extension-process-1.3.1.BUILD-SNAPSHOT.jar!/:na] 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_66] 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_66] 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_66] 
     at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_66] 

答えて

0

私は最終的にグルーヴィーなスクリプト経由のpythonへの呼び出しtwick:DEF

ストリーム:グルーヴィー

trigger --cron='0 0/1 * * * *' | script --script=file:/.../testjobpython.groovy | null 

コード:

String[] pythonCmd = ["/usr/bin/python2.7","/.../testjobpython.py"] 
Runtime.getRuntime().exec(pythonCmd) 
0

私はこれが原因で、あなたのPythonコードでsys.exit()呼び出しの可能性が疑われます。 sys.exit()に電話しないとどうなりますか?

+0

こんにちは、私はそれを削除し、それでも同じを持っていますエラー。ありがとう – MattEnergy

関連する問題