Hi Group,
I have got a problem using the Shell-Adapter under Solaris (it is the first time, I'm using this adapter).
I have a script to send files via sftp.
I use the adapter in the following way:
=VALID ( GET ( "SHL", " -TV -A -CLI '/bin/ksh -c' -CMD './send_sftp.ksh " + FTP_String + "'"),
FAIL("Failed to run send_sftp.ksh " + LASTERRORMSG() + " " + LASTERRORCODE() )
)
FTP_String contains all the sftp parameters.
The script is executed and the file is transferred. The message, the script is writing is: "Datei uebertragen" and after that it is finishing with "exit 0".
---------Script---------
...
echo "Datei uebertragen"
exit 0
---------Script---------
Nevertheless the FAIL Function is activated:
FAIL function aborted map:Failed to run send_sftp.ksh Error Executing Command (Return Code -1) -6
--------- shell adapter log -----------
BEGIN SHELL AUDIT - VERSION 8.0(81) [1.1.5]
09:54:09.299 10/23/07
Receiving data from '/global/ebib_appl/ebib/maps/infrastruktur/./send_sftp.ksh Q1000000000749793 149.239.160.177 22 e10873 /global/ebib_appl/ebib/daten/sftp/ausgang/Q1000000000749793.1 ./ShellAdapterTest//SAT_20071023.0954_Q1000000000749793.dat .ok 53 TRACE UseKeyFile' using <standard output>
PID rc Size Time Retry
----- ---- ----- ---- -----
8254 -1 018 006s 1
END SHELL AUDIT
--------- shell adapter log -----------
The trace file is showing a timeout:
--------- shell adapter trace -----------
...
Process 8254 Created.
Reading from Standard Output...
...18 bytes read from Standard Output.
Standard Output reads have been completed.
Testing: Has process 8254 terminated ?
Test Result: Process 8254 has not terminated.
Reading from Standard Output...
...0 bytes read from Standard Output.
Standard Output reads have been completed.
Reading from Standard Error...
...0 bytes read from Standard Error.
Standard Error reads have been completed.
Testing: Has process 8254 terminated ?
Test Result: Process 8254 has not terminated.
Reading from Standard Output...
...0 bytes read from Standard Output.
Standard Output reads have been completed.
Reading from Standard Error...
...0 bytes read from Standard Error.
Standard Error reads have been completed.
Testing: Has process 8254 terminated ?
Test Result: Process 8254 has not terminated.
Reading from Standard Output...
...0 bytes read from Standard Output.
Standard Output reads have been completed.
Reading from Standard Error...
...0 bytes read from Standard Error.
Standard Error reads have been completed.
Testing: Has process 8254 terminated ?
waitpid returned 10.
Error Executing Command - Return Code is -1.
Run Terminated at 09:54:15.666 on 10/23/07.
--------- shell adapter trace -----------
Any idea what this waitpid is?
I can see 18 bytes are read ("Datei uebertragen\n") why is the adapter not detecting, that the script is finished? Who or what is throwing the -1?
Thanks in advance for any hint.
Magic CB
I have got a problem using the Shell-Adapter under Solaris (it is the first time, I'm using this adapter).
I have a script to send files via sftp.
I use the adapter in the following way:
=VALID ( GET ( "SHL", " -TV -A -CLI '/bin/ksh -c' -CMD './send_sftp.ksh " + FTP_String + "'"),
FAIL("Failed to run send_sftp.ksh " + LASTERRORMSG() + " " + LASTERRORCODE() )
)
FTP_String contains all the sftp parameters.
The script is executed and the file is transferred. The message, the script is writing is: "Datei uebertragen" and after that it is finishing with "exit 0".
---------Script---------
...
echo "Datei uebertragen"
exit 0
---------Script---------
Nevertheless the FAIL Function is activated:
FAIL function aborted map:Failed to run send_sftp.ksh Error Executing Command (Return Code -1) -6
--------- shell adapter log -----------
BEGIN SHELL AUDIT - VERSION 8.0(81) [1.1.5]
09:54:09.299 10/23/07
Receiving data from '/global/ebib_appl/ebib/maps/infrastruktur/./send_sftp.ksh Q1000000000749793 149.239.160.177 22 e10873 /global/ebib_appl/ebib/daten/sftp/ausgang/Q1000000000749793.1 ./ShellAdapterTest//SAT_20071023.0954_Q1000000000749793.dat .ok 53 TRACE UseKeyFile' using <standard output>
PID rc Size Time Retry
----- ---- ----- ---- -----
8254 -1 018 006s 1
END SHELL AUDIT
--------- shell adapter log -----------
The trace file is showing a timeout:
--------- shell adapter trace -----------
...
Process 8254 Created.
Reading from Standard Output...
...18 bytes read from Standard Output.
Standard Output reads have been completed.
Testing: Has process 8254 terminated ?
Test Result: Process 8254 has not terminated.
Reading from Standard Output...
...0 bytes read from Standard Output.
Standard Output reads have been completed.
Reading from Standard Error...
...0 bytes read from Standard Error.
Standard Error reads have been completed.
Testing: Has process 8254 terminated ?
Test Result: Process 8254 has not terminated.
Reading from Standard Output...
...0 bytes read from Standard Output.
Standard Output reads have been completed.
Reading from Standard Error...
...0 bytes read from Standard Error.
Standard Error reads have been completed.
Testing: Has process 8254 terminated ?
Test Result: Process 8254 has not terminated.
Reading from Standard Output...
...0 bytes read from Standard Output.
Standard Output reads have been completed.
Reading from Standard Error...
...0 bytes read from Standard Error.
Standard Error reads have been completed.
Testing: Has process 8254 terminated ?
waitpid returned 10.
Error Executing Command - Return Code is -1.
Run Terminated at 09:54:15.666 on 10/23/07.
--------- shell adapter trace -----------
Any idea what this waitpid is?
I can see 18 bytes are read ("Datei uebertragen\n") why is the adapter not detecting, that the script is finished? Who or what is throwing the -1?
Thanks in advance for any hint.
Magic CB