Cannot upload file through FTPS

Hello,
I am writing a FTPS Client (Explicit SSL) in java. For testing the same I am using the JScape FTP Server (Free Version). Altough have managed to login to the server, but cannot upload a file. Below is a brief description of the what's happeng in the code.
1. Created a Socket
controlSocket = new Socket(host, port);2. Issued AUTH TLS writer.write("AUTH TLS");3. Created controlSocket using SSLSocketFactory. Trusted all server SSL certificates.
sslSocketFactory = sslContext.getSocketFactory();
socket = sslSocketFactory.createSocket(socket, host, port, true);4. Issued the USER and PASS commands to login (Received success response)
5. Issued TYPE A (Received success response)
6. Issued PBSZ 0 and PROT P (Received success response)
7. Issued PASV (Received success response)
8. Retrieving the 'hostName' and the 'portNumber' from the reply for PASV
9. Created dataSocket
dataSocket = new Socket(hostName, portNumber);10. After the dataSocket creation, I am trying to retrieve the response from server when it is getting hanged.
I don't have a clue why this is happening. Could someone help me with this.
N.B. FileZilla Client however connects to the server and uploads data without any error.
Edited by: saturn_cemk on Nov 13, 2009 1:22 AM

I have also tried this... but it still hangs.
dataSocket = sslSocketFactory.createSocket(remoteHost, remotePort);remoteHost and remotePort are the ones derived from the response for PASV.
Do I need to do AUTH TLS again before creating the dataSocket ?? Am totally lost at this point.

Similar Messages

  • Cannot upload file to FTP

    I'm trying to upload a file via FTP (using Transmit) and keep receiving a message "make sure you have permission to modify". I have read  and write permission. I'm using my macbook and its a file I created. What do I need to adjust on my settings? I also tried using another outside service providing FTP and received a similar message so I'm sure its something with the macbook settings.

    use a reliable FTP client, such as Filezilla (free app) or likewise.
    re-verify

  • Is it possible to upload large files through FTP to server with iWeb?

    Is it possible to upload large files through FTP to server with iWeb like for example with Cyberduck?
    I don't need to publish website with files, I just need to upload files on server. Can it be done somehow with iWeb?

    Here's some info about FTP...
    http://www.iwebformusicians.com/Search-Engine-Optimization/Upload.html
    Make sure you are allowed to store files on your server. Most hosting services don't allow anything to be stored that can't be accessed via the internet. Check the fine print!

  • Problem on upload file via ftp..

    Hi afternnon,
    Can have people tell me.....what is "Can't open data connection" on my upload file via ftp ????how to solve it??
    regards,
    mike

    nbelford wrote:
    I cant find any way to upload the CSR either/ I dont think it exists yet. Can someone please let us know how far away it is. Same applies to the provisioning profile. I cant see any evidence of this yet either.
    I am presuming that without these key pieces of the puzzle one cannot deploy to the iPhone. Can someone from Apple confirm (or correct me)
    I've emailed Apple asking for clarification but I haven't heard back yet. I imagine we'll all learn what's going on at about the same time. And yes, until you get a certificate you cannot upload your apps to the iPhone (within the SDK rules).
    Randy

  • Uploding file through FTP

    Hi
    How can i upload file and download file through FTP server .is any body has some sample code.pls help me
    Thanks!!

    I think there one undocumented sun.net.ftp
    U can try with that pkg...Better yet, don't.
    Why Developers Should Not Write Programs That Call 'sun' Packages
    http://java.sun.com/products/jdk/faq/faq-sun-packages.htmlI recommend the Jakarta Commons Net package...
    http://jakarta.apache.org/commons/net/

  • Cannot Upload File via Send?

    I have an .ai file at around 413 megs that I am trying to send through "Send", but keep getting Error: cannot upload file please try again.  Been having the same issue for a few weeks.  Anyone know file size limits or what might be happening?
    I keep having to use wetransfer.com instead which is FREE.

    Hi danldurall,
    It sounds like Send is timing out--there have been some issues with Send uploading large files, and Adobe is working on that issue. In the meantime, you're welcome to use Adobe SendNow to send your files (log in at https://sendnow.acrobat.com/SignIn.html). You can use the same Adobe ID and password that you use to log in to Send.
    Please let us know how it goes.
    Best,
    Sara

  • Help with uploading files through form

    Hey,
    I have a website for a sign business and I'm trying to make
    it so people can upload custom artwork. I am using an ASP Formmail
    script from I think it's www.brainjar.com. If I understood
    correctly from the directions, I can't upload files through that
    script and I tried it once and it did not work. If anyone has any
    ideas then please help. Thanks
    Jeremy

    For security reasons many shared hosts don't permit file
    uploads.
    Try this in the interim
    http://www.yousendit.com/
    --Nancy
    "dayencom" <[email protected]> wrote in
    message
    news:epo2ql$dsb$[email protected]..
    > I just tried contacting my hosting provider:
    www.ixwebhosting.com and the
    guy
    > was not helpful at all. He said that their hosting does
    not support
    uploading
    > files. So I am drawing a blank now. Is there any way to
    use maybe another
    site
    > to upload?
    >

  • NMH410 as a external hard drive & upload files through web browser

    Hi,
    I had just installed a NMH410 and has some questions as follow:
    Can NMH410 be used as an external HDD without internet?
    Is there anywhere I can upload files through the web browser?

    mosidiot wrote:
    I had just installed a NMH410 and has some questions as follows:
    1. Can NMH410 be used as an external HDD without internet?
    Yes - The NMH is a local network device, and you can store/retrieve files on it using the computers on your home network using either Windows Explorer, or connecting to it in Linux/MacOS as a Samba share.
    However: The NMH requires an Internet connection to dowload firmware updates, and - If my experiences today are anything to go on - You'll need to have up to date Flash support in your web browser to be able to configure and administrate the thing.
    (See the new thread that I'll be posting in this forum shortly.)
    mosidiot wrote:
    2. Is there anywhere I can upload files through the web browser?
    Yes - The NMH does support uploading via a web browser as long as the latter has a recent Flash plugin installed. For small numbers of files, this should work fine...But for larger numbers of files, I'd suggest using either Windows Explorer, or the Media Importer program that came on the enclosed CD-ROM. :-)
    You can find full details and instructions for doing both of the above in the NMH 4xx user guide, which may be downloaded Here. :-)
    Farewell... >:-)
    +++ DieselDragon +++
    Edit: Corrected broken link to user guide.

  • Upload files to ftp host

    Hi There,
    I developer same application, to upload files from harddisk to FTP Host.
    Please, somebody have example actual for Flex SDK 4 ?
    Thanks for support,
    Jorge

    Hi,
    Please go through following links:
    http://ntt.cc/2009/08/23/how-to-upload-files-in-flex-ftp.html
    http://sherifabdou.com/2008/09/flex-4-gumbo-using-filereference-to-upload-download-without -a-server/
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Why cannot upload files to documents folder

    Hi all,
    I have EP7.0 and when i try to upload a file, it show me error:
         "N01_BB_InstallGuide_EN_US.doc" does not exist, or file is empty; you cannot upload empty files.
    Here N01_BB_InstallGuide_EN_US.doc is the file name, i tried several files, always get this error msg.
    Best regards,
    Peter

    Hi,
        I encountered the same problem, the Note helped.
    SAP Note : 898637
    Summary
    Symptom
    The upload of a file into a KM repository fails. Sometimes the user gets the error message "<file> does not exist, or file is empty; you cannot upload empty files."
    Reason and Prerequisites
    Either the portal engine or the operating system on which the portal runs has troubles with writing into the directory that is defined as store for temporary data.
    Solution
    1. With the config tool of the engine, edit/add the following two entries to the server node java parameters:
    Example:
    -Djava.io.tmpdir=e:\EP_TEMP
    -Dcm.tmpdir=e:\EP_TEMP
    These must point to an existing and accessible directory on the server.
    2. TEMP and TMP environment variables of operating system are to be set that they point to an existing and accessible directory.
    In case of Microsoft Windows, go to Settings > Control Panel > System, then choose the tab "Advanced" and the button "Environment Variables". There you can edit/create the two variables.
    Set them to the same directory that were selected for the engine parameters and especially make sure that none of the temp variables has a value with percentage characters ("%") or other placeholders but a particular directory.
    Example: e:\EP_TEMP
    Afterwards, give the user SAPService<SID> write-access rights to the selected temporary folder and restart the Windows machine

  • Problem in uploading file through API

    I want to upload files in to mycontent folder through our
    application.After each steps followed, i get the status message ok
    from the server, but file is not uploaded. Is there any idea about
    this? Please help.

    what do you mean exactly with 'the file is not uploaded'?
    you checked in the content directory and the file isn't
    there?
    if so, could you please post your server side upload
    code?

  • Can anyone help me in sending a file through FTP

    i have written a program to transfer files or directories in zipformat through FTP.i have also installed filezella server to check whether it is working or not.i have connected to filezella server but i am not able to send file.can any one send the code for sending the file.
    i have also tried the jakarta api sendfile ().but in that i don't what is mode means.
    for your reference i am sending the code as far developed.
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipInputStream;
    import org.apache.commons.net.ftp.*;
    import org.apache.commons.net.tftp.*;
    class FTPTransfer
    static public void main(String[]p)
    FTPTransfer ob = new FTPTransfer();
    // ob.Create_Zip_File(new File("outfile.zip"),new File[]{new File("c:\\trialtwo")}, false);
    ob.ftpConnect();
    // connecting to FTP server
    public void ftpConnect()
    boolean error = false;
    FTPClient ftp = null;
    try
    int reply;
    //ftp.connect("ftp.comcast.com");
    ftp = new FTPClient();
    ftp.connect( "localhost",21);
    // ftp.login( username, password );
    System.out.print("reply from FTP Server :"+ftp.getReplyString());
    // After connection attempt, you should check the reply code to verify
    // success.
    reply = ftp.getReplyCode();
    if(!FTPReply.isPositiveCompletion(reply)) {
    ftp.disconnect();
    System.err.println("FTP server refused connection.");
    System.exit(1);
    // ftp.sendFile();
    // transfer files
    // ftp.logout();
    TFTPClient tftp = new TFTPClient();
    System.out.print("before sending");
    tftp.sendFile("c:\\trialtwo\\a-1.txt",1,new FileInputStream("c:\\trialtwo\\a-1.txt"),"localhost",21);
    System.out.print("after sending");
    catch(IOException e)
    error = true;
    e.printStackTrace();
    finally
    if(ftp.isConnected())
    try
    ftp.disconnect();
    catch(IOException ioe)
    // do nothing
    System.exit(error ? 1 : 0);
    //send files
    // filename - The name the remote server should use when creating the file on its file system.
    // mode - The TFTP mode of the transfer (one of the MODE constants).
    // host - The remote host receiving the file.
    //port - The port number of the remote TFTP server.
    private void listContents( File Zip_File, File dir, ZipOutputStream out )
    throws Exception
    String[] files;
    files = dir.list();
    byte[] buf = new byte[1024];
    File[] file = dir.listFiles();
    for (int i = 0; i < file.length; i++) {
    System.out.println("*********** "+file);
    // File f = new File(dir,file[i]);
    try{
    FileInputStream in = new FileInputStream(file[i]);
    out.putNextEntry(new ZipEntry(file[i].getPath()));
    int len;
    while((len = in.read(buf)) > 0) {
    out.write(buf, 0, len);
    in.close();
    catch(Exception e)
    zipEntry(Zip_File, file[i], out);
    } // end listContents()
    void Create_Zip_File(File Zip_File,File[] To_Be_Zipped_Files,boolean Skip_Dirs)
    try
    // Open archive file
    FileOutputStream stream=new FileOutputStream(Zip_File);
    ZipOutputStream out=new ZipOutputStream(stream);
    for (int i=0;i<To_Be_Zipped_Files.length;i++)
    //if (To_Be_Zipped_Files[i]==null
    // || !To_Be_Zipped_Files[i].exists()
    // || (Skip_Dirs ))
    // continue;
    System.out.println("Adding "+To_Be_Zipped_Files[i].getName());
    zipEntry(Zip_File, To_Be_Zipped_Files[i], out);
    out.close();
    stream.close();
    System.out.println("Finished zipping : "+ Zip_File.getAbsolutePath());
    catch (Exception e)
    e.printStackTrace();
    System.out.println("Error: " + e.getMessage());
    return;
    private void zipEntry(File Zip_File, File file, ZipOutputStream out) throws Exception
    if (file.isDirectory())
    listContents(Zip_File, file, out);
    return;

    You'll stand a better chance of getting help if you're more specific about what problems you're encountering. "Can't send file" doesn't say much.
    When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.

  • Cannot upload file suddenly

    Hi
    I built a code to upload file and create directory. It did work yesterday. When I run it today, the file cannot be uploaded.
    <input type="file" name="myimage">
    enctype="multipart/form-data"
    boolean isMultipart = ServletFileUpload.isMultipartContent(request);
    if(isMultipart)
    DiskFileItemFactory factory = new DiskFileItemFactory(); //I added a breakpoint here, Source not found for WebappClassLoader.loadClass(String)               
    factory.setSizeThreshold(500000);               
    factory.setRepository(tempPathFile);
    ServletFileUpload upload = new ServletFileUpload(factory);
    upload.setSizeMax(1000000);     
    List /*FileItem*/ items = upload.parseRequest(request);
    Iterator /*FileItem*/ i = items.iterator();
    Why this happen?

    Ok "cannot be uploaded" is rather unspecific. What happens? Does your browser prevent you from pressing the "Upload"-Button? Are aliens intercepting your data? Do you get an exceptions? An error message? Anything?

  • Cannot upload file to TFTP on Subscriber

    All,
    I have an 8.5 cluster (pub and sub). I'm trying to upgrade the phone firmware for one phone by uploading a file to tftp.
    I can upload the zip file successfully to the pub, but when I try the same thing on the sub in OS Administration, I get 'Waiting for response from <sub IP>'
    in the status bar of the Upload File dialog box, and stays that way, never uploads.
    DB status is good, 2 on both boxes. TFTP service started on both servers.
    The other odd thing is that i can restart services for both servers from the pub, but when i try to restart services on the pub from the sub i get an error message that i cannot connect to the remote node (pub).
    Any thoughts?
    Thanks,

    I am not quite sure if what you are doing is a special requirement but generally for upgrading phone firmware, you need to download the COP file from CCO and use the Install/Upgrade drop down from CUCM, starting with Publisher and then the subscirber.
    Usually the error message states that their is a Tomcat certificate issues between the Pub/Sub. You should be able to go directly to the sub and restart the service. To fix the issue, is the Tomcat cert signed by a 3rd party CA, if yes then it will have to resigned. If its not, the Tomcat certificate will have to be regenerated and Tomcat service restart. This could also happen if you have a user with UserID administrator.
    Please rate useful posts.

  • Sending files through FTP

    task is to take files or folders and ZIP it and send it through FTP.i was able to take the files and folders and zip it ,I was able to connect to FTP server but to send the file what code shoud i use.

    Multipost:
    http://forum.java.sun.com/thread.jspa?threadID=729985

Maybe you are looking for

  • How to get Number of columns in a table?

    Hi all, just starting with database connectivity. I was wondering if there is any method where I can get the no. of cols in table at run time. I tried the ResultSet rs; but rs doesn't seem to have any method that will get the no. of columns. Any poin

  • Trying to export html to dreamweaver but save images as pngs.

    I'm designing a floating site.  My workflow is PS=====>Fireworks====>Dreamweaver.  I made a navbar in FW with a transparent background and exported html to dreamweaver.  I inserted the fireworks htm, put it online and it looks terrible.  You can see

  • Problem in call transaction in interactive ALV

    Hi All I am displaying ALV report. I want to make it interactive. After clicking on REFBN (COBK-REFBN) it should open FB03 transaction. I am using followng code: CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING    i_callback_program                =

  • Client bank data in F110

    Hi, I'm creating a file with F110 - Domiciliary Receipt - using program RFFOES_D ( Spain ). The output is ok with all the data except the client bank data !! this information is maintained in TR: FD03, which has the adress from the client that appear

  • Need to restore iphone 5 but itunes doesn't recognise it

    Hi I tried to update my iphone 5 to the latest iOS7 using iTunes but I got error message 4005. My phone is stuck on the connect to iTunes screen and I understand that I need to restore it to factory settings and can do this using iTunes. But when I p