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 :-)

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now