Failing to make HTTPS calls intermittently

Hello everyone,
I am intermittently getting issues when connecting to a HTTPS url. I don't think its a certificate issue, as the same code works some time and fails other time.
Exception details.
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:882)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1188)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1215)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1199)
  at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)
  at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
  at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:133)
   ... 35 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
  at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:462)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:863)
   ... 41 more
The similar issue was reported on many other sites, but did not find any good answer behind root cause and about the solution.
Here's what my code does. I tried running this chunk of code in separate threads as well and noticed that some threads did pass successfully, while some failed with above exception in same program execution flow.
Does it anything to have with server URL that I am hitting. When I accessed the URL from browser, I noticed that server certificate is using TLS 1.0
            java.net.URL url = new java.net.URL(URL);
            connection = url.openConnection();
            connection.setDoOutput(true);
            oStream = connection.getOutputStream();
            out = new OutputStreamWriter(oStream);
            out.write("xml=" + data);
            // close to flush and release writer
            out.close();
            out = null;
            iStream = connection.getInputStream();
            isReader = new InputStreamReader(iStream);
            response = new BufferedReader(isReader);
            StringBuffer returnData = new StringBuffer();
            returnData.setLength(0);
            String line = null;
            // readLine() throws an I/O error
            while ((line = response.readLine()) != null) {
                returnData.append(line);
Here are the environment details
OS: Linux
Jdk: build 1.6.0_29-b11 (I also tried with build 1.6.0_37-b06)
Is this a bug in JDK security implementation?
How shall I go about fixing or rather first determining the root cause of issue?
Any help is very much appreciated.

> I am intermittently getting issues when connecting to a HTTPS url.
What does that mean exactly?
Are you connecting to exactly one server over and over again and sometimes it fails?
Or are you connecting to X servers over and over again and sometimes it fails?  And it fails on different servers or the same one?  And you know which one it failed on?
Or are you connecting to many servers which varies over time and some of those fail sometimes or some of them fail ever time (but you don't know which ones are failing so you don't know if it is consistent or not)?
Presuming that of those possible cases that it is a single server which successfully connects sometimes and fails other times then it is probably an environment issue.  Tracking when the failures occur might help.

Similar Messages

  • My facetime starts connecting then fails to make the call ? ive tried the swtiching face time off switching macbook off then switching it back on the logging back in to facetime but still no joys. any help ?

    my facetime starts connecting then fails to make the call ? ive tried the swtiching face time off switching macbook off then switching it back on the logging back in to facetime but still no joys. any help ?

    my facetime starts connecting then fails to make the call ? ive tried the swtiching face time off switching macbook off then switching it back on the logging back in to facetime but still no joys. any help ?

  • How to make HTTP call to encoded URL?

    Hi expert,
    I need to make an HTTP call to this url submitted by
    <form action='http://www.ncbi.nlm.nih.gov/BLAST/Blast.cgi' enctype="application/x-www-form-urlencoded" method="POST" NAME="FormatForm" TARGET="Blast_Results_for_25530"><script src="../../../blastcgi.js"></script>
    if i use the action url in the form tag, it does not work. it looks like it is encoded by the enctype=.... is it possible to connect to this url? thanks.

    Do the first POST to Blast.cgi, with URL encoded parameters.
    Get the Refresh header from the response.
    Split the Refresh header into wait_time and next_url (find the ; and take two substrings)
    currentThread.wait(wait_time * 1000);
    next_url.openConnection().connect();
    Either you'll get your response, or you'll be told to wait longer (I don't know the details of Blast.cgi, you might need to loop).

  • Cannot make http call during JCO thread

    The software makes a call as follows:
    1. EJB via JCO calls a remote enabled function on an R3 server.
    2. The function calls a class with some information that is posted as XML using if_http_client.
    3. A rest service on another server recieves this as an HTTP post.
    The same software is called from an SAP GUI process which calls the same class method that makes the http call.
    Errors only occur when the http call attempt is made during the RFC process through the JCO call from java.
    No error occurs when called during a users activity in an SAP GUI screen.
    Also, this error does not occur on our dev or test systems. The error only occurs in production.
    ERROR DETAILS:
    during http_client->send we get an http_communication_failure.
    Tracing shows that the actual error is: HTTPIO_PLG_ICM_CONNECT_FAILED which is deep in the code during the actual system call by the sap software.
    We have traced through logs, and checked all kinds of settings. Our test system is a photocopy of our production system, including user settings.
    Any Ideas?

    There doesn't seem to be anything in your question that relates to the usage of Web Dynpro ABAP.  Perhaps you would find a better response in another forum that more closely matches the technologies you are dealing with.

  • Hot to Make HTTPS GET and POST calls from ExtendScript

    We are currently porting our ActionScript code to ExtendScript (JavaScript).
    We performed HTTPS GET and POST calls from ActionScript with no problem. I can find no way to make HTTPS calls from ExtendScript. We tried jQuery, but after hours of work we can't get the ExtendScript engine to work with it - even a very, very old version of jQuery.
    What do I do?
    TIA,
    mlavie

    Adobe needs a "Want Answers" button like Quora has because I would press that button on this post.

  • An HNAP call to the device failed because the HTTP connection was broken - EA3500

     OK - thanks in advance for your help -
    I have a linksys Linksys WMP300 and am able to connect to the EA3500 (shows connected at 270 Mbps) Excellent Connecttion but I can't access the internet or any of the other computers on my network.  The stupid thing is that I can connect to my neighbor's unsecured network which is also a linksys router.
    All of the other computers on the network connected just fine - my son has a laptop running windows Vista, we have a family computer using Vista, my wife's laptop is Windows 7 (we just had a guest that connected just fine).
    Here's the error code I get - any help would be appreciated!
    Error code: 82BD0304
    Error description: An HNAP call to the device failed because the HTTP connection was broken.
    Model name: unknown
    Model number: EA3500
    Serial number: 12C10603215584
    Firmware version: unknown
    Operating system: Windows XP SP 3
    Software version: 1.4.12005.2
    Connection type (WAN): unknown
    IP address (LAN): unknown
    IP address (WAN): unknown
    Computer IP address: 192.168.1.36

    Thank you for the reply - 
    Router is assigning IP address automatically. Although I have been using a static IP address in the past, this is no longer the case.
    The WMP300 is on an Windows XP, SP3 PC.
    Since running into this issue, I have not only disabled all security (to make sure that firewalls and/or virus software was causing problems) I completely uninstalled my McAfee. I have disabled Windows Firewall also. "Flying Naked" as it were.
    I am surprised that Cisco has no solution - others are also having this problem.
    It MUST be the router - I am able to connect to my neighbor's router, able to connect to my old Linksys WRT150N. Anyone else have thoughts?
    This is frustrating.

  • My iphone 5 won't make a call when i fail to connect to the internet via 3g

    My iphone 5 won't call when i fail to connect to the internet via 3g.
    At work i dont have wifi i have 3g, if i launch say the sky go app,or the iplayer, sometimes they work and everything is fine...sometimes they wont load as 3g for whatever reason cant get a connection at that particular time........ if i then try and make a call the call will fail. I've experimented 25 + times and this is definately the cause.
    (note: when the 3g connection does work, the phone has absolutely no problem calling people)
    Anyone had this problem?
    Even better has anyone got a solution?
    Thanks,
    Nick.

    Are you sure that the carrier's signal is strong where you are having this problem? Certain building structures and locations have poor cellular signal strength and this often results in the "No Service" indication. Are other users able to get service in the same locations where you have problems?

  • Can you make an SSL (https) call from a Java Stored Procedure?

    I have loaded a bunch of java classes. Ultimately, one of my routines makes an
    https call to another machine (https://machine:443/foo?xml...). I am receiving
    the following error message:
    SSL implementation not available
    I read
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_
    id=NOT&p_id=103051.1
    Which states
    3.17.6 You can not do SSL callouts from within 8i to other CORBA or EJBs. This
    also means that you can not callback with an SSL connection a CORBA object
    running in an 8i client.
    Does this mean that I can't do what I am trying to do from within 8.1.7?
    If there is any way to do this, I would really appreciate the advice. I need
    to call this Java API from a pl/sql routine, and it has to be via SSL. I would
    prefer to load all the Java into the database and avoid an exproc call.

    Anton/Joe,
    Yes, you can do this, but it might not be straightforward based on the version of Oracle you have. I've noticed there's a higher chance of getting this to work with 8.1.7 or higher (otherwise, you may need to load more classes, etc.). Mark Piermarini posted a nice example in a previous thread in this group:
    http://osi.oracle.com/~mbpierma/SSL_Java_DB.html
    Basically, he connected to UPS to get package tracking info.
    Hope this helps,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle_debug.htm
    Debug PL/SQL and Java in the Oracle Database

  • Why does it say face time failed on my iPad every time I try to make a call???

    Why does it say "face time failed" every time I try to make a call?

    I have had that happen to me a number of times. Try this. Quit the mail app and then relaunch it. From your home screen, double tap the home button. Hold down on the mail app icon in the recents tray until it wiggles. Tap the minus sign to close it. Tap the home button. Launch mail again.

  • SLD data supplier - HTTP call failed

    Hi All,
    I am receiving the following error when navigating to 'Server -> Services -> SLD Data Supplier' within the Visual Administrator
    SLD_Collector_Task
    HTTP call failed: Failed to send HTTP data: 401 : Unauthorized. Please check if the target SLD system is available and the SLD bridge is started there
    The target SLD is started. How do I check if the SLD bridge is started?
    Does anyone has any advice on this error? Thanks.

    Hi Lee,
    You can check this using t-code RZ70
    Also read the post installation guide for how to configure sld bridge where your sld is running.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/500519bb-75bd-2a10-c9b7-878798ae52bc
    Regards
    Ashok
    Edited by: Ashok Dalai on Sep 25, 2008 8:09 AM

  • Hi! I brought an iPhone 4 off my friend at work. The day I brought it, it was working fine but now I can't seem to send any messages or make phone calls. The network is showing up fine but each time I try to make a call it says "call failed" help any1?

    Hi! I brought an iPhone 4 off my friend at work. The day I brought it, it was working fine but now I can't seem to send any messages or make phone calls. The network is showing up fine but each time I try to make a call it says "call failed" I can't seem to send any messages either? I can use the Internet fine and everything else on the phone. Can anyone help?

    Hi chelsinator,
    You can reset the phone and it won't cause any problems or cause you to lose any data - Hold down the Home and Power buttons at the same time and continue to hold them down until the Silver Apple appears.
    The other thing you should do is to reset your network settings: Settings>General>Reset>Reset Network Settings. You will have to set up your Wifi again, but that oftentimes clears things up.
    Cheers,
    GB

  • I reset my iPhone but when trying to make a call, the LTE changes to 3G and then just to bell, then I get an error re: call failed

    I reset my iPhone 5 and the LTE Network showed but when I tried to make a call, it switched to 3G then just to bell and the call will not go thru. Can't receive calls either

    Hi Turtlesquirt,
    Welcome to the Support Communities!  The article below will help you troubleshoot the issue you are having with making and receiving calls on your iPhone:
    iPhone: Troubleshooting issues making or receiving calls
    http://support.apple.com/kb/TS3406
    I hope this information helps ....
    - Judy

  • Hi can anyone help me im using my iphone to make a call to a number that has been changed two days ago but it automatically says 'called failed' why? please help!

    hi can anyone help me im using my iphone to make a call to a number that has been changed two days ago but it automatically says 'called failed' why? please help!

    Here's a nifty agorithm to fill an array of primes, using a forever loop with a labeled continue statement, from Horton's Beginining Java:public class MorePrimes
      public static void main(String[] args)
        long[] primes = new long[20];    // Array to store primes
        primes[0] = 2;                   // Seed the first prime
        primes[1] = 3;                   // and the second
        int count = 2;                   // Count of primes found - up to now,
                                         // which is also the array index
        long number = 5;                 // Next integer to be tested
        outer:
        for( ; count < primes.length; number += 2)
          // The maximum divisor we need to try is square root of number
          long limit = (long)Math.ceil(Math.sqrt((double)number));
          // Divide by all the primes we have up to limit
          for(int i = 1; i < count && primes[i] <= limit; i++)
            if(number%primes[i] == 0)             // Is it an exact divisor?
              continue outer;              // yes, try the next number
          primes[count++] = number;               // We got one!
        for(int i=0; i < primes.length; i++)
          System.out.println(primes); // Output all the primes

  • Attendant Console "failed to make a new call" error.

    I have a problem with the error message "Failed to make a new call" in multiple instances with Attendant Console. The first time this error comes up is if the first hunt group member does not answer the call and it goes to the next member. It only displays on the first member console. If I change the hunt group order, it still comes up on whomever is first on the list. This message also comes up whenever any Console user makes an invalid call which is expected but irritating to the users.
    Can I disable these error messages completely? It is highly annoying since these error messages can stack up and have to be cleared by pressing "OK" before the user can click on the screen again.
    TAC has not resolved the first error yet but everything works fine.

    Hi Luigi,
    Thanks for the update. Even i had opened a TAC. In my case, we have configured Hunt Pilot, from where the call is routed to the members in the hunt group. But TAC says that the Attendant console never uses HUNT PILOT to take calls. So it has to be PILOT POINT which has to be configured for Attendant console to take calls.
    We had configured in this fashion, because the AC stops working often. Even though it shows, 'activated in the control center. Manually the service has to be restarted on all the nodes. And all the callers will get busy tone when they try reaching the reception.
    As an action plan, we need to revert to PILOT POINT configuration and do the testing again. So If found that the pop-up is not coming anymore, then TAC will work on fixing the AC service failing issue.
    Hope this helps and will keep you posted on the updates.
    Regards,
    Karthikeyan.

  • Not able to make outgoing calls in iphone4. Regularly i face this problem, at the same time i receive incoming call, can do net surfing, can access email and sms, only outgoing calls get failed every time. please answer to solve this problem

    not able to make outgoing calls in iphone4. Regularly i face this problem, at the same time i receive incoming call, can do net surfing, can access email and sms, only outgoing calls get failed every time. please answer to solve this problem

    Good day Sidharth Namrta,
    It sounds like you are unable to make any calls, but you can recieve them, and everything else seems to work fine. I recommend you use the troubleshooting in the following article to help you get that resolved, named:
    iPhone: Troubleshooting issues making or receiving calls
    Follow the steps below to resolve this issue. Please test after each step.
    Toggle airplane mode: Tap Settings > Enable Airplane Mode, wait five seconds, then turn off airplane mode.
    Check your phone settings:
    Check your Do Not Disturb settings: Tap Settings > Do Not Disturb.
    Check for any blocked phone numbers: Tap Settings > Phone > Blocked.
    See if Call Forwarding is turned on: Tap Settings > Phone > Call Forwarding.
    Ensure that your software is up to date:
    Check for a carrier settings update.
    Check for an iOS software update. 
    Note: Some updates may require a Wi-Fi connection.
    If the iPhone has a SIM card, reseat the SIM card.
    If the iPhone 4 or iPhone 4s is on the Verizon network, dial *228 from the iPhone and select option 2 to update the Preferred Roaming List (PRL). The PRL determines the cellular towers the phone uses for cellular service, selecting those with the best signal strength.
    Reset the network settings: Tap  Settings > General > Reset > Reset Network Settings.
    Try to make or receive calls in another location.
    Attempt to isolate to one network band:
    If you're having the issue on LTE, disable LTE, if possible, and try again.
    If you're having the issue on 3G/4G, disable 3G/4G, if possible, and try again.
    Contact the carrier to check the following:
    Your account is properly configured to use the specific iPhone that has the issue.
    There are no localized service outages.
    Your account doesn't have a billing-related block.
    Your calls don't have errors on the carrier system.
    Restore the phone as new.
    If the above steps don't resolve the issue, go to an Apple Retail Store, carrier, Apple Authorized Reseller, or contact AppleCare to send the phone in for service.
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

Maybe you are looking for

  • How come I can no longer scroll down via my laptop mouse-pad with Firefox 4.0?

    You know how you can use the mouse-pad on a laptop to scroll down on a web-page? I used to be able to do that in in the one before 4.0, but no longer can...anyone else have this problem?

  • Changing of production order quantity not allowed

    Dear Gurus My client is converting production order from planned order .These  planned orders have been generated from sales orders during mrp run. What my; client wants is that the production order quantity generated from the planned orders nobody c

  • Can't import JSF taglibs?

    can't import JSF taglibs? I'm newbie in JSF tryig to write simple example from as result server error org.apache.jasper.JasperException: An exception occurred processing JSP page /main.jsp at line 4 1: <?xml version="1.0" encoding="UTF-8"?> 2: <%@tag

  • Change pointers for PDS

    Hi Gurus, I am not able to transfer the changes to BOMs in ECC. I am using the transaction CURTO_CREATE_BOM. This transaction is not picking up the changes in BOM. Are there any SAP Standard change pointers that I need to activate to enable change tr

  • Loading a program onto my eMac

    Hi, I am hoping some one can help.............. I am trying to load a Living Book program onto my eMac so the kids don't have to load it into the disk drive everytime time they use it but I can't seem to get it to work..... I had them all loaded onto