locked
FTP automation - 10061 error RRS feed

  • Question

  • User-124626679 posted

    I have scripted the downloading of a log file on a daily basis. I can get the site to connect using this:

    ftp -s:ftpcommands.txt

    and ftpcommands.txt is:

    open ftpsite.com
    user
    password
    cd directory
    get file.txt
    disconnect
    bye

     The weird thing is, it'll hang get when it goes to get the file and just do nothing. It'll put a file on my computer, but the file will be empty. The webservers are ours and they are offsite. It is behind a Juniper firewall. The crazier thing is that if i run it off a local server here in the office which goes to the outside servers, it works fine, but not when run off my laptop. The logs on the remote server give a 426 and 10061 error. I've been looking at firewall logs and can't see anything. Why would it work with the server here and not with my laptop if it is a firewall issue anyway. The windows firewall on my laptop is disabled.

     Ideas?

    Brandon

     

    Monday, May 14, 2007 3:12 PM

All replies

  • User-124626679 posted

    I should also mention that I can successfully get the file if I use a client like FileZilla. It downloads fine. So it's not my machine, but something that has to do with the script.

     any help would be appreciated.

     Thanks.

    Monday, May 14, 2007 4:04 PM
  • User1772913629 posted

    Did you check the firewall settings on your server machine? When you do a "get <filename>" over ftp.exe, it opens a active connection with the server, there might be some conflict there.

    I think FileZilla does a PASV connection, thats why you are not getting the issue.

    Thanks

     

    Monday, May 14, 2007 4:44 PM
  • User-124626679 posted

    So why will the script run through fine on other (both client-XP and server-2k3 machine) machines in the office?

     Is there any way to set ftp.exe to a passive connection? Where might the conflict be if the connection is indeed active? and what could I do to change it?

    Is there a better way to automate a ftp download on a daily basis?

     Brandon

    Monday, May 14, 2007 5:58 PM
  • User1772913629 posted

    So, do you have Vista on your laptop?

    ftp.exe is not of much help in PASV mode :(, sorry.

    Monday, May 14, 2007 7:11 PM
  • User1365816255 posted

    Hey there,

    Can you install a free client on your machine?  I understand if this is a corp environment and they lock this down so that is the reason I ask.  FTP.exe is so limiting honestly that we might spend hours trying to find out how to do what you want.  There are a few free clients for FTP...

    My favorite is Core FTP - http://coreftp.com/download.html - Lite version.  It even supports SSL over TLS (which FTP7 supports).  It is pretty easy using the UI to say use passive mode using this client.

    HTH,

    Monday, May 14, 2007 7:29 PM
  • User-124626679 posted

    No, i have XP Pro. No different than the other client machine I tried it on. It's a newer laptop, but doesn't seem any different. any ideas?

    Monday, May 14, 2007 7:29 PM
  • User1365816255 posted

    hey there...

    um, my question is whether you can download a different client not what OS you are running...CoreFTP lite works just fine on XP.  Do you have access to the FTP server as well?

    HTH,

    Monday, May 14, 2007 7:34 PM
  • User-124626679 posted

    Chrisad,

    I was responding to the guy that wrote before you about what OS I have. Yeah I can download whatever I want. I am the network administrator, so I can make it happen. I have Filezilla and that works great. If I download things here and there, then I use Filezilla. However, I'm looking for a way to go about automating the ftp download through a script file, so how would i involve a free client if that was the case.

     None of this answers the question of why the script works just fine with other clients in the office, and other servers in the office.

     I am also the administrator of the ftp machine that's off-site so i have full admin access to that as well. here is a clip of the log when i try to access from my laptop.

     15:19:16 IP [268]USER username 331 0
    15:19:16 IP [268]PASS - 230 0
    15:19:16 IP [268]CWD backups 250 0
    15:19:21 IP [268]sent /backups/file.txt 425 10061
    15:19:21 IP [268]sent /backups/file.txt 426 10061
    15:19:44 IP [268]QUIT - 426 0

    Thanks!

    Tuesday, May 15, 2007 8:08 AM
  • User-124626679 posted

    I'm also getting a hit on our office firewall everytime i try originating on the ftp IP (TCP:20) and going to our gateway on a random high port. Why is this happening for my client machine though and not the others?

    But I disabled the firewall and it still didn't work, so it can't be just that.

     

    best,

    Brandon

    Tuesday, May 15, 2007 8:12 AM
  • User930989739 posted

    In few weeks there will be an ftps.exe tool available for download from www.iis.net. It is like ftp.exe but it supports SSL and passive transfers.

    Thanks

    Jaro Dunajsky 

     

    Wednesday, May 16, 2007 12:29 PM
  • User989702501 posted

    Mm.. you need 21 inbound and 20 outbound.

    if you manually run each step in the script from your laptop same problem?

    You mentioned you disabled the firewall ? is that from the server end?
    you have NAT etc running ? 

    I'm also getting a hit on our office firewall everytime i try originating on the ftp IP (TCP:20) and going to our gateway on a random high port. Why is this happening for my client machine though and not the others?

    But I disabled the firewall and it still didn't work, so it can't be just that.

     

    best,

    Brandon

    Thursday, May 17, 2007 12:27 AM
  • User-124626679 posted

    good news...i'll keep an eye out. 

    In few weeks there will be an ftps.exe tool available for download from www.iis.net. It is like ftp.exe but it supports SSL and passive transfers.

    Thanks

    Jaro Dunajsky 

     

    Friday, June 8, 2007 3:07 PM