net::sftp write error with multiple packet writes - Perl

This is a discussion on net::sftp write error with multiple packet writes - Perl ; I have net::xftp and net::SFTP installed on a solaris 8 workstation, connecting to a windows server running winscp. I am able to uplaod a file but then receive an error message that it could not upload. I ssh into the ...

+ Reply to Thread
Results 1 to 4 of 4

net::sftp write error with multiple packet writes

  1. Default net::sftp write error with multiple packet writes

    I have net::xftp and net::SFTP installed on a solaris 8 workstation,
    connecting to a windows server running winscp.

    I am able to uplaod a file but then receive an error message that it
    could not upload. I ssh into the server and see the file is there.
    The file size is exactly the total size of those 2 numbers in the
    SSH2_FXP_WRITE statements (8192 + 5821). This is my ftp variable that
    is used through-out the script.

    I'm using xFTP because these scripts are used to ftp and sftp and need
    to use the same command.

    Any ideas?

    my %args = (user => $ftpuser, password => $ftppass, debug => 1);
    $ftp = Net::xFTP->new(Net::SFTP,$ftpip, %args)

    server: sftp: Sent message T:16 I:9
    server: sftp: Sent message T:16 I:10
    server: sftp: Sent message T:16 I:11
    server: sftp: Sent SSH2_FXP_OPEN I:12 P:/opt/websites/
    register.company.org/hccs/WC_file.dat
    server: sftp: Sent message SSH2_FXP_WRITE I:13 O:0
    server: sftp: In write loop, got 8192 offset 0
    server: sftp: Sent message SSH2_FXP_WRITE I:14 O:8192
    server: sftp: In write loop, got 5821 offset 8192
    server: sftp: Sent message T:10 I:15
    Uploading WC_file.dat to Server .......... Error: ./
    uploadSSH_company2.pl could not upload WC_file.dat to Server.


  2. Default Re: net::sftp write error with multiple packet writes

    csgonan@yahoo.com wrote:
    > I have net::xftp and net::SFTP installed on a solaris 8 workstation,
    > connecting to a windows server running winscp.
    >
    > I am able to uplaod a file but then receive an error message that it
    > could not upload.


    [...]
    > my %args = (user => $ftpuser, password => $ftppass, debug => 1);
    > $ftp = Net::xFTP->new(Net::SFTP,$ftpip, %args)


    Where is the code that's producing the following output? e.g.
    your put() call.

    > Uploading WC_file.dat to Server .......... Error: ./
    > uploadSSH_company2.pl could not upload WC_file.dat to Server.


    There should be an error message or code associated with the failure or
    possibly the test for the error isn't correct. A quick guess
    would be that it's a permissions problem.

  3. Default Re: net::sftp write error with multiple packet writes

    On Oct 22, 2:12 pm, "J. Gleixner" <glex_no-s...@qwest-spam-no.invalid>
    wrote:
    > csgo...@yahoo.com wrote:
    > > I have net::xftp and net::SFTP installed on a solaris 8 workstation,
    > > connecting to a windows server running winscp.

    >
    > > I am able to uplaod a file but then receive an error message that it
    > > could not upload.

    >
    > [...]
    >
    > > my %args = (user => $ftpuser, password => $ftppass, debug => 1);
    > > $ftp = Net::xFTP->new(Net::SFTP,$ftpip, %args)

    >
    > Where is the code that's producing the following output? e.g.
    > your put() call.
    >
    > > Uploading WC_file.dat to Server .......... Error: ./
    > > uploadSSH_company2.pl could not upload WC_file.dat to Server.

    >
    > There should be an error message or code associated with the failure or
    > possibly the test for the error isn't correct. A quick guess
    > would be that it's a permissions problem.


    This is the code

    $ftp->binary;
    print "Uploading $_[0] to Server .......... " if (!$silent);
    $ftp->Put($_[0]) or emailerr("Error: $0 could not upload $_[0] to
    Server.")
    ;
    print "Done\n\n" if (!$silent);

    Thank you for your response. I would say that but smaller files are
    being places there ok now that I talked to the admin at that site. I
    saw a post that talked about changing the COPY_SIZE to something
    smaller than the default of 8192, but I don't see where to do that in
    order to check.

    As you can see in the output, it does the first write of 8192 and then
    fails at he remaining bytes that totals the size of the file. I have
    write access to this server too.

    Thanks for any ideas.
    Christine

    server: sftp: Sent message SSH2_FXP_WRITE I:13 O:0
    server: sftp: In write loop, got 8192 offset 0
    server: sftp: Sent message SSH2_FXP_WRITE I:14 O:8192
    server: sftp: In write loop, got 5821 offset 8192



  4. Default Re: net::sftp write error with multiple packet writes

    csgonan@yahoo.com wrote:
    [...]
    > This is the code
    >
    > $ftp->binary;
    > print "Uploading $_[0] to Server .......... " if (!$silent);
    > $ftp->Put($_[0]) or emailerr("Error: $0 could not upload $_[0] to
    > Server.");


    Add the reason. e.g. $ftp->message()

    That's straight out of the documentation!

    Also, I don't see a Put() method. 'put' is documented.

    > print "Done\n\n" if (!$silent);
    >
    > Thank you for your response. I would say that but smaller files are
    > being places there ok now that I talked to the admin at that site. I
    > saw a post that talked about changing the COPY_SIZE to something
    > smaller than the default of 8192, but I don't see where to do that in
    > order to check.


    Again, in the documentation...

    BlockSize specifies the buffer size to use for buffered data transfers.
    Default is 10240.

    I doubt that will have any affect.

    >
    > As you can see in the output, it does the first write of 8192 and then
    > fails at he remaining bytes that totals the size of the file. I have
    > write access to this server too.


    The actual error message should help.

+ Reply to Thread

Similar Threads

  1. Re: USB 6501 Write multiple Output
    By Application Development in forum labview
    Replies: 1
    Last Post: 11-09-2007, 12:40 PM
  2. Re: USB 6501 Write multiple Output
    By Application Development in forum labview
    Replies: 0
    Last Post: 10-17-2007, 03:40 PM
  3. Replies: 2
    Last Post: 08-10-2007, 02:10 PM
  4. C# Write lines to file at high volume, multiple threads
    By Application Development in forum DOTNET
    Replies: 2
    Last Post: 05-14-2007, 07:41 AM
  5. DVD Write Error
    By Application Development in forum Graphics
    Replies: 1
    Last Post: 05-26-2005, 11:12 AM