Rich, Dennis | 2 Feb 2009 18:19

Cannot user mget with sftp

I am trying to do a mget *.csv through sftp connection.  I get *.csv: no files found.  When I do an ls I cannot see them, but when I do nlist I can see them.  What am I doing wrong.  I can do a get of the full file name if I know it also.

 

Thanks,

 

---------------------
Dennis Rich
Sr. Systems Administrator
Eastern Municipal Water District

 

Rippy | 3 Feb 2009 00:07
Picon

Help debugging lftp hang

Hello,
I'm compiling lftp 3.7.8 for HP-UX 11.11, and having some trouble: lftp
hangs at 100% CPU, during the file transfer (if it's a large one and ssl
is enabled) or at the end if it's small or not ssl.

How should I persue this?  Here's one test session, talking to proftpd on
HPUX:
/home/user1/test $cat cnha.lftp
set ftp:ssl-allow off
set ftp:passive-mode off
#set ftp:fix-pasv-address on
set ftp:ignore-pasv-address yes
debug 5
open  cnha.gov.ab.ca -u user2,dumbpassword
ls gpg149-hpux.tar
get gpg149-hpux.tar
bye
/home/user1/test $lftp -f cnha.lftp
---- Resolving host address...
---- 1 address found: 199.214.232.217
---- Connecting to cnha.gov.ab.ca (199.214.232.217) port 21
<--- 220 ProFTPD 1.3.1 Server (CNHA FTPES Server) [199.214.232.217]
---> FEAT
<--- 211-Features:
 MDTM
 AUTH TLS
 PBSZ
 PROT
 REST STREAM
 SIZE
<--- 211 End
---> USER user2
<--- 331 Password required for user2
---> PASS dumbpassword
<--- 230 User user2 logged in
---> PWD
<--- 257 "/home/user2" is the current directory
---> PORT 199,214,232,217,211,17
<--- 200 PORT command successful
---> LIST gpg149-hpux.tar
---- Accepted data connection from (199.214.232.217) port 20
<--- 150 Opening ASCII mode data connection for file list
-rw-rw-r--   1 user2   oss      61409280 Dec 15 20:56 gpg149-hpux.tar
<--- 226 Transfer complete
---> TYPE I
<--- 200 Type set to I
---> SIZE gpg149-hpux.tar
<--- 213 61409280
---> MDTM gpg149-hpux.tar
<--- 213 20081215205655
---> PORT 199,214,232,217,211,18
<--- 200 PORT command successful
---> RETR gpg149-hpux.tar
---- Accepted data connection from (199.214.232.217) port 20
<--- 150 Opening BINARY mode data connection for gpg149-hpux.tar (61409280
bytes)
<--- 226 Transfer complete

... at this point the process hangs at 100% CPU.

From config.log:
Target: hppa2.0w-hp-hpux11.11
Configured with: ../gcc/configure
Thread model: posix
gcc version 4.1.2

My developer skills are quite limited on this platform.  Where should I
look next?
Rippy

Florin Tarnovanu | 2 Feb 2009 22:42
Picon

lftp problem

hello mr Lukyanov,

I use lftp for transferring files and I have the following problem on connectiong to a ftp server:

lftp tstILL <at> 84.37.55.60:~> ls
---- Connecting to 84.37.55.60 (84.37.55.60) port 21
<--- 220 Service ready for new user
---> FEAT
<--- 530 Access denied
---> USER tstILL
**** Peer closed connection
---- Closing control socket
Interrupt

the system is UNIX from OS X, version of lftp is 3.5.10.

the built-in ftp app is working fine with this ftp server.
can you help me with this problem?

Thanks in advance,
Florin Tarnovanu, Romania
Alexander V. Lukyanov | 9 Feb 2009 11:11
Picon
Gravatar

Re: lftp connection problem

On Mon, Feb 02, 2009 at 11:14:42PM +0200, Florin Tarnovanu wrote:
> hello mr Lykyanov,
> 
> I use lftp for transferring files and I have the following problem on  
> connectiong to a ftp server:
> 
> lftp tstILL <at> 84.37.55.60:~> ls
> ---- Connecting to 84.37.55.60 (84.37.55.60) port 21
> <--- 220 Service ready for new user
> ---> FEAT
> <--- 530 Access denied
> ---> USER tstILL
> **** Peer closed connection

Do this in lftp:

	set ftp:use-feat off

--

-- 
   Alexander.

Rippy | 9 Feb 2009 19:46
Picon

Re: Help debugging HP-UX 11.11 lftp hang

Hello,
It appears to be spinning in xstring::vappendf, with "len" at 1GB seeming
a bit large:
Program received signal SIGINT, Interrupt
  si_code: 0 - .
0x7aff2210 in _doprnt+0x48 () from /usr/lib/libc.2
(gdb) bt
#0  0x7aff2210 in _doprnt+0x48 () from /usr/lib/libc.2
#1  0x7b004c4c in vsnprintf+0x54 () from /usr/lib/libc.2
#2  0x705d8 in xstring::vappendf (this=<incomplete type>, format=0xe7d5c
"`%s' at %lld %s%s%s%s", ap=0x7f7f0e3c)
    at xstring.cc:260
#3  0x70fd0 in xstring::format (fmt=0xe7d5c "`%s' at %lld %s%s%s%s") at
xstring.h:164
#4  0x49f80 in CopyJob::Status (this=<incomplete type>, s=0x7b00c10f,
base=193) at CopyJob.cc:87
#5  0x49fb8 in CopyJob::Fg (this=<incomplete type>) at CopyJob.cc:95
#6  0x34298 in Job::ShowRunStatus (this=<incomplete type>, sl= <at> 0xe7d5c) at
Job.cc:457
#7  0x34298 in Job::ShowRunStatus (this=<incomplete type>, sl= <at> 0xe7d5c) at
Job.cc:457
#8  0x36058 in CmdFeeder::~CmdFeeder (this=<incomplete type>) at
CmdExec.cc:701
#9  0x380b0 in CmdExec::Do (this=<incomplete type>) at CmdExec.cc:571
(gdb) b xstring.cc:260
Breakpoint 1 at 0x705b8: file xstring.cc, line 260 from
/home/georgg/bin/lftp.
(gdb) c
Continuing.

Breakpoint 1, xstring::vappendf (this=<incomplete type>, format=0xe7d5c
"`%s' at %lld %s%s%s%s", ap=0x7f7f0e3c)
    at xstring.cc:260
260           size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) clear
Deleted breakpoint 1
(gdb) n
259           VA_COPY(tmp,ap);
(gdb) n
260           size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) n
262           if(res>=0 && res<size-len)
(gdb) n
260           size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) n
267           get_space(res>size-len ? len+res+1 : len+(size-len)*2);
(gdb) n
262           if(res>=0 && res<size-len)
(gdb) n
267           get_space(res>size-len ? len+res+1 : len+(size-len)*2);
(gdb) n
255           get_space(len+strlen(format)+32);
(gdb) n
260           size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) n
259           VA_COPY(tmp,ap);
(gdb) n
260           size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) n
262           if(res>=0 && res<size-len)
(gdb) n
260           size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) n
267           get_space(res>size-len ? len+res+1 : len+(size-len)*2);
(gdb) n
262           if(res>=0 && res<size-len)
(gdb) n
267           get_space(res>size-len ? len+res+1 : len+(size-len)*2);
(gdb) n
255           get_space(len+strlen(format)+32);
(gdb) n
260           size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) p res
$1 = 64
(gdb) p len
$2 = 1073782568
(gdb) p buf
Internal error: `this' is not an aggregate
(gdb) p size
Internal error: `this' is not an aggregate
(gdb) p format
$3 = 0xe7d5c "`%s' at %lld %s%s%s%s"
(gdb) p tmp
$4 = 0x7f7f0e3c
(gdb) p {char}buf
Internal error: `this' is not an aggregate
(gdb)

G.

> I'm compiling lftp 3.7.8 for HP-UX 11.11, and having some trouble: lftp
> hangs at 100% CPU, during the file transfer (if it's a large one and ssl
> is enabled) or at the end if it's small or not ssl.
>
> How should I persue this?  Here's one test session, talking to proftpd on
> HPUX:
> /home/user1/test $cat cnha.lftp
> set ftp:ssl-allow off
> set ftp:passive-mode off
> #set ftp:fix-pasv-address on
> set ftp:ignore-pasv-address yes
> debug 5
> open  cnha.gov.ab.ca -u user2,dumbpassword
> ls gpg149-hpux.tar
> get gpg149-hpux.tar
> bye
> /home/user1/test $lftp -f cnha.lftp
> ---- Resolving host address...
> ---- 1 address found: 199.214.232.217
> ---- Connecting to cnha.gov.ab.ca (199.214.232.217) port 21
> <--- 220 ProFTPD 1.3.1 Server (CNHA FTPES Server) [199.214.232.217]
> ---> FEAT
> <--- 211-Features:
>  MDTM
>  AUTH TLS
>  PBSZ
>  PROT
>  REST STREAM
>  SIZE
> <--- 211 End
> ---> USER user2
> <--- 331 Password required for user2
> ---> PASS dumbpassword
> <--- 230 User user2 logged in
> ---> PWD
> <--- 257 "/home/user2" is the current directory
> ---> PORT 199,214,232,217,211,17
> <--- 200 PORT command successful
> ---> LIST gpg149-hpux.tar
> ---- Accepted data connection from (199.214.232.217) port 20
> <--- 150 Opening ASCII mode data connection for file list
> -rw-rw-r--   1 user2   oss      61409280 Dec 15 20:56 gpg149-hpux.tar
> <--- 226 Transfer complete
> ---> TYPE I
> <--- 200 Type set to I
> ---> SIZE gpg149-hpux.tar
> <--- 213 61409280
> ---> MDTM gpg149-hpux.tar
> <--- 213 20081215205655
> ---> PORT 199,214,232,217,211,18
> <--- 200 PORT command successful
> ---> RETR gpg149-hpux.tar
> ---- Accepted data connection from (199.214.232.217) port 20
> <--- 150 Opening BINARY mode data connection for gpg149-hpux.tar (61409280
> bytes)
> <--- 226 Transfer complete
>
> ... at this point the process hangs at 100% CPU.
>
> From config.log:
> Target: hppa2.0w-hp-hpux11.11
> Configured with: ../gcc/configure
> Thread model: posix
> gcc version 4.1.2
>
> My developer skills are quite limited on this platform.  Where should I
> look next?
> Rippy
>
>
>
>

Albert Chin | 10 Feb 2009 00:01

Re: Help debugging HP-UX 11.11 lftp hang

On Mon, Feb 09, 2009 at 11:46:57AM -0700, Rippy wrote:
> Hello,
> It appears to be spinning in xstring::vappendf, with "len" at 1GB seeming
> a bit large:
> Program received signal SIGINT, Interrupt
>   si_code: 0 - .
> 0x7aff2210 in _doprnt+0x48 () from /usr/lib/libc.2
> (gdb) bt
> #0  0x7aff2210 in _doprnt+0x48 () from /usr/lib/libc.2
> #1  0x7b004c4c in vsnprintf+0x54 () from /usr/lib/libc.2
> #2  0x705d8 in xstring::vappendf (this=<incomplete type>, format=0xe7d5c
> "`%s' at %lld %s%s%s%s", ap=0x7f7f0e3c)
>     at xstring.cc:260
> #3  0x70fd0 in xstring::format (fmt=0xe7d5c "`%s' at %lld %s%s%s%s") at
> xstring.h:164
> #4  0x49f80 in CopyJob::Status (this=<incomplete type>, s=0x7b00c10f,
> base=193) at CopyJob.cc:87
> #5  0x49fb8 in CopyJob::Fg (this=<incomplete type>) at CopyJob.cc:95
> #6  0x34298 in Job::ShowRunStatus (this=<incomplete type>, sl= <at> 0xe7d5c) at
> Job.cc:457
> #7  0x34298 in Job::ShowRunStatus (this=<incomplete type>, sl= <at> 0xe7d5c) at
> Job.cc:457
> #8  0x36058 in CmdFeeder::~CmdFeeder (this=<incomplete type>) at
> CmdExec.cc:701
> #9  0x380b0 in CmdExec::Do (this=<incomplete type>) at CmdExec.cc:571
> (gdb) b xstring.cc:260
> Breakpoint 1 at 0x705b8: file xstring.cc, line 260 from
> /home/georgg/bin/lftp.
> (gdb) c
> Continuing.

I think lib/Makefile.am needs to be updated by adding the vsnprintf and
vsnprintf-posix modules to solve your problem.

--

-- 
albert chin (china <at> thewrittenword.com)

Albert Chin | 10 Feb 2009 05:19

Re: Help debugging HP-UX 11.11 lftp hang

On Mon, Feb 09, 2009 at 05:01:01PM -0600, Albert Chin wrote:
> On Mon, Feb 09, 2009 at 11:46:57AM -0700, Rippy wrote:
> > Hello,
> > It appears to be spinning in xstring::vappendf, with "len" at 1GB seeming
> > a bit large:
> > Program received signal SIGINT, Interrupt
> >   si_code: 0 - .
> > 0x7aff2210 in _doprnt+0x48 () from /usr/lib/libc.2
> > (gdb) bt
> > #0  0x7aff2210 in _doprnt+0x48 () from /usr/lib/libc.2
> > #1  0x7b004c4c in vsnprintf+0x54 () from /usr/lib/libc.2
> > #2  0x705d8 in xstring::vappendf (this=<incomplete type>, format=0xe7d5c
> > "`%s' at %lld %s%s%s%s", ap=0x7f7f0e3c)
> >     at xstring.cc:260
> > #3  0x70fd0 in xstring::format (fmt=0xe7d5c "`%s' at %lld %s%s%s%s") at
> > xstring.h:164
> > #4  0x49f80 in CopyJob::Status (this=<incomplete type>, s=0x7b00c10f,
> > base=193) at CopyJob.cc:87
> > #5  0x49fb8 in CopyJob::Fg (this=<incomplete type>) at CopyJob.cc:95
> > #6  0x34298 in Job::ShowRunStatus (this=<incomplete type>, sl= <at> 0xe7d5c) at
> > Job.cc:457
> > #7  0x34298 in Job::ShowRunStatus (this=<incomplete type>, sl= <at> 0xe7d5c) at
> > Job.cc:457
> > #8  0x36058 in CmdFeeder::~CmdFeeder (this=<incomplete type>) at
> > CmdExec.cc:701
> > #9  0x380b0 in CmdExec::Do (this=<incomplete type>) at CmdExec.cc:571
> > (gdb) b xstring.cc:260
> > Breakpoint 1 at 0x705b8: file xstring.cc, line 260 from
> > /home/georgg/bin/lftp.
> > (gdb) c
> > Continuing.
> 
> I think lib/Makefile.am needs to be updated by adding the vsnprintf and
> vsnprintf-posix modules to solve your problem.

Well, adding vsnprintf and vsnprintf-posix modules will fix your problem
on HP-UX (the vsnprintf module alone won't). But, it will break lftp on
Solaris. No idea why. lftp built with Sun C++ and Solaris vsnprintf
works. But, with gnulib vsnprintf, output is not as it should be.
However, lftp built with GNU C++ and gnulib vsnprintf on Solaris work.

--

-- 
albert chin (china <at> thewrittenword.com)

Quillen, Channon | 11 Feb 2009 19:59
Favicon

ftps - not supported protocol

OS: Fedora Core 6.4
lftp: 3.7.8
previous lftp: 3.5.14-3

I installed 3.5.14-3 via a rpm.  However, we added a vendor that
requires "truncate" with sftp.
I found that I was able to communicate with them by using lftp 3.7.8.
There isn't a rpm of 3.7.8 for Fedora Core 6.4, so I downloaded the lftp
source and compiled it.  I'm now able to 'put' files to our new vendor.

However, this has caused problems with a current vendor that requires
connection via ftps.
When I try to connect: open ftps://hostname:990
I get this error "open: ftps - not supported protocol"

I also noticed that I don't have any variables with the word "ftps".
lftp :~> set -a | grep ftps
FileCopy(0x900e2d0) enters state INITIAL

Our other vendors I'm still able to connect to using sftp and ftp with
no problems.

-Channon

Daniel Fazekas | 11 Feb 2009 20:50
Picon

Re: ftps - not supported protocol

On Feb 11, 2009, at 19:59, Quillen, Channon wrote:

> There isn't a rpm of 3.7.8 for Fedora Core 6.4, so I downloaded the  
> lftp source and compiled it.  I'm now able to 'put' files to our new  
> vendor.
> When I try to connect: open ftps://hostname:990
> I get this error "open: ftps - not supported protocol"

You have to recompile lftp and enable ssl support through either  
openssl or gnutls.
Make sure you have the development headers installed for the ssl  
library of your choice. Usually in an rpm named *-devel.


Gmane