FTP Socket trouble - need help

I'm not going to pretend that I knew enough about this before I began. My code came from this link:
<url>http://forum.java.sun.com/thread.jsp?forum=31&thread=54731</url>
Anyway, I understand it know, but I can't seem to get through some of my errors. The biggest problem is that if I don't timeout then the program just hangs. For instance, I do a controlOut and have the timeout set at 2000 ms. After 2000 ms the code moves on to the next step, but it throws a Read Timed Out error. If I have the timeout set at 15000 ms then the code waits 15000 ms and then does the same thing. If I set the timeout to 0 (persistant) the code never moves beyond that controlOut statement.
I'm really confused...please help! Thank you!

Hi Auzlin, i had the same problem, the anwer is, the ftp programs change the ftp port for everyone of the files sended, after you receive (or send) each file, that is cause even if you close the connection, is not fully closed,it goes TIME_WAIT or something but the port is still open, thats the reason you cant receive another one, it needs a little while to close and this cant be controled by the program (or just i dont know how) so, the solution (or one of them) its to use a PASV command after each file, and force the server to change port, you can read that port, and send/receive another file using that port =) hope it helps, if not i cant put some code.
-JF-
Sorry for the english =)

Similar Messages

  • Sound trouble need help urgent please

    Could somebody tell me how i can fix my problem.
    problem: when my curve 8520 is in silence profile en i start typing in a phnoe number i hear nothing,
    but when my phone is in normal profile i hear i beep with every number of the phone number i enter.
    so i want to know how i can stop my bb from making this noise

    My friend it is a fillable form, can i email you the pdf that iam trying to fill out? then would you be able to tell me how to do it please mate?
    I have attached the form, i need to fill in those boxes so that everything is accuratly height + spacing is correct, and to do it fast, thats all im after.
    Date: Sun, 27 Jun 2010 18:31:58 -0600
    From: [email protected]
    To: [email protected]
    Subject: Need Help Urgent Please
    If is a fillable form, just tab to the next field. What we do not understand from you is IF it is a fillable form or not. If it is not, then the 3 options I gave can be used. Placing text is always a problem. You might find it useful to turn on the grid to help in placing your typewriter fields. However, if it is fillable you do not have to create any fields to type in, you just leave the tool as the hand tool and select the predefined fields with the cursor or the tab key and type accordingly. If the field is a checkbox, then you just use the space key to activate it.
    So, are we talking about a fillable form or something that has the appearance of a form, but not fields to fill in. This is what Bernd has been try to find out and you keep suggesting it is fillable as we read what you have said.
    >

  • Getting javax.mail.AuthenticationFailedException: EOF on socket. Need Help

    I am trying to get hotmail emails and store in Oracle 10g database.
    When I am executing receivemail procedure from Oracle 10g database. I am getting following error.
    connect to ESIMSCO_UTIL_OWNER
    SQL> set serveroutput on
    SQL>
    SQL> Declare
    2 v_error_msg varchar2(10000);
    3 Begin
    4 v_error_msg:=receivemail('pop3.live.com', '<My email address>@hotmail.com', '<My email password>');
    5 dbms_output.put_line(v_error_msg);
    6 End;
    7 /
    javax.mail.AuthenticationFailedException: EOF on socket
    PL/SQL procedure successfully completed.
    SQL>
    I did following steps, but still I am getting this error. Can somebady help me to solve this problem.
    connect sys/<password>@esimsco as sysdba
    connect to sys
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 30 16:02:04 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> begin
    1 dbms_java.grant_permission( 'ESIMSCO_UTIL_OWNER', 'SYS:java.util.PropertyPermission', '*', 'read,write' );
    2 commit;
    3 end;
    4 /
    PL/SQL procedure successfully completed.
    SQL> begin
    2 dbms_java.grant_permission(
    3 grantee => 'ESIMSCO_UTIL_OWNER',
    4 permission_type => 'SYS:java.net.SocketPermission',
    5 permission_name => '*',
    6 permission_action => 'connect,resolve'
    7 );
    8 end;
    9 /
    PL/SQL procedure successfully completed.
    SQL> begin
    2 dbms_java.grant_permission(
    3 grantee => 'ESIMSCO_UTIL_OWNER',
    4 permission_type => 'SYS:java.util.PropertyPermission',
    5 permission_name => '*',
    6 permission_action => 'read,write'
    7 );
    8 end;
    9 /
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    SQL>
    Then I connect ESIMSCO_UTIL_OWNER.
    connect to ESIMSCO_UTIL_OWNER
    Create 2 tables.
    create table attachment(
    at_file varchar2(500),
    at_mimetype varchar2(500),
    at_attachment blob
    create table email (
    em_incident integer,
    em_from varchar2(1000),
    em_subject varchar2(1000),
    em_body nclob
    Then Create java source named receivemail.
    create or replace and compile java source named receivemail as
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import sqlj.runtime.*;
    import oracle.sql.BLOB;
    public class ReceiveMail
    static void getAttachments(Message message, int incidentNo)
    throws MessagingException, IOException, SQLException {
    //String attachments = "";
    Object content = message.getContent();
    if (content instanceof Multipart)
    // -- Multi part message which may contain attachment
    Multipart multipart = (Multipart)message.getContent();
    // -- Loop through all parts of the message
    for (int i=0, n=multipart.getCount(); i<n; i++) {
    Part part = multipart.getBodyPart(i);
    String disposition = part.getDisposition();
    if ((disposition != null) &&(disposition.equals(Part.ATTACHMENT) || disposition.equals(Part.INLINE))) {
    //-- This part is a file attachment
    String fileName = incidentNo+"_"+part.getFileName().replace(' ','_');
    System.out.println("FILE: " + fileName);
    String contentType = part.getContentType();
    String mimeType = contentType.substring(0,contentType.indexOf(";"));
    System.out.println("FILETYPE: " + mimeType);
    InputStream is = part.getInputStream();
    // -- To work with a BLOB column you have to insert a record
    // -- with an emptly BLOB first.
    #sql { insert into attachment(at_file, at_mimetype, at_attachment)
    values (:fileName, :mimeType, empty_blob()) };
    // -- Retrieve the BLOB
    BLOB attachment = null;
    #sql { select at_attachment into :attachment
    from attachment where at_file = :fileName };
    // -- Fill the BLOB
    OutputStream os = attachment.getBinaryOutputStream();
    int j;
    while ((j = is.read()) != -1) {
    os.write(j);
    is.close();
    os.close();
    // -- Set the BLOB by updating the record
    #sql { update attachment set at_attachment = :attachment
    where at_file = :fileName };
    static String getPlainTextBody(Message message)
    throws MessagingException, IOException
    Object content = message.getContent();
    if (message.isMimeType("text/plain")) {
    // -- Message has plain text body only
    System.out.println("SIMPLE TEXT");
    return (String) content;
    } else if (message.isMimeType("multipart/*")) {
    // -- Message is multipart. Loop through the message parts to retrieve
    // -- the body.
    Multipart mp = (Multipart) message.getContent();
    int numParts = mp.getCount();
    System.out.println("MULTIPART: "+numParts);
    for (int i = 0; i < numParts; ++i) {
    System.out.println("PART: "+mp.getBodyPart(i).getContentType());
    if (mp.getBodyPart(i).isMimeType("text/plain")) {
    // -- Return the plain text body
    return (String) mp.getBodyPart(i).getContent();
    } else if (mp.getBodyPart(i).isMimeType("multipart/*")) {
    // -- Body is also multipart (both plain text and html).
    // -- Loop through the body parts to retrieve plain text part.
    MimeMultipart mmp = (MimeMultipart) mp.getBodyPart(i).getContent();
    int numBodyParts = mmp.getCount();
    System.out.println("MULTIBODYPART: "+numBodyParts);
    for (int j = 0; j < numBodyParts; ++j) {
    System.out.println("BODYPART: "+mmp.getBodyPart(j).getContentType());
    if (mmp.getBodyPart(j).isMimeType("text/plain")) {
    // -- Return the plain text body
    return (String) mmp.getBodyPart(j).getContent();
    return "";
    } else {
    System.out.println("UNKNOWN: "+message.getContentType());
    return "";
    static void saveMessage(Message message)
    throws MessagingException, IOException, SQLException
    //String body = "";
    int incidentNo;
    // -- Get a new incident number
    #sql { select seq_incident.nextval into :incidentNo from dual };
    // -- Get the header information
    String from = ((InternetAddress)message.getFrom()[0]).getAddress();
    System.out.println("FROM: "+ from);
    String subject = message.getSubject();
    System.out.println("SUBJECT: "+subject);
    // -- Retrieve the plain text body
    String body = getPlainTextBody(message);
    // -- Store the message in the email table
    #sql { insert into email (em_incident, em_from, em_subject, em_body)
    values (:incidentNo, :from, :subject, :body) };
    // -- Retrieve the attachments
    getAttachments(message, incidentNo);
    #sql { commit };
    // -- Mark message for deletion
    // message.setFlag(Flags.Flag.DELETED, true);
    public static String Receive(String POP3Server, String usr, String pwd)
    Store store = null;
    Folder folder = null;
    try
    // -- Get hold of the default session --
    Properties props = System.getProperties();
    props.put("mail.pop3.connectiontimeout", "60000");
    Session session = Session.getDefaultInstance(props, null);
    // -- Get hold of a POP3 message store, and connect to it --
    store = session.getStore("pop3");
    store.connect(POP3Server,995, usr, pwd);
    System.out.println("Connected");
    // -- Try to get hold of the default folder --
    folder = store.getDefaultFolder();
    if (folder == null) throw new Exception("No default folder");
    // -- ...and its INBOX --
    folder = folder.getFolder("INBOX");
    if (folder == null) throw new Exception("No POP3 INBOX");
    // -- Open the folder for read_write (to be able to delete message) --
    folder.open(Folder.READ_WRITE);
    // -- Get the message wrappers and process them --
    Message[] msgs = folder.getMessages();
    for (int msgNum = 0; msgNum < msgs.length; msgNum++){
    saveMessage(msgs[msgNum]);
    System.out.println("No more messages");
    return ("SUCCESS");
    catch (Exception ex){
    ex.printStackTrace();
    return ex.toString();
    finally{
    // -- Close down nicely --
    try{
    // close(true), to expunge deleted messages
    if (folder!=null) folder.close(true);
    if (store!=null) store.close();
    catch (Exception ex){
    //ex.printStackTrace();
    return ex.toString();
    Then create function receivemail.
    create or replace function receivemail(pop3_server in string,
    pop3_usr in string,
    pop3_pwd in string)
    return varchar2
    is language java name
    'ReceiveMail.Receive(java.lang.String,
    java.lang.String,
    java.lang.String) return String';
    And then trying to execute function receivemail, but I am getting following error.
    SQL> set serveroutput on
    SQL>
    SQL> Declare
    2 v_error_msg varchar2(10000);
    3 Begin
    4 v_error_msg:=receivemail('pop3.live.com', '<Hotmail email address>@hotmail.com', 'Hotmail password');
    5 dbms_output.put_line(v_error_msg);
    6 End;
    7 /
    javax.mail.AuthenticationFailedException: EOF on socket
    PL/SQL procedure successfully completed.
    SQL>
    I am requesting, please help me to solve this problem.
    I will be very thankful for your kind help and support.
    Amol......
    Edited by: Amol Karyakarte on 31-May-2012 7:27 AM

    Hello,
    I don't think this is the right forum, as this question seems to have nothing to do with the Oracle Forms tool.
    You'd better ask it in the database forum.
    Francois

  • IDSC3 Print Booklet Troubles (need help with Teus's rotatepages.js script)

    Hi all,
    I've been reading the original Nov '05 thread on this (http://www.adobeforums.com/webx/.3bbd4bb6/17) but I'm having trouble with the script provided.
    Very briefly, I'm trying to make a 16-page catalog on letter-sized paper, using half-size 8.5x5.5 pages in landscape format. I did a considerate amount of work on the layout thinking I wouldn't have any problems later on, but when I had a look at the Preview in the Print Booklet setting I completely freaked out -- the Preview builds with the bottom half of each landscaped half-page to the right side of the page!
    Based on what I've read so far, the script provided in the earlier thread should be the answer to my headache. But when I run it as directed, I get this Javascript error:
    Error number: 21
    Error string: Undefined is not an object
    Line: 42
    Source: pdfpage.parent.rotate(90, Anchorpoint.topLeftAnchor)
    This is my first time dabbling with scripts, so this error message dumbfounds me.
    Help!
    Edo Mor

    It should work, I think, if you make a folder inside the scripts folder called "Version 4.0 Scripts" (without the quotes) and put it in that.
    Peter

  • Help, hidden user account trouble need help

    i tried to create a hidden user account using the tuturial on : http://www.macosxhints.com/article.php?story=20080127172157404&query=hidden%2Bus er%2Baccount
    when i did it i restarted my computer and at login the account i created appeared i went on it then switched to my regular account and when i switched my regular account settings where messed up, first off the colour of everything on the screen was lighter than it should be and fast user switching which i had enabled was now disabled and when i enable it it doesnt work and if i close system prefs then re open it shows fast user switching off, i logged off so i could switch to the new one and when i logged on as the new one the colors where fine but i had caouple other problems, in this account fast user switching was enabled and so i switched to my original account where the problems from before still existed. i tried deleting the account by terminal typing: sudo dscl . delete /users/hidden
    hidden is what i named the new account by the way. now o restarted the computer and when the login screen came up it no longer showed the new account (named hidden) so i logged onto my original account but upon logging on the problems are back.
    someone please help. i dont want to but if i have to i will restore my mac but i need someone to tell me how and how to back up everything
    if you dont want to go to the link this is the terminal code i originally typed to create the user account
    sudo dscl . create /Users/$USERNAME
    sudo dscl . create /Users/$USERNAME PrimaryGroupID 0
    sudo dscl . create /Users/$USERNAME UniqueID 0
    sudo dscl . create /Users/$USERNAME UserShell /bin/bash
    sudo dscl . passwd /Users/$USERNAME $PASSWORD
    sudo dscl . append /Groups/admin GroupMembership $USERNAME
    --i replaced '$username' with hidden (the username i chode)
    and i replaced '$password' with the password i chose
    please through in any idea you have i am desperit!

    also i downloaded the thing on that page that says "i wrote a small script to automate the process, which you can get here" (here is a link)
    the download did nothing
    (that i know of)
    again any help would be greatly appricated

  • 20gb Photo Trouble Need help badly

    So my 20gb photo was working fine then all of a sudden it gave me thesad ipod. Then i tried everything possible to fix it and it didnt work. Then all of a sudden it kept asking for it to be plugged into a wall charger. So i plugged it in to one and it would then go the chargeing bar and freeze. is there ne way to fix this without having to basically buy a new ipod. PLZ HELP!!!.

    This is going to sound stupid, but: drop it. Yes, I mean physically drop it, preferably on a carpeted surface from maybe around waist height.
    My 30GB iPod Photo froze with a sad face while ago, and searching these very forums I found the "drop it" technique. I figured there wasn't much to lose, but it worked - who'd a thunk it?
    Don't worry, you shouldn't cause any damage if you do it gently onto some thick carpet. The shock seems to wake the things right up. Let me know how it goes!

  • In trouble - need help: FCPX will not open - prompts CRASH report

    Tonight, 7:15pm MTN, I closed FCPX upon a short range (single connected clip) wasn't rendering.  It played perfectly, and I simply wanted to get rid of the red line above the project timeline over the clip, but nothing I did to render that section or the entire piece would remove the red/orange line above the clip, so I closed FCPX and re-booted my 12-core.  Once it rebooted, I was unable to launch FCPX - either by clicking the icon on the dock or by selecting the project in the FCPX library.
    Prior to the issue, I did the most recent software update which was for Safari 7.1
    The only other detail is that the project I was working on had to be updated which went relatively OK except I had to re-kink media.
    What is going on?  Is anyone else suddenly unable to launch FCPX?
    I am on 10.1.3 / running OSX 10.9.5.  I'm at work, so I'm on the 12-core (2 x 2.66 GHz 6-core Intel Xeon, 32GB 1333 MHz DDR3, ATI Radeon 5770, 250GB SSD, and a hardware RAID controller which addresses a 42TB SAS RAID (media drive).
    Help, please help.  -Stephen

    Tom - Thanks very much - that was shocking.  I searched this forum for recent issues wondering if the Safari update had anything to do with this - I haven't experienced anything like this in months - and when I read all the 10.1.3 worries and posts, I was surprised - I had no issues updating to 10.1.3.
    I saw Russ' post on holding down option/Command and tried it (just as you have advised) and it worked although it opened a single project I didn't recognize and then I closed it and opened my recent project and it's off to compressor now.
    I am very thankful to you and to this forum for your help!  I was going to say "you cannot imagine the pressure I'm under..." but that's BS - you of all people are probably extremely familiar with deadlines and workloads.  Steve Martin (MacBreak Studio) described us once as people who sit alone in a dark corner editing for endless hours, and his partner Mark Spencer laughed and said, "you've just described my life" and of course I was laughing too - he also described mine.
    Anyway, I'm trying to say that your quick reply is like seeing land after days of floating in the ocean!  Thank you for your constant presence and support Tom.

  • Converting videos for ipod trouble need help plz

    i always have to convert my videos for ipod but when i do, there is no more sound. how do i fix this?

    Julia,
    You need to format the iPod for Windows use.
    Download the iPod Updater, install this to your computer, restart the computer, run the Updater, then connect your iPod when prompted, then follow the set up procedure.

  • Secure FTP using FTPS (SSL/TLS) - need help!

    I am trying to use an FTP Sender Channel using Secure FTP.  I am currently getting a "java.net.ConnectException: Connection timed out: connect" error.
    I am on XI 3.0 with SP13. 
    Settings are FTPS (FTP Using SSL/TLS for Control and Data)
    Command Order Auth TLS, USER, PASS, PBSZ, PROT.
    I am able to connect from my pc using WSFTP Pro which looks to be using the same command order.  I made sure WSFTP Pro was set for passive connections as XI only supports this until SP15.
    I have asked our Basis support to make sure the proper ports are open that are used for the connection and file transfer.  They have deployed the Java Cryptographic Toolkit on XID, and changed the startup mode for SSL runtime from 'manual' to 'always'.  The site I will connect to uses a certificate from Equifax which was added to the TrustedCAs keystore view.  After still not being able to get a file, I also added the certificate of the site, which I was able to export from WSFTP Pro and import onto XI with STRUST.
    I have increased the J2EE trace for com.sap.aii.adapter.file to Debug, but I haven't been able to get much out of the log.  I see entries, such as some SSL activity and the timeout, but nothing that points me to an answer.  Of course, I really don't know what to look for.
    I have tried to connect to the remote server by name or ip with the same connection timeout. 
    I currently don't have it set to use X.509 certificate for Client Auth, but I did try a few of those options with no luck.
    Any pointers would be appreciated.
    Thanks,
    Eric Peterson

    Eric,
    Did you ever solve the problem ? I am having the same issue.
    Cheers
    Jon

  • Ipod wifi trouble need help asap

    Hi my ipod is have wifi flaucurating and I don't know how to get these resolved I have try resetting my settings but that didn't help at all. I have wpa/wpa2 on my wifi im also running the latest ios on my ipod please help me asap

    What does, "wifi flaucurating", mean?
    Does the iPod work on other netwprks?
    Did it previously work OK on your network? is this new?
    Have you tried restarting or resetting your iPod?
    Have you tried restarting your router? (remove power for 30 seconds and restart)
    Have you looked at: http://support.apple.com/kb/TS1398

  • Program Monitor in trouble NEED HELP ASAP PLEASE!

    I'm using Adobe Premiere Pro CS6 on a Macbook Pro. Recently I've been working on a project that has an insane amount of files in it (approx. 9,000). In the Program Monitor I've been getting these strange black and white bars. Below is the screenshot. Can anyone help me? This is really scaring me.

    The only suggestion I can come up with is to make sure your graphics card drivers are up to date.

  • Processor Trouble Need Help!

    Can anyone one please help me with this problem! I have a G4 processor: 450 MHz PowerPC G4 -
    Running MacOSX ver. 10.2.8 on the main HD and Tiger on a Lacie external HD.
    Lately when starting up my computer I get a "whirling/humming" sound coming from my processor???? Can anyone please tell me what the problem is and if there's a easy fix or solution... or is something major about to happen?
    I got it to stop the first time by shutting down and restarting the computer (after about 3-4 tries) but it seems to be a reoccuring problem now.....what's up????? please advise thank you, john

    Quote from: BOSSKILLER on 10-August-07, 14:16:42
    have you connected power cable for the CPU?
    Just to make sure that we are all taking about the same thing.
    What BK is pointing to is the 4 pin / 8 pin power molex from the PSU?

  • Ipod in all kind of trouble need help bad

    ok. i have a 20gb ipod (clickwheel) that is really messed up. Every time i use it something is wrong with it. Now when i try to turn it on, it gives me the folder w/ exclamtion point, but when i plug it into my computer, it is sort of read by it. The noise acknowledging the ipod comes on but when i go to my computer, there is no ipod. When i try to run itunes it freezes and i have to unplu the ipod. i cant eject it. i cant update it. i cant put songs on it. anyone have anything i can do?
    Thanks

    never mind guys. i did the trick where u bang it against something kind of hard and it worked. really. im putting songs on it as we speak. this blows my mind.....

  • IPod Trouble NEED HELP!

    Ok so my IPod is 4th Generation a 16 GB ... I was wondering if I can get it fixed or replaced with a one year warranty but since they don't make the 4G anymore can I get a 5g with the back iSight camera since my 4g had a back camera? I reall want to know.

    Apple doesn't repair it.  If there is no sign of abuse, they replace it with an identical refurbished unit.  If the warranty has expired, the fixed-price for non-warranty replacements can be found here.

  • Trouble need help?

    when I Hotsync my palm lllxe, my MEMO'S are noy transferring to my pc?
    Post relates to: Palm IIIxe

    Hello and welcome to the Palm Forums.
    Check to make sure the memos are set to "synchronize" in the conduit settings. Click on the hot sync icon on the bottom right of your computer screen (right near where the time is displayed) and click on settings. It may take a few seconds for the list to be displayed, but after verifying that your name is listed on the top, check that memos is set to synchronize. If it is set to anything else, change it to "synchronize."

Maybe you are looking for

  • Ntoskrnl.exe System %100 disk usage with windows 8.1. all the time!.

    hello i am also having the %100 disk usage problem and am starting a thread to upload my etl. file and see if i can get a solution. thnx. i should also mention i have tried every suggestion i have read on the internet even ones that worked for other

  • BT Infinity Installation- a sorry tale of obfuscat...

    Nov 25th   Infinity 1 + phone ordered Dec 9th     Installation date  0800=1300  Monday Dec 9th     10:00 call from engineer at the cabinet ,be with you in 20 min                 10:20 call - a problem , have not got the key to the cabinet !          

  • Saving information in pdf created in Adobe forms

    I am certain there is a simple solution to this issue but I cannot find the answer. I have created some template forms in FormCentral that I use in a therapy clinic. Once I have created the forms I save them as a pdf. I then enter the information rel

  • Java.lang.NullPointerException when deploying a PIA

    I am having a problem deploying a PIA on PeopleTools 8.45.18 on Solaris 8 using WebLogic 8.1 sp 3. The error I experience is java.lang.NullPointerException when I run this command: ./setup.solaris -console -is:log /var/temp/piainstall.log InstallShie

  • View in subquery too slow

    Hi! On Oracle 11.2 SELECT a.* FROM APPLES a LEFT OUTER JOIN PROPERTIES p on a.id=p.apple_id WHERE a.type = '1' AND 0< (SELECT count(*) FROM view_1 v WHERE v.foo=123 AND v.color = p.color)This is 3 or more times slower (0.20 versus 0.60 seconds in one