TCP/IP problem: closes on client side, not on server side, can't reconnect!

Hey folks. I have a Java servlet that establishes a TCP/IP connection (via the Socket class) to a credit card processing company. Sometimes (usually early in the morning), for some reason the servlet starts timing out when using the socket (read timeouts), and the servlet responds by attempting to close() the socket, then re-open. The reopen doesn't work (no route to host).
The credit card processing company put a sniffer on their end, and they don't see anything when our reads time out or when we subsequently do a close(). Thus, they assume the connection is still established. When we try to open a new connection, our SYN packets do get through to them just fine, but they reply with RST packets because they think the prior connection is still established (thus they reject the new connection attempt)... but for us, that connection had gone dead.
They recommend we send FIN packets to them etc., i.e. that we do a proper TCP/IP close.... but if the connection suddenly goes dead to us, we can't do that... our close() attempts send absolutely nothing to them (no FIN packets, nothing at all).
Any ideas? Our servlet runs in Java 1.2 under BEA Weblogic 4.5.1 on an HP/UX box. I'm thinking that, after a long time (hours) with no data transferred, our socket times out somehow on our end only (the card company appears to have no such idle-timeout policy), and thus our read/write/close attempts send nothing to them (because the socket is now invalid), but of course the subsequent open attempt sends SYN's just fine. A search of the "weblogic.properties" file produces no apparent TCP/IP socket idle-timeout values to increase or eliminate.
Please help if you can... right now, the connection can be down for hours because of this (with many fruitless incidents of our open-attempt SYN's responded to with RST's), and we have to call the credit card processing company to have them reset the port, which allows our next open attempt to work.
Thanks!

Strange... You say:
Thus, they assume the connection is still established. When we try to open a new connection, our SYN packets do get through to them just fine, but they reply with RST packets because they think the prior connection is still established (thus they reject the new connection attempt)... but for us, that connection had gone dead.
According to me, normal TCP behavior shouldn't behave like that.
A connection is identified by the two ends. Each end is a pair of <IP><Port>... This pair is likely to be the same all the time on the server, but will change on the client. The first time you issue a connection to the server, you will have a TCP connection identified by <ClientIp><FreeLocalPort1>-<ServerIp><ServerListeningPort>. The second time you connect, another free local port will be used. The previous cannot be reused - either because still in use, or because of a kind of 'grace' period during which this port number cannot be reused (this is to prevent mis-interpretation of packets that might be delayed on the network - connection is in the state TIME_WAIT).
Therefore, I don't understand why the server replies with RST when your client tries to reconnect.
Unless it has nothing todo with the TCP layer itself... You will see the same RST packet if the server application itself (not the TCP layer) refuses the connection because of some logic that says 'only one connection per client host'. If the server didn't notice your first connection was dead, it is likely to refuse your second attempt. See what I mean?
Remember a TCP connection can be half-closed. This means that if your client closes the connection, the server won't be able to send you anything but can still read what you send. In this case, if the server sits waiting for your data, it will never detect the connection lost... This is why most tcp daemons start a timer when reading incoming data. After a predefined period of inactivity, they decide the connection is dead and will close their side of the pipe - the connection is now fully closed.
Hope it was clear (despites my poor English and the very late hour in the night ;-)
Can point you to more accurate TCP doc if needed.
-Bertrand

Similar Messages

  • I have paid for the Mountain Lion. But for some reason, I cannot seem to download it, despite software being upgraded. Anyone facing this problem where the download does not begin? How can I solve this?

    I have paid for the Mountain Lion. But for some reason, I cannot seem to download it, despite software being upgraded. Anyone facing this problem where the download does not begin? How can I solve this?

    Make sure your Mac qualifies to run Mountain Lion >  Apple - Upgrade your Mac to OS X Mountain Lion.
    Try disabling anti virus software and turn off the Firewall in System Preferencs > Security & Privacy
    Apps such as Little Snitch and Net Nanny can prevent apps from downloading from the App store including Mountain Lion.
    Third party download managers are not compatible with the App Store.
    Keep in mind, for downloading Mountain Lion from the App Store, a high speed (broadband) internet connection is strongly recommended by Apple as noted here > iTUNES STORE - MAC APP STORE - TERMS AND CONDITIONS
    If you need to reinstall OS X or repair the the startup disk using Mountain Lion Recovery, that requires broadband access to the internet via Wi-Fi or an Ethernet connection. OS X is downloaded over the internet form Apple when OS X Recovery is used for reinstallation.

  • Problem in creating client side PDF with image using flex and AlivePD

    I need a favor I am creating client side PDF with image using flex and AlivePDF for a web based application. Images have been generated on that pdf but it is creating problem for large size images as half of the image disappeared from that pdf.I am taking the image inside a canvas . How do i control my images so that they come fit on that pdf file for any image size that i take.
    Thanks in advance
    Atishay

    I am having a similar and more serious problem. It takes a
    long time to execute, but even attaching a small image balloons the
    pdf to 6MB plus. After a few images it gets up to 20MB. These are
    100k jpeg files being attached. The resulting PDF is too large to
    email or process effectively. Does anyone know how to reduce
    size/processing?

  • Problem with socket - Client in C and Server in Java

    Hi,
    I am building a Java based TCP server socket class in Windows machine. The client is written in C running in Linux.
    The client sends data in specified C struct: Eg.
    {noformat}struct person {
        int   age;
        float weight;
        int height;
      } I am having problem reading it in Java Server. I am using DataInputStream to read byte and trying to decode it in age, float etc. the problem is I can read first two but I cannot properly decode the 'height'.
    My question is it possible to directly cast the input stream in corresponding Java object? I guess not but would like to know your ideas.
    Is it a good idea to send the struct instead of string?
    regards,
    rnv

    You are perpetrating mistake #1 here. Don't try to send C structs over the wire. The format is dependent on the hardware, the operating system, the compiler, the compiler version, compiler bugs, the #pragmas, and the compiler options in effect. Too many variables. What you should be doing is writing the primitive types to the network, in network byte order, and reading them inJava with the appropriate methods of DataInputStream.

  • FF4.0 causes my Incredimail client to NOT work. How can I fix this? I luv 4.0 but I can only use one or the other. I need to keep the e-mail client operational, so I reverted back to 3.6.15 for now.

    Ok finally I found a place where I can actually submit a bug report and ask for help. Honestly, this web site is the pitz for user friendliness! Firefox 4.0 is causing my Incredimail client program to NOT work. As soon as I degraded back to 3.6.15 then Incredimail worked just fine again, but will not work if I have installed 4.0. That seems to be the only problem I have found.

    I'm relieved to know that I am not the only one who has experienced this problem. But why is Mozilla/Firefox developers or troubleshooters not posting any comments on this like perhaps . . . "We are aware of this problem and are working on a fix."
    I have not received any communication from them on this forum or on twitter or anywhere else. Anyway I really love FF4.0 and really would like to use both programs together, As it is I have had to go back to 3.6.16 in order to use Incredimail. Firefox/Mozilla, please respond in some form to this request.

  • Permissions Problem Leopard PPC Client to 10.3 Server

    I am having a problem with creating or copying a file to our 10.3 Server w/RAID. I am only having this problem when I am trying to copy or create a folder from a PowerPC computer running Leopard. This works fine when i am on an intel machine or on a PowerPC running Tiger(10.4). I have installed the latest updates on both the server and the clients. I have tested this on two powerpc's and have the same results. When I try to copy or create a file i get a folder with a little "-" in the corner. I then check the file permissions and it says drwx------ it says the owner is the admin and the group is the correct group I have setup to access. I have tried multiple logins and different users on the computers as well.
    In the server tools i have the directory set up to inherit permissions from parent. The parent folder permissions are as follows drwxrwx--- and this is correct. I want the owner and group to have rwx permissions and everyone to have no access.
    Is anyone else having these same issues or is there any workarounds.

    nobody?

  • I am trying to install firefox5. after clicking on RUN, it says to close firefox, but its not open, so i can't continue.

    i aslo tried to uninstall firefox, but got the same message saying i had to close firefox to continue.

    You will need to buy OSx 10.6.8 Snow Leopard Discs to update.
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard

  • The service DS.RFCService could not be found on the client side

    Hi Experts,
    I am facing the following error message when i try to create SAP connection from management Console of DataServices 4.0 SP1
    "The service DS.RFCService could not be found on the client side"
    In Management Console...
    SAP connections->RFC  Server configuration.
    Trying to add RFC Server interface. it says
    The Service DS.RFC Services could not be found on client side.
    can anyone help me out of this issue..plz
    In my System I installed SAPBusinessObjects BI Platform 4.0 instead of Information platform services,BODS 4.0 SP1,IS 4.0 SP1...
    I checked the CMC ->servers->EIM -APS services->properties. i could not find any RFC or admin services running.
    anything is missing? any note explain about this?
    Pls advice
    Thank You In Advance.

    Hi,
    Check this note - KBA 1671522, it holds good for RFC also.
    Arun

  • Client tools not  authenticating via Windows AD after upgrade to SP4

    We recently upgraded our test environment to SP4 to correct a problem we were having with Windows AD authentication from InfoView.  The upgrade to SP4 and JDK 1.5 solved our InfoView problem, but our client tools (Designer, Desk, Crystal Reports) can no longer login to our test environment using Windows AD authentication.
    The error message we get when trying to connect to the SP4 instance using Designer or Deski  is as follows:
    [repo_proxy 13] SessionFacade::openSessionLogon with user info has failed(Internal error.(hr=#0x80042a01)
    Enterprise authentication continues to work as normal.  My first thought was that my client tools are at the SP2 level and they are trying to connect to an SP4 instance.  Therefore, I need to upgrade the client tools to the SP4 level as well in order to get Windows AD authentication to work.  Is this correct, and if so what is the proper way to upgrade the client tools to SP4? 
    On the SAP download site you can download the SP4 Full install, but when you run it says to uninstall the existing version first which I haven't tried yet.  Does the SP4 full install give the option to do a client install versus a server install like previous SP2 install?

    While we always recommend matching versions I have rarely seen a problem with client tools and AD using different versions. I think you may have a different issue.
    If your clients were installed from a deski/designer ONLY install then you can use a client version of SP4 that is much smaller. There should also be a server version that can be installed on top of deski/designer+ client tools (this should not require an uninstall). Finally there is an integrated build which includes the full XIR2 product with SP4 built in(it sounds like you downloaded this).
    If SP4 does not resolve I'd suggest opening a message with support and packet scanning the client with netmon or wireshark.
    What's the error you get with crystal using AD? There was a known issue on SP3 client patch that made all clients fail with AD/LDAP.
    Regards,
    Tim

  • I downloaded FireFox, but can not Run, "Server not found " displayed

    I downloaded Firefox in Safe Mode (can not download in normal mode, it blocked by IE), when I run it , it displays, "Firefox can not find the server at www.mozilla.com"
    I wanted temporarily tun off the firewall to let Firefox in. I
    contacted my Anti-virus company Tech support, they did not give me an answer. Any solution?
    Greatly appreciate your help!
    C.Y.

    Thanks for the reply.
    We are still not able to figure out the reason, but the problem seems to orignate in the way swing handles repaint() events in JDK version 1.3. (Paint coalescing, see link below...)
    http://java.sun.com/j2se/1.3/docs/guide/awt/enhancements.html#coalescing
    Our application has multiple swing controls. Each control requests data from the model in its paint event. If model does not have the data it in turn opens a http socket connection to the server and gets the data.
    Our guess is that the calls which were previously sequential, are going simultaneously after coalescing was introduced in swing. But it does not explain why it works if client is not on server machine.
    Also, the application does not fail in a consistent manner. In most cases data does not come at all, but sometimes some controls do get the data. (If server and client are running on different machines, controls always get the data.)
    We have ruled out the possibility that the weblogic server is modifying the classpath or any environment variable at startup and resetting them at shutdown.
    We started server on two machines, machine1 and machine2 and opened a client in machine1 which accessed server running on machine2. Everything ran perfectly.
    Any help will be appreciated. We are all ready to handover to QA except for this inexplicible bug :(
    milinddev, can i send you a mail..... ? The posting has your email-address.
    Thanks again

  • Unable to connect to SMC Client system from SMC Server System

    hi,
    i have installed SMC 3.6.1. on Solaris 10 OS . The SMC agents are installed are all system but SMC Server is unable to communicate with Client systems. SMC Server System can Ping and Telnet all the SMC Client systems , but unable to connect from SMC .
    Please guide how can resolve this problem
    best regards,
    Adeel Mehmood

    Hi Adeel,
    i have installed SMC 3.6.1. on Solaris 10 OS . The
    SMC agents are installed are all system but SMC
    Server is unable to communicate with Client systems.
    SMC Server System can Ping and Telnet all the SMC
    Client systems , but unable to connect from SMC .
    Please guide how can resolve this problemSo, you can login to SunMC, but you're unable to make an icon for any of your Agents? Or you have icons you made bofre but when you click on them now you get errors?
    If these are new Agents, do they have more than one netowrk interface? If so, they may have security information for the "other" network (the one the SunMC Server's not on). You can try manully specifying the correct network for one Agent and see if it helps:
    http://forums.halcyoninc.com/showthread.php?t=2
    Regards,
    [email protected]
    http://www.HalcyonInc.com
    !! New !! : http://forums.HalcyonInc.com

  • Can someone please help me figure out why I keep getting the "can not reach server" when I try to download the ebook? This is happening with Adobe Digital Editions.

    When I try to download the ebook I bough, the Adobe Digital Reader shows the following message: "can not reach server".  Can someone please help me with this?
    TO be precise, it says "licensee server communication problem"
    Thank you

    The thread running through your explanation has to do with connectivity to your server. (iCloud out of the blue asking for password, unable to message your boyfriend, unable to access e-mail). You said that you boyfriend restart his device and then the two of you were able to then imessage. My best advice for you would be to go to settings to reset to reset network settings. Once this has been done you then will need to enter the name and password of your wifi. ONce this is done you then can attempt to check to see that all passwords are enter correctly.
    Good luck.

  • Hi Can anyone guide me configure LDAP client in solaris 8 server.

    Hi,
    I am already having the solaris 8 LDAP master server. We have new server which i need to confgure as a client to that master server.
    Can any one help me to configure the same.
    Thanks in Advance....
    Bala......

    LDAP Setup and Configuration Guide
    Solaris 8 2/04 Update Collection > LDAP Setup and Configuration Guide > 1. Overview > Solaris Name Services
    [http://docs.sun.com/app/docs/doc/806-5580/6jej518ou?l=en&a=view&q=solaris+8+ldap]
    Download this book in PDF (557 KB)
    [http://dlc.sun.com/pdf/806-5580/806-5580.pdf]

  • Problem with Client Side Validator - e.getFacesMessage is not a function

    (JDeveloper 11g, TP2 and TP3)
    I have created a custom validator that does server side validation as well as client side validation. It gets invoked - an alert is fired to prove that - but when validation fails, instead of the red box and error message that I was hoping for, I get a JavaScript error:
    e.getFacesMessage is not a function (all-11-otn2.js (line 27600))
    The getClientScript() method in the validator looks like this:
        public String getClientScript(FacesContext facesContext,
                                      UIComponent uIComponent) {
            return "function GreaterThanValidator(p1)\n" +
            "{  this.greaterThanItem=p1; \n" +
            "}\n" +
            "GreaterThanValidator.prototype.validate = function(value){" +
                           "alert('value= '+value); " +
            " if (!(value=='X')){ " +
            "    return new ValidatorException('Value must not be X '" +
            "         +' (current value = '+value+')');}"+
        }   Can someone tell me what I am doing wrong here? Like I said, the validation is performed, the alert is shown. Then when I raise the ValidatorException, the error occurs.
    thanks for any suggestions.
    Lucas
    Message was edited by:
    Lucas Jellema
    Message was edited by:
    Lucas Jellema
    Message was edited by:
    Lucas Jellema

    Lucas,
    I assume that this post is related to the previous
    Display client side validation error message with the pretty box
    I forwarded this internally and am waiting for a hint. Will update this post accordingly (or someone else will do directly)
    Frank

  • Changes in server side java file not reflecting in Client side java code?

    Hi friends,
    iam using eclipse IDE, JBoss server, SWING GUI and Oracle DB
    ( looks like : SWINGGUI (Client) <--> EJB's (serverside) <---oracle )
    my problem is , when i make change in server side bean file, that changes are not reflecting in GUI programs.
    (for ex: iam adding settr and getter for a field and using that in GUI program. but its not identifying that setter or getter).
    please tell me what should i do for every change done to server side program, that should reflect / available to GUI?

    my problem is , when i make change in server side bean file, that changes are not reflecting in GUI programs.
    (for ex: iam adding settr and getter for a field and using that in GUI program. but its not identifying that setter or getter).what do you mean it's not "identifying" the methods?
    you have to call those methods you know
    are you getting NoSuchMethodError?
    please tell me what should i do for every change done to server side program, that should reflect / available to GUI?you haven't posted any code or error messages that might help us debug

Maybe you are looking for

  • How to exclude salary arrears from pension deduction?

    I have setup a pension retro element and its calculating the retro amount correctly. However, its using sum of salary arrears (say,arrears for the month of March and April) and adding that to May salary and deducting pension on the total sum. (we do

  • Compiling a Kernel. Benefits / Risks / Tips & Tricks ?

    I plan on compiling my kernel for arch from scratch.  I have backed everything up on my computer and I am going to format the partitions and install a fresh copy of Arch. I intend on following this guide to do it. Doing some Googling and general rese

  • HT4914 I have made a mess of my music library in ITunes, will ITunes Match help?

    I have many songs not labelled correctly or recorded using less than great quality in my Itunes library.  I'm wanting to know if I sign up for ITunes Match, how do I get the enhanced, properly labeled library loaded back into my Itunes once it has be

  • Compaq F730US Memory

    Hi I was just wondering if someone can confirm a memory chip to upgrade to 2GB -   PC2-6400 800MHz 2GB DDR2 SODIMM Dual Inline Laptop Memory Module for Notebooks - 1x 2048MB, 200-pin is what I am looking at for it.  It seems what information I can fi

  • Maunal Cheque updation

    Dear Gurus   When I was updating the  manual check updation  in FCH5 , system gives the error message Lot 0037 is full and does not have a next lot Message no. FS548 Can anyone give me the valuable inputs Regards Sri