Trying to connect to a ftp server

I am able to connect to Cerberus (5.0.0.5) using the web browser or using a CoreFTP client, but I can't connect programatically using org.apache.commons.net.ftp.FTPClient. 
Below is my code (this is actually using the java ftpclient through Coldfusion) :
ftpsClient = CreateObject("java","org.apache.commons.net.ftp.FTPClient").init();
ftpsClient.connect(JavaCast("string","xxx.xxx.xxx.xxx"),21);
connected = ftpsClient.isConnected();
login = ftpsClient.login(JavaCast("string","username"),JavaCast("string","password"));
This is what I see in the ftp server log file:
2011/12/13 13:47:54  [0]  Client connected to Cerberus FTP Server 5.0.0.5 on 'machine'
2011/12/13 13:48:41  [1]  Incoming connection request on FTP interface 0 at xxx.xxx.xxx.xxx
2011/12/13 13:48:41  [1]  FTP connection request accepted from xxx.xxx.xxx.xxx
2011/12/13 13:48:45  [1]  USER svc.script
2011/12/13 13:48:45  [1]  331 User svc.script, password please 
At this point the Coldfusion/Java client returns "Truncated server reply".  I also tried not using the login, and instead sending the user command and pass command separately like this:
userCmd = ftpsClient.sendCommand(JavaCast("string","USER" ),JavaCast("string","username" ));
But as soon as I send the "USER" command I see the above in the log file and the same reply, "Truncated server reply".
When I use the cfftp tag like this:
<cfsetting requesttimeout="1000">
<cfftp action="open" connection="ftptest" secure="false"
    server="xxx.xxx.xxx.xxx" port="21"
    username="username" password-"password" timeout="1000" stoponerror="true">
I receive a "java.net.ConnectException: Connection timed out: connect"
Does anyone have any ideas?  Thanks much.

This has been resolved.
There is a bug in the apache commons ftpclient that misinterprets /r in the welcome message.  The ftp server people made a change that fixes this.
With cfftp, when I changed the server attribute on the cfftp open to the server name instead of the ip address, it started working.  To me this is a bug in ColdFusion, you should be able to use the ip address.
The other thing I noticed is when you use getfile, you have to set the the failifexists attribute to "false".  If you don't, it fails every time and the file has a "0" size, whether the file actually does exist.  To me, another bug.

Similar Messages

  • Trying to connect to an FTP server

    I have files on an FTP server through my university but now that I bought a mac I don't know how to access them. My university's website lists the server ftp://[email protected]/../../users/, but I tried typing this in the address bar on Safari and it doesn't work. It asks me for my name and my password and then thinks but is unable to connect. I can give you any more information you need to help me solve this problem, just ask. Thank you very much for your time,
    Sara

    Hi Sara,
    FTP on the Mac is a bit lacking still, I use TranmitX myself...
    http://www.panic.com/transmit/
    Though there are several other ones, some Freeware, or Shareware ones...
    http://www.versiontracker.com/php/search.php?mode=basic&action=search&str=ftp&pl t%5B%5D=macosx&x=0&y=0
    Not saying it can't be done the way your trying... OSX reads ftp at the moment, but doesn't write it yet... or is it vice versa!?
    I can't think of any more info you could give to help, other than your Login Info, which wouldn't be wise in a post, and though I try to be 100% trustworthy... YOU don't know that! LOL :_)
    Putting that ftp/url into my Transmit tells me that username was denied, as was Sara! So I feel quite certan TransmitX could do it for you.

  • How to connect to an FTP server via Midnight Commander _User_Menu_?

    Hi everyone.
    There's a nifty command that works in MC and makes it connect to an FTP server and display its directories just as if they were local ones: cd ftp://USER_LOGIN@SERVER_NAME. The only thing it asks for is a password, obviously. That's exactly what i'm looking for, theoretically.
    I know it's not really a standard Bash command, because if invoked outside MC, it returns an error (directory not found).
    I got kind of tired of typing it in (or copypasting it) every time, so i thought why not make it automatic? A Bash alias or a shell script wouldn't work, because as i said, it's not really a bash command.
    But what surprised me was that it didn't work as an entry in MC's menu, too.
    Tried to go another way, discovered kftp, apparently it's completely not what i am looking for.
    And i didn't even understand what F9 > Left > FTP Link in MC did. It isn't automatic as well anyway, i have to type everything in manually.
    Can anyone advise how to automate FTP connection in MC, or even in Bash (so that MC just treats it like a regular directory)?
    Big thanks in advance.
    Last edited by kiruch (2010-07-04 20:53:44)

    kiruch wrote:mcsilva, here are the contents of my ~/.netrc file: machine ftp.0fees.net login MYLOGIN password MYPWD
    When i invoke cd ftp://ftp.0fees.net, it tells me bash: cd: ftp://ftp.0fees.net: No such file or directory
    This is not the correct way. You are using bash command line. For this to work it must be:
    # mc cd ftp://ftp.0fees.net
    kiruch wrote:When i invoke it as an entry of MC's menu (what i'm aiming for), i get /tmp/mc-cyril/mcusr6BWdYd: line 2: cd: ftp://ftp.0fees.net: No such file or directory - well, basically the same.
    I don't know what do you mean by "invoke an entry of MC's menu",
    Is this:
    Left->FTP link or Right->FTP link ?
    kiruch wrote:And finally, if i type cd ftp://ftp.0fees.net manually into MC's command prompt, i get a red alert message that says Cannot chdir to "ftp://ftp.0fees.net". Input/output error (5)
    In the first post you said you were able to login with "cd ftp://USER_LOGIN@SERVER_NAME", so MC is working well.
    This error you showed is the same which I have when I type "cd ftp.0fees.net" in the MC command prompt (maybe you typed wrong...)
    Instead, when I try "cd ftp://ftp.0fees.net" the popup error is:  "ftpfs: Login incorrect for user anonymous"
    This is what I expected, because I don't have the username and password and I'm trying a anonymous login.
    Are you sure your typing is right? Please, check your typing and try again.

  • Error message when trying to connect to an FTP address

    I am trying to connect to an FTP address. When I use Finder > Go> Connect to server... and type in the FTP address I want and click on "connect", I get an error message:
    The operation cannot be completed because one or more required items cannot be found (Error code -43)
    What could this mean? I automatically get all updates.
    Thanks everyone, Mike Storer, Los Angeles.
    G-4 tower   Mac OS X (10.4.8)  

    This article may help explain the Error -43
    http://docs.info.apple.com/article.html?artnum=107032
    Even though the article is about connecting to an SMB share, most of it can still hold true when connecting via FTP.
    If you haven't yet, you may want to try using a 3rd party FTP application, such as CyberDuck http://www.versiontracker.com/dyn/moreinfo/macosx/14426
    Ben

  • An error occurred while connecting to the FTP server '127.0.0.1:14147'

    HI Experts,
    I have been tried Content Conversion by using the FTP. Under Adapter Monitoring --> Communication Channel monitoring i found this error:
    An error occurred while connecting to the FTP server '127.0.0.1:14147'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx:  4     '. For details, contact your FTP server vendor.
    Regards,
    -Prabhakar.A

    Hi
    Pl mention the error correctly, whats the FTP error code? (something like this: 426, 521)
    Could be due to 2 reasons:
    1) insufficient privileges
    2) wrong port
    Srikanth Srinivasan
    Edited by: Srikanth Srinivasan on Jun 20, 2010 2:19 PM

  • How to connect to a FTP server using a proxy in a DMZ with XI file adapter?

    Hello,
    Want to connect to an ftp server using a proxy in the DMZ. I don't see any standard options in the XI file adapter to use a standard. Is there a workaround?
    I already looked at https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=57137
    But it didn't help me.
    Regards,
    Erik van Lisdonk

    U can't use FTP over SSH i.e., SFTP. But u may use FTPS by enabling the SSL layer on J2EE of XI. See this
    SFTP vs. FTPS in SAP PI
    Regards,
    Prateek

  • Error occurred while connecting to the FTP server: java.lang.NullPointerExc

    Hello Experts,
    I have a scenario wherein i have to send file from FTP to application server of ECC.
    I don't want to do any mapping and transformation; Just need to transfer the file as it is.
    I have achieved this using Integrated scenario.
    But in the sender communication channel i get an error saying "Error occurred while connecting to the FTP server "*.*.*.*:*": java.lang.NullPointerException"
    I have checked all my FTP parameters many times and everything is correct.
    Thanks,
    Lalit Mohan Gupta.

    Hi,
    You can check the connect test of FTP in either of the below ways.
    1. Use FTP Dos command (i.e go the run and type ftp..) and from there try to login to the source FTP server by using FTP Commands. If you are able to connect to the same then ask your basis to check the connectivity test from PI server.
    If you are not able to connect check the error you are getting and post the same if you are not able to resolve the same.
    2. There is Program from SAP which need to be deployed into Server and after that you can test the ftp connection by yourselves from PI server. Search in sap support for Connection Test SAP Note..
    HTH
    Rajesh

  • Macbook pro keeps trying to connect to an old server

    I have a macbook pro, just updated to OSX mavericks, when I turn the machine on, it will keep trying to connect to an old server that no longer exists (a windows pc I had at home I called "estudio"); how can I fix this? where is that the OS keeps the list of servers that the machine has been connected to? I already went through the option of "deleting all the list of recent servers" on the Connecting to a Server window.
    Thanks for any help
    Sandra

    Check in:
    System Preferences > Accounts > Your_username > Login Items

  • Why do I get the message  "cannot get mail" when trying to connect to microsoft exchange server.

    Why do I get the message "cannot get mail" when trying to connect to ms exchange server?

    Hard to say. Has it ever worked? Maybe your account has mobile e-mail disabled. Maybe ActiveSync isn't set up properly on the server. maybe the correct ports are not open on the corporate firewall.
    You will have to talk to your IT department.

  • ZfD 701 Trying to connect to Master XML Server

    After loading the Inventory service, everything seems to be normal,but
    then it tells
    ....connection refused
    Trying to connect to Master XML Server...
    I did not find much in the Knowledge base.
    Does this mean, the Inventory service is looking for a inventory proxy?
    If so, wow can I tell Zfd to stop looking for the proxy?
    Jrgen

    Jrgen Blessing,
    > Trying to connect to Master XML Server...
    It sounds as if the webservice is not loading correctly.
    http://www.novell.com/support/search...200%2031966570
    http://www.novell.com/support/search...200%2031966570
    http://www.novell.com/support/search...200%2031966570
    Jared Jennings - Data Technique, Inc.
    Novell Support Forums Sysop
    My Blog and Wiki with Tips, Tricks, and Tutorials
    http://jaredjennings.org

  • Anytime I open Firefox I get the follopwing meesage: It is storngly recommended that you appl this update as soon as possible. When I trr to di it, it is showing that it is trying to connect to the update server but nothing is happening

    Anytime I open Firefox I get the following message: It is strongly recommended that you apply this update as soon as possible. When I try to do it, it is showing that it is trying to connect to the update server but nothing is happening

    If there are problems with updating then best is to download the full version and uninstall the currently installed version.
    Download a fresh Firefox copy and save the file to the desktop.
    * Firefox 7.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Uninstall your current Firefox version.
    * Do not remove personal data when you uninstall the current version or you lose your bookmarks and other data in the profile folder.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    * It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    Your bookmarks and other profile data are stored elsewhere in the Firefox Profile Folder and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.
    * http://kb.mozillazine.org/Profile_folder_-_Firefox
    * http://kb.mozillazine.org/Profile_backup

  • Trying to connect to Master XML server

    Hello everyone....
    I have a single NW 6.5 SP7 Zen 7 Inventory server and I am getting this
    error and some odd things happening when I try to look at the status of the
    workstation scans. First of all, I am wondering if these problems are
    relate.
    Either way, I need to get this "Trying to connect to Master XML server..."
    error fixed. Someone suggested in an earlier post that a complete uninstall
    and reinstall may be the way to go. They talked about online documents that
    gave detail instructions on that but I never found anything like that.
    So, I'm kind of stuck. Can anyone help me out there....?
    Thanks.
    Delon E. Weuve
    Senior Network Engineer
    Office of Auditor of State
    State of Iowa
    USA

    Delon,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Trying to connect to maser xml server.....

    running netware 6.5 sp5, zfd 6.5. Getting:
    >Trying to connect to Master XML Server...
    on the ZENworks Inventory Server screen on the server.
    Questions include:
    *What's a "Master XML Server"
    *How do you make the message go away
    If you want to refer me to TID 10099856. I did read that, and it sounds
    like the most likely solution. However, I'm unsure where to find a new
    ZWS.PROPERTIES or ZFS-STARTUP.XML file. Further, I can edit these files
    and they do not appear to be corrupt.
    Thanks for your assistance,
    Paul

    Paul,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • ITunes tells me there is an update (5.1) but it never gets any further than trying to connect to the iPad server. I've tried updating directly from my iPad and it too times out saying it cannot connect to any server. My regular Apple updates work fine.

    iTunes tells me there is an iOS update (5.1) but it never gets any further than trying to connect to the iPad server. I've tried updating directly from my iPad and it too times out saying it cannot connect to any server. My regular Apple updates work fine.

    I haven't updated yet. Apple's download servers have been too busy. Did you know you can update via wifi instead of connection to your computer?
    Here's a description of the update. Not a lot of changes for iPad 1/2.
    iOS 5.1 Software Update
    http://support.apple.com/kb/DL1504
    You can wait a while & update at your convenience.
     Cheers, Tom

  • Can not connect to Cerberus FTP Server with PASV

    I setup a FTP Server and i can connect from the inside fine but from the outside i can not connect in passive mode. I can in regular ftp or ssh.
    Here is the log from filezilla
    Status:          Resolving address of domain.com
    Status:          Connecting to ExternalIP:990...
    Status:          Connection established, initializing TLS...
    Status:          Verifying certificate...
    Status:          TLS/SSL connection established, waiting for welcome message...
    Response:          220-220-Welcome to Cerberus FTP Server
    Response:          220 220 Created by Cerberus, LLC
    Command:          USER test
    Response:          331 User test, password please
    Command:          PASS ***********
    Response:          230 Password Ok, User logged in
    Command:          CLNT FileZilla
    Response:          200 Command okay
    Command:          OPTS UTF8 ON
    Response:          220 UTF8 support on
    Command:          PBSZ 0
    Response:          200 PBSZ=0
    Command:          PROT P
    Response:          200 PROT P OK, data channel will be secured
    Status:          Connected
    Status:          Retrieving directory listing...
    Command:          PWD
    Response:          257 "/" is the current directory
    Command:          TYPE I
    Response:          200 Type Binary
    Command:          PASV
    Response:          227 Entering Passive Mode (external IP,195,83)
    Command:          MLSD
    Error:          Connection timed out
    Error:          Failed to retrieve directory listing
    Result of the command: "show running-config"
    : Saved
    ASA Version 8.0(4)
    interface Vlan1
    nameif inside
    security-level 100
    ip address 192.168.10.10 255.255.255.0
    interface Vlan2
    nameif outside
    security-level 0
    pppoe client vpdn group att
    ip address pppoe setroute
    interface Ethernet0/0
    switchport access vlan 2
    interface Ethernet0/1
    interface Ethernet0/2
    interface Ethernet0/3
    interface Ethernet0/4
    interface Ethernet0/5
    interface Ethernet0/6
    interface Ethernet0/7
    ftp mode passive
    clock timezone CST -6
    clock summer-time CDT recurring
    object-group service RDP tcp
    description RDP
    port-object eq 3389
    object-group service FTP_PASV_Ports tcp
    description Passive Ports
    port-object range 35000 35999
    object-group service FTPS tcp
    description FTPS
    port-object eq 990
    access-list outside_access_in extended permit tcp any any object-group RDP
    access-list outside_access_in extended permit icmp any any
    access-list outside_access_in extended permit tcp any any eq ftp
    access-list outside_access_in extended permit tcp any any eq telnet
    access-list outside_access_in extended permit tcp any any eq smtp
    access-list outside_access_in extended permit tcp any any eq www
    access-list outside_access_in extended permit tcp any any eq pop3
    access-list outside_access_in extended permit tcp any any eq https
    access-list outside_access_in remark passive FTP port range
    access-list outside_access_in extended permit tcp any host server object-group FTP_PASV_Ports
    access-list outside_access_in extended permit tcp any any eq ssh
    access-list outside_access_in extended permit tcp any any object-group FTPS
    access-list outside_access_in extended permit tcp any any eq ftp-data
    pager lines 24
    logging enable
    logging asdm informational
    mtu inside 1500
    mtu outside 1492
    icmp unreachable rate-limit 1 burst-size 1
    asdm image disk0:/asdm-621.bin
    no asdm history enable
    arp timeout 14400
    global (outside) 1 interface
    nat (inside) 1 0.0.0.0 0.0.0.0
    static (inside,outside) tcp interface www server www netmask 255.255.255.255
    static (inside,outside) tcp interface https server https netmask 255.255.255.255
    static (inside,outside) tcp interface smtp server smtp netmask 255.255.255.255
    static (inside,outside) tcp interface 3389 server 3389 netmask 255.255.255.255
    static (inside,outside) tcp interface pop3 server pop3 netmask 255.255.255.255
    static (inside,outside) tcp interface ftp server ftp netmask 255.255.255.255
    static (inside,outside) tcp interface ssh server ssh netmask 255.255.255.255
    static (inside,outside) tcp interface 990 server 990 netmask 255.255.255.255
    static (inside,outside) tcp interface ftp-data server ftp-data netmask 255.255.255.255
    access-group outside_access_in in interface outside
    timeout xlate 3:00:00
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    dynamic-access-policy-record DfltAccessPolicy
    http server enable
    http 192.168.10.0 255.255.255.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart
    crypto ipsec security-association lifetime seconds 28800
    crypto ipsec security-association lifetime kilobytes 4608000
    telnet 0.0.0.0 0.0.0.0 inside
    telnet timeout 5
    ssh 192.168.10.0 255.255.255.0 inside
    ssh timeout 5
    console timeout 0
    vpdn group att request dialout pppoe
    vpdn group att localname @static.sbcglobal.net
    vpdn group att ppp authentication pap
    vpdn username @static.sbcglobal.net password *********
    dhcpd auto_config outside
    threat-detection basic-threat
    threat-detection statistics access-list
    no threat-detection statistics tcp-intercept
    username admin password rcuFiQnIXLd encrypted privilege 15
    class-map inspection_default
    match default-inspection-traffic
    policy-map type inspect dns preset_dns_map
    parameters
      message-length maximum 512
    policy-map global_policy
    class inspection_default
      inspect dns preset_dns_map
      inspect h323 h225
      inspect h323 ras
      inspect rsh
      inspect rtsp
      inspect esmtp
      inspect sqlnet
      inspect skinny 
      inspect sunrpc
      inspect xdmcp
      inspect sip 
      inspect netbios
      inspect tftp
      inspect ftp
    service-policy global_policy global
    prompt hostname context
    Cryptochecksum:ecb5356a2f5e680b
    : end
    I am programing the router with ASDM so if you could tell me what i need to do from the GUI to fix this.

    Dan,
    Looking at the output,
    Status:          Resolving address of domain.com
    Status:          Connecting to ExternalIP:990...
    Status:          Connection established, initializing TLS...
    Status:          Verifying certificate...
    Status:          TLS/SSL connection established, waiting for welcome message...
    This looks like FTPS which is not supported on the ASA. You can workaround it by trying to connect using Active mode from the outside instead of PSV.
    You can find more info here:
    https://supportforums.cisco.com/docs/DOC-23206
    Mike

Maybe you are looking for