Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shell Adapter Problem

Status
Not open for further replies.

MagicCB

Programmer
Aug 7, 2007
7
DE
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top