ftp code in a upoc

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ftp code in a upoc

  • Creator
    Topic
  • #53122

    I am trying to ftp a file using an upoc.I have a file thread which forwards the file to this upoc.The upoc uses a tps which has the ftp code .This creates an ftp connection and transfers the file.This works for me in the testing tool but when i test in production ,

    it says

    Starting new connection with:

     -progress = Progress

    C: Connection from xxx.xxx.xxx.xxx:21

    and is stuck at this point.

    I do not want to use the fileset-ftp thread but want to ftp the files via the tps.I have additional logic which checks whether a certain file in present on the remote server before it transfers the file.

    But since it hangs while it is connecting to the remote ftp server on the command  

    set conn [FTP::Open $server $user $passwd -progress Progress] ,i am not able to proceed further.Any help will be greatly appreciated.

Viewing 2 reply threads
  • Author
    Replies
    • #76636
      Charlie Bursell
      Participant

        Probably because the proc you are using blocks waiting for a response. We do not allow the engine to block

        Two options:

        Best:  Write the FTP using TclCurl

        Next:  Set proc as external proc and exec from the engine

      • #76637
        garry r fisher
        Participant

          Hi,

          When I did this I used option 2. This was for an sftp client before it was included with Cloverleaf.

          It works well – What I did was for each message I called a upoc which created an sftp script. I then called the script from the upoc using exec. This gave me some auditing and I could also run the sftp manually if it failed.

          Regards

          Garry

          PS: I get confused betwen sftp and ftps – this workaround was for whichever wasn’t included in older version of Cloverleaf

        • #76638

          Thank you for your responses.I have tried option 1 using TclCurl and that has worked for me.I have not tried option 2.Would it be possible to show some sample code which demonstrates the usage of option 2?

      Viewing 2 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.