×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Shell Adapter Problem

Shell Adapter Problem

Shell Adapter Problem

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close