ftp task not connecting

  • Hi,

    I am trying to build a dts package that uses an ftp task to get the import file from an ftp site. Sql server seems to be unable to connect to this site although I was able to download the file both with an IE browser and WS FTP Pro. My sql server has no problem accessing other ftp sites. The command line ftp doesn't work either and says that the host is unknown. Does anyone know why this is happening? Is there a way of getting around this?

    Thank you in advance!

    Olja

  • You say you can use either IE or WS_FTP to get the file, but can you get it FTPing from the server?  I have seen the "unknown host" error when the computer attempting the FTP session is NOT KNOWN on the FTP Server.  In other words, the FTP server can ONLY be accessed from a list of IP addresses maintained on the FTP server.

    Hope this helps.

    Butch


    Butch

  • Can you even ping the FTP site's name from the SQL Server? Sound like a name resolution problem, or an IP filtering problem to me. When you did your successfull tests did you do them form the SQL Server's console?

    Chris

  • The first thing I would do is establish basic communications.  Can you ping the IP address of the FTP server from your SQL Server?   It could be related to DNS or hosts files.

    If you can ping, then try using the IP address in FTP to connect.  If you can't establish connection, I would say it is probably as ButchH mentioned and an authorization problem.


    Joe Johnson
    NETDIO,LLC.

  • Thank you for your replies. I tried pinging the ftp address, but got the "host unknown" error. Does this mean that IE & WS Pro have a different method of resolving the IP address?

  • Not really.  When you tried to ping the server, did you use ping hostname or ping ip-address?  Can you try the ip-address method.

    If you cannot reach the server using the ip address, it means you have a basic communications error and that will have to be resolved.  More than likely, it is a problem with the server or the routing. 

    If you can reach the server using the ip address, it means the name resolution is not working.  You can usually substitute the ip address for the name and everything will work the same.

    Usually you only have a few ways of resolving a name -- the hosts file on the server itself; the WINS database (if using NT rather than 2000/03); or DNS.  If the server is not part of your company's network, forget about WINS (MS has gone away from WINS in favor of DNS).  This leaves only DNS or the hosts file.  Both do a lookup from ip address to computer name.

    Good luck.


    Joe Johnson
    NETDIO,LLC.

  • suaaddaa

    The resolution method of IE is usually the same as the settings FTP and a command prompt would use, unless you have a proxy server configured in IE. Sometimes other apps will use the same proxy server as IE, but I don't know about WS FTP.

    Chris

  • I would recommend setting up a DOS batch script to handle the ftp and kick that off using DTS.  You'll find it works very consistently and is relatively simple.  Make sure to have full path names for all file references in the DOS scripts (ex. e:\my_scripts\ftp\some_ftp_script.bat).

  • Another note... It might connect thru IE or WS FTP because the ftp port number may be different (and IE and WS FTP are resolving that port).  It could be sftp which typically runs on port 22.

  • Hi,

       I ran into a problem with FTP after we upgraded to Windows 2003. Routing and Remote Access Service only allowed PASSIVE FTP through the server. Being Mr. Lazy, I left that alone and configured IE to use Passive FTP.

       Since Microsoft's FTP doesn't support PASV mode, and it's the same FTP client used by DTS, I'd check your IE settings and change the option to use passive FTP and see if you can still connect.

       Third party FTP products like WS-FTP support passive mode, so you may be unaware you have this problem if you test connectivity with them.

     I hope this is the answer!

    -Brian

     

  • Brain, The IE browser is in active mode when I managed to access the ftp so so I don't think it is to do with the ftp mode (I suspected it might be the case at some point).

    I followed up on the suggestion about using the IP/pinging, but when I tried to ping the site I again got the "host unknown" message. IE obviously resolves the name! Is there a way I can get the IP address from the IE when I manage to connect? Does anyone have an idea of how I might get the IP address of the ftp site (other than speaking to someone in their tech support)?

    Thanks,

    Olja

  • I had that Problem before and JellyRoll  IS ON THE MONEY

    Passive FTP is required for some sites and the ftp client that comes by default does not supports it!

    Here are some free components that can be used from  vbscript as well:

    AspFTP

    AspInet

    HTH


    * Noel

  • It's probably best to use nslookup to resolve a host name. Pinging doesn't always work, especially if the firewall does not allow ICMP to get through. That's a fairly common practice, especially when some of the worms out in the wild use ping to find their next victim!

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply