Subject: File Transfer fails on GrassValley K2 server
Date: 2018-05-23 10:13:27
From: abhishekzararia
Source: file-transfer-fails-grassvalley-k2-server
----------------------------------------------------------------------

I am not able to transfer local file to Grassvalley K2 server.

Sample code is as below

        private void uploadFiles()
        {
            try
            {
                Ftp client = new Ftp();
                client.Connect(serveraddress.Text);
                string auth = client.Authenticate(username.Text, password.Text);
                client.Passive = false;
                ComponentPro.IO.FileInfoCollection collection;//= client.ListDirectory();

                // Set the log level.
                ComponentPro.Diagnostics.XTrace.Level = ComponentPro.Diagnostics.TraceEventType.Verbose;
                // Add the UltimateTextWriterTraceListener listener to write to a file.
                ComponentPro.Diagnostics.XTrace.Listeners.Add(
                    new ComponentPro.Diagnostics.UltimateTextWriterTraceListener("c:\\temp\\log.log"));
                // You can also write log to a Console window with the following code:
                ComponentPro.Diagnostics.XTrace.Listeners.Add(new ComponentPro.Diagnostics.UltimateConsoleTraceListener());

                string dirname = @"GXF/default";

                string[] strsplit = dirname.Split('/');
                foreach (var diritem in strsplit)
                {
                    collection = client.ListDirectory();
                    bool bln = collection.Any(x => x.IsDirectory && x.Name == diritem);
                    if (bln == false)
                    {
                        client.CreateDirectory(diritem);
                    }                   
                    client.SetCurrentDirectory(diritem);
                }

                List files = new List() { "SSIM-S2.gxf" };

                
               ComponentPro.IO.FileSystemTransferStatistics stat = client.UploadFiles(@"C:\Temp", files, client.GetCurrentDirectory(), new ComponentPro.IO.TransferOptions(), 1, true);
                // Disconnect.
                client.Disconnect();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }          
        }

Log generated is as below

    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:12.74] Information - Command: PWD
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:13.03] Information - Response: 257 "V:/" is current directory.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:13.05] Information - Command: TYPE A
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:13.36] Information - Response: 200 TYPE command okay. Type is ASCII, Format is Non-print.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:13.37] Information - Command: PORT 10,20,89,75,110,130
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:13.65] Information - Response: 200 PORT command okay.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:13.65] Information - Command: LIST
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:13.95] Information - Response: 150 Opening data connection for LIST V:/.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:23.33] Verbose - Info: FTP data connection accepted from 10.21.74.50:20.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:23.34] Information - Response: 226 Transfer complete.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:23.34] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                  0 May 21 23:24:42 GXF
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:23.35] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                  0 May 21 23:24:42 MXF
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:23.35] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                  0 May 21 23:24:42 MPG
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:23.35] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                  0 May 21 23:24:42 PIN
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:23.35] Verbose - Info: 268 bytes transferred.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:23.35] Verbose - Info: Closing downloading data connection.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:23.35] Verbose - Info: Transfer ended successfully.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:23.35] Verbose - Info: FTP data connection closed.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:25.92] Information - Command: CWD GXF
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:26.19] Information - Response: 250 Change of directory to V:/GXF/ successful, xfer mode GXF.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:28.66] Information - Command: PWD
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:28.94] Information - Response: 257 "V:/GXF/" is current directory.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:28.94] Information - Command: PORT 10,20,89,75,111,98
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.30] Information - Response: 200 PORT command okay.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.30] Information - Command: LIST
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.60] Information - Response: 150 Opening data connection for LIST V:/GXF/.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.90] Verbose - Info: FTP data connection accepted from 10.21.74.50:20.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.90] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Sep 18 2012 CT
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.90] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Mar 02 2006 default
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.90] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Feb 20 11:06:00 GXF
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.90] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Mar 05 13:49:00 MXF
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.90] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Jun 25 2012 Omneon
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.90] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Mar 02 2006 Recycle Bin
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.90] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Apr 27 2010 Space TEST
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.94] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Apr 27 2010 Space     TESTING
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.94] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Jun 28 2012 Ver_6_27
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.94] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Nov 19 2007 watchtest
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.94] Verbose - Info: 680 bytes transferred.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.94] Verbose - Info: Closing downloading data connection.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.94] Verbose - Info: Waiting for data transfer ending message.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.96] Information - Response: 226 Transfer complete.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.96] Verbose - Info: Data transfer ended.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:29.96] Verbose - Info: Transfer ended successfully.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:30.15] Verbose - Info: FTP data connection closed.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:32.53] Information - Command: CWD default
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:32.86] Information - Response: 250 Change of directory to V:/GXF/default/ successful, xfer mode GXF.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:44.55] Information - Command: PWD
    Ftp: 1, Thread Id: 0 [05-23-2018 15:20:44.85] Information - Response: 257 "V:/GXF/default/" is current directory.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:18.61] Information - Command: TYPE I
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:18.88] Information - Response: 200 Type set to IMAGE.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:18.89] Information - Command: MDTM .
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:19.25] Information - Response: 500 "MDTM" not understood.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:19.33] Information - Command: SIZE .
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:19.65] Information - Response: 213 13
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:19.65] Information - Command: CWD V:/GXF/default/
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:19.94] Information - Response: 250 Change of directory to V:/GXF/default/ successful, xfer mode GXF.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:20.00] Information - Command: CWD V:/GXF/default/V:/GXF/default
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:20.34] Information - Response: 550 Could not change directory to "V:/GXF/default/V:/GXF/default".
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:20.36] Information - Command: CWD V:/GXF/default/V:/GXF
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:20.66] Information - Response: 550 Could not change directory to "V:/GXF/default/V:/GXF".
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:20.66] Information - Command: CWD V:/GXF/default/V:
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:20.97] Information - Response: 550 Could not change directory to "V:/GXF/default/V:".
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:20.97] Information - Command: CWD V:/GXF/default
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:21.28] Information - Response: 250 Change of directory to V:/GXF/default/ successful, xfer mode GXF.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:21.28] Information - Command: PWD
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:21.60] Information - Response: 257 "V:/GXF/default/" is current directory.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:21.60] Information - Command: CWD V:/GXF
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:21.89] Information - Response: 250 Change of directory to V:/GXF/ successful, xfer mode GXF.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:21.89] Information - Command: PWD
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:22.24] Information - Response: 257 "V:/GXF/" is current directory.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:22.24] Information - Command: CWD V:/GXF/default/
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:22.56] Information - Response: 250 Change of directory to V:/GXF/default/ successful, xfer mode GXF.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:22.56] Information - Command: CWD V:
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:22.88] Information - Response: 250 Change of directory to V:/ successful, xfer mode FILEMODE.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:22.88] Information - Command: PWD
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:23.20] Information - Response: 257 "V:/" is current directory.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:23.26] Information - Command: CWD V:/GXF/default/
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:23.61] Information - Response: 250 Change of directory to V:/GXF/default/ successful, xfer mode GXF.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:23.65] Information - Command: MKD V:
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:23.95] Information - Response: 550 Error in "MKD /explodedFile/V:/". Bin "/explodedFile/V:/" already exists!
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:23.99] Error - Info: ComponentPro.Net.FtpException: Error in "MKD /explodedFile/V:/". Bin "/explodedFile/V:/" already exists! (550).
    at ComponentPro.Net.Ftp.c_STE(Int32 c_LE, Boolean c_ACL, AsyncOperation c_Y)
    at ComponentPro.Net.Ftp.ReadResponse(Int32 success, AsyncOperation asyncOp)
    at ComponentPro.Net.Ftp.c_V3M(String c_NB, ProgressFileItem c_OVM, AsyncOperation c_Y)
    Disk File System: 3, Thread Id: 0 [05-23-2018 15:21:24.06] Verbose - Verbose: Thread 0 has error: ComponentPro.Net.FtpException: Error in "MKD /explodedFile/V:/". Bin "/explodedFile/V:/" already exists! (550).
    at ComponentPro.Net.Ftp.c_STE(Int32 c_LE, Boolean c_ACL, AsyncOperation c_Y)
    at ComponentPro.Net.Ftp.ReadResponse(Int32 success, AsyncOperation asyncOp)
    at ComponentPro.Net.Ftp.c_V3M(String c_NB, ProgressFileItem c_OVM, AsyncOperation c_Y)
    at ComponentPro.Net.Ftp.c_KGM(String c_NB, ProgressFileItem c_AZA, AsyncOperation c_Y)
    at ComponentPro.IO.FileSystem.c_ACM(String c_RFM, ProgressFileItem c_UCM, AsyncOperation c_Y)
    at ComponentPro.IO.FileSystemTransferStatistics.c_SCM(FileSystem c_TCM, ProgressFileItem c_UCM, String c_VCM, AsyncOperation c_Y)
    at ComponentPro.IO.Transferrer.c_KPM(ProgressFileItem c_BXJ, TransferThreadInfo c_H2K, Boolean c_F2M, Boolean c_G2M)
    Disk File System: 3, Thread Id: 0 [05-23-2018 15:21:24.17] Verbose - Verbose: Transfer thread 0 quits on stop.
    ComponentPro.IO.FileSystem c_ZOM [05-23-2018 15:21:24.17] Verbose - Verbose: OnTransferMultiFilesCompleted in SetThreadStopped
    ComponentPro.IO.FileSystem c_ZOM [05-23-2018 15:21:24.17] Verbose - Verbose: OnTransferMultiFilesCompleted
    ComponentPro.IO.Transferrer c_CKM c_G1M [05-23-2018 15:21:24.17] Verbose - Verbose: Stopping 1 threads with Stopping state
    ComponentPro.IO.TransferThreadInfo [05-23-2018 15:21:24.17] Verbose - Verbose: Stopping thread 0. Current state: Stopped
    ComponentPro.IO.TransferThreadInfo [05-23-2018 15:21:24.17] Verbose - Verbose: Thread 0's state is not changed since it is in Stopped. Wish to change to Stopping
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:24.37] Verbose - Info: Not aborting, state not found.
    Disk File System: 3, Thread Id: 0 [05-23-2018 15:21:24.37] Verbose - Info: Not aborting, state not found.
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:28.38] Information - Command: QUIT
    Ftp: 1, Thread Id: 0 [05-23-2018 15:21:28.66] Information - Response: 221 Goodbye.


ComponentPro FTP library also not detected DirectoryExists on K2 server, I have to get the directory list and then checks if it is present in that list.
[https://www.componentpro.com/qa/ftp-file-transfer-issue-grass-valley-k2-ftp-server][1]


  [1]: https://www.componentpro.com/qa/ftp-file-transfer-issue-grass-valley-k2-ftp-server

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index