tSystem + workstation on Windows + TAC and JobServer on Linux

One Star

tSystem + workstation on Windows + TAC and JobServer on Linux

Hello
We developp ours jobs on Windows. After, there are deployed on the TAC. The servers (TAC + JobServer) are under Linux.
In our jobs, we used the "tsystem" component with simple Linux command such as "cd /data/directory/; ls -l".
When the job is launched from the TAC, we have this error :
### Job STARTED at 2012/06/05 15:57:09 (jobId=20120605_155703_xuPgv, jobExecutionId=20120605155709_xcPO7) ###
Exception in component tSystem_1
java.io.IOException: Cannot run program "cd": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at java.lang.Runtime.exec(Runtime.java:369)
at test_cab.exec_fils_0_1.Exec_Fils.tSystem_1Process(Exec_Fils.java:643)
at test_cab.exec_fils_0_1.Exec_Fils.runJobInTOS(Exec_Fils.java:1206)
at test_cab.exec_fils_0_1.Exec_Fils.main(Exec_Fils.java:1077)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 6 more
### Job ENDED WITH ERROR at 2012/06/05 15:57:09 (jobId=20120605_155703_xuPgv, jobExecutionId=20120605155709_xcPO7) ###

After that, we modify this job but with a workstation on Linux. The execution on the workstation, make the same error. After deploy on TAC and execution on JobServer we have the same issue :
### Job STARTED at 2012/06/05 14:57:39 (jobId=20120605_145626_Y6WtB, jobExecutionId=20120605145739_FvR6r) ###
Exception in component tSystem_1
java.io.IOException: Cannot run program "cd": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at java.lang.Runtime.exec(Runtime.java:369)
at test_cab.exec_fils_0_1.Exec_Fils.tSystem_1Process(Exec_Fils.java:643)
at test_cab.exec_fils_0_1.Exec_Fils.runJobInTOS(Exec_Fils.java:1206)
at test_cab.exec_fils_0_1.Exec_Fils.main(Exec_Fils.java:1077)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 6 more
### Job ENDED WITH ERROR at 2012/06/05 14:57:40 (jobId=20120605_145626_Y6WtB, jobExecutionId=20120605145739_FvR6r) ###

How doing the system call under Linux ?

Regards,
Carole
One Star

Re: tSystem + workstation on Windows + TAC and JobServer on Linux

Hi Carole
If you want to handle pipe or redirection with the component tSystem, this topic may help you.
23754
Regards,
Pedro
One Star

Re: tSystem + workstation on Windows + TAC and JobServer on Linux

Hi Pedro,
I think I haven't been clear enough. I don't want using redirection or pipe. I just want use a simple linux command, like : "cd /repository...".
Maybe the tsystem doesn't work for the Linux environnement, no ?

Thank you,
Carole
One Star

Re: tSystem + workstation on Windows + TAC and JobServer on Linux

Or the problem is because we execute jobs on linux server but we design them on windows workstation.
One Star

Re: tSystem + workstation on Windows + TAC and JobServer on Linux

Hi
Try this.
new String[]{"/bin/bash","-c","cd /data/directory; ls -l"}
Regards,
Pedro
One Star

Re: tSystem + workstation on Windows + TAC and JobServer on Linux

It's works !
Thank you Pedro :-)