IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  FTP Failure

    Posted Tue February 27, 2007 02:49 PM

    Originally posted by: Staar


    I encountered a strange problem yesterday. I was using the ftp adapter to get a directory listing, it returned the file found but still failed. I used a PUT statement and just received the generic error (30). It is part of an automated process that has been running fine for a couple weeks. The trace reports at the end that it could not delete a file, but all it was doing was trying to get a directory listing. Is it talking about a temp file of some kind that was created during the process? Below is the trace. When I changed the address to ftp.domain.com instead of www.domain.com all the lines associated with Windows Socket/SSL disappeared. In the past I was told that dstx looks at the protocol used in the URL (ftp:// or ftps://) to determine how to connect and wether to use SSL. That must not be the case. Can anyone shed some light on what the problem may have been and how I can avoid it? Some info on how the adapter decides which connection method to use would be great as well. Thanks in advance...

    Mike

    FTP Adapter, Version 8.0(105)
    Copyright © 2004, Ascential Software Corporation. All rights reserved
    Built for WIN32 - INTEL on Jan 31 2006 at 17:49:13.
    Microsoft (R) C Runtime Library is
    Copyright (C) Microsoft Corp. 1981-1999.
    Using C:\WINNT\system32\MSVCRT.dll (Version 6.10.9359.0) for Visual C++ runtime.
    Retry Count is 0. Retry Interval is 0. OnFailure is Rollback.
    Fetch Unit is 0. Card Mode is Integral.
    Run Started at 16:30:01.198 on 02/26/07.
    Options used: trace,verbose,name,sys,pasv,url
    URL ftp://username:*****@www.domain.com/;type=D1 will be used.
    WSAStart: Entering
    WSAStart: bWSStarted = 0, nWSClients = 0
    WSAStart: Attempting WinSock initialization.
    WSAStart: WinSock initialized successfully.
    Windows Sockets Version 1.1 will be used.
    Windows Sockets Version 2.2 is supported.
    Windows Socket Description is 'WinSock 2.0'.
    Windows Socket System Status is 'Running'.
    Windows Socket supports up to 32767 socket(s).
    Windows Socket supports UDP datagram of up to 65467 bytes.
    Windows Socket has no additional vendor-specific information.
    WSAStart: SSL library load succeeded.
    Sockets Client ID 1 enabled.
    WSAStart: Exiting (rc = 1)
    URL user: 'username'.
    URL pass: '*******'.
    URL host: 'www.domain.com'.
    URL port: '21'.
    URL path: ''.
    URL type: 'D1'.
    Using ftp: protocol.
    Server host is 'www.domain.com'.
    Hostname: 'domain.com'.
    Alias #1: 'www.domain.com'.
    Address #1: 11.222.333.444.
    Using port '21' for the connection.
    Connecting to 'www.domain.com'.
    Checking user port 21.
    Service: 'ftp'.
    Port: 21.
    Protocol: 'tcp'.
    Socket Opened.
    Connected.
    >220 gtlweb01 Microsoft FTP Service (Version 5.0). (S)
    <USER username

    >331 Password required for username. (S)
    <PASS
    >230 User username logged in. (S)
    Setting DOS/WIN-specific parameters.
    <PWD

    >257 "/directoryname" is current directory. (S)
    Using C:\DOCUME~1\es_admin.GTL\LOCALS~1\Temp\927D.tmp as tempfile.
    <TYPE A

    >200 Type set to A. (S)
    <PASV

    >227 Entering Passive Mode (67,133,154,135,18,157). (S)
    Using port '4765' for the connection.
    Connecting to '67.133.154.135'.
    Socket Opened.
    Connected.
    <NLST

    >125 Data connection already open; Transfer starting. (S)
    >NBS_0000001_20070226_01.txt
    Socket Closed.
    Connection closed.
    >226 Transfer complete. (S)
    Rollback specified; returning to map engine.
    Read 29 bytes from .
    Cleanup call from prior Rollback; re-initializing instance storage.
    Map return is 30.
    Map execution failed with 30, files not deleted.
    Data in C:\DOCUME~1\es_admin.GTL\LOCALS~1\Temp\927D.tmp deleted.
    Run Terminated at 16:30:01.541 on 02/26/07.

    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: FTP Failure

    Posted Fri March 09, 2007 07:30 AM

    Originally posted by: SystemAdmin


    this doesn't look like an FTP failure at all - something else in the map has failed.

    When the map fails it tries to rollback any changes, hence the rollback information passed to the adapter (there's nothing to rollback but the adapter still needs to clean up etc.)

    the tmp file is used to transfer data between the FTP server and Mercator (in your case the data is the filename).

    So, to solve the problem, look for a FAIL function in the map - this caused the map failure not the FTP adapter. Also you should be using the GET function to do a directory listing - PUT won't return anything to the map.

    cheers,
    Olly.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: FTP Failure

    Posted Tue March 13, 2007 11:31 AM

    Originally posted by: Staar


    Hi Olly,

    You are correct. It was a type-o and does use Get. Basically, I have a different map for each ftp function. There is an input card for each paramater. The only thing it does is build and execute the ftp command. I don't see what else could possibly fail. Any parameter that may not have a value is quote-qualified to avoid the 'Input Source Is Not Available' error. The output rule for my FTP Directory Listing map reads:
    =VALID(
    GET("FTP",
    "-TV " + HEXTEXTTOSTREAM("22") + FTP_TraceFile + HEXTEXTTOSTREAM("22") + " " + /*TRACE OPTION*/
    IF(Passive = "Y","-PV ","") + /*PASSIVE OPTION*/
    "-URL " + HEXTEXTTOSTREAM("22") + "ftp" + IF(Secure = "Y","s","") + "://" + SUBSTITUTE(FTP_User,"%","%25","@","%40","/","%2F",":","%3A",";","%3B") + ":" + SUBSTITUTE(FTP_PW,"%","%25","@","%40","/","%2F",":","%3A",";","%3B") + "@" + SUBSTITUTE(IP_Address,"%","%25","@","%40","/","%2F",":","%3A",";","%3B") + "/" + IF(SQUEEZE(FTP_Folder, HEXTEXTTOSTREAM("22")) = HEXTEXTTOSTREAM("22"), "",
    SUBSTITUTE(FTP_Folder, HEXTEXTTOSTREAM("22"),"","%","%25","@","%40","/","%2F",":","%3A",";","%3B") + "/") + ";type=D1" + HEXTEXTTOSTREAM("22") + " -SYS WIN32"), /*type=D means do a directory listing instead of transfer.*/
    FAIL("FtpListFiles Failed: " + LASTERRORCODE() + LASTERRORMSG()))

    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: FTP Failure

    Posted Tue March 13, 2007 02:45 PM

    Originally posted by: SystemAdmin


    Can you post a copy of your audit log on the forum?

    the audit log should show the error message and error code from your mapping rule:
    code
    FtpListFiles Failed: " + LASTERRORCODE() + LASTERRORMSG()))
    [/code]

    Olly
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: FTP Failure

    Posted Tue March 13, 2007 03:12 PM

    Originally posted by: Staar


    The map returned:
    The following error occurred: 0000001: FTP Map Put Function Error Ocurred.

    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 6.  Re: FTP Failure

    Posted Tue March 13, 2007 05:22 PM

    Originally posted by: Staar


    Ignore that last reply. That's a message that my program returned, not the map. The output of the map is not written out to a file. It's using the Sink adapter so I'm not sure what the error code/message was. I figured since I had the adapter trace that it would contain enough information for me to determine what the problem was in the event an error occurred. It seemed to be a freak occurrence. It hasn't happened since and the map has not been changed. The next day I wrote a program that ran the map repeatedly for 2 hours with the same file that failed. I hoped to replicate the problem I had. It performed over 500 transfers and never failed. Maybe there was another process using the ftp adapter at the exact same time and the temp files that DSTX creates for ftp transmissions somehow interfered with each other. Or 2 processes attempted to perform an ftp transfer and both used the same location for the adapter trace. I'll test that next and see if I can break the map...
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 7.  Re: FTP Failure

    Posted Wed March 14, 2007 11:52 AM

    Originally posted by: SystemAdmin


    The Event Server is pretty good at preventing concurrent access to trace files, temp files etc. so I wouldn't have though that would have caused the problem.

    the audit log provides a summary of all the inputs and outputs, return codes etc. so its a good idea to turn it on if it's currently off.

    (the trace which is a breakdown of all the objects found in the data should be turned off though).
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender