Git Product home page Git Product logo

Comments (17)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
When you:
Enable SSL logging in java by adding the following to your java VM arguments:

-Djavax.net.debug=all

What SSL errors do you get?

Original comment by [email protected] on 16 Oct 2010 at 9:34

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
[deleted comment]

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
It works fine when we restart the tomcat server.

It appears again after sometime. Any help would be appreciated

Original comment by [email protected] on 19 Oct 2010 at 1:36

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Sounds like you are trying to maintain a socket connection or running into the 
200 message limit that others have commented on. 

Would you verify?

Original comment by [email protected] on 19 Oct 2010 at 4:11

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
I tried sending around 300 push in a loop and they all are successful.

This above piece of code is called by a scheduled job through quartz. 
It works fine for 2-3 hrs. But after that starts giving this exception, 
everything
resolves after we restart the server.




Original comment by [email protected] on 20 Oct 2010 at 11:27

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Sounds like you are trying to maintain a socket connection.

The error is: Remote host closed connection during handshake

which would indicate that connection lapsed or you're not initializing the 
connection properly.

Original comment by [email protected] on 20 Oct 2010 at 5:21

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
I am calling above methods in this order

1. initializeConnection();
2. sentMessage(notificationDetail);
3. stopConnection();

But exception is coming in 2. call when we use sendNotification method of 
PushNotificationManager instance. 

I even tried with not calling 3. stopConnection as mentioned in some threads 
which i found. But that is also of no help. I am receiving same exception. 

I am not able to find any clue at all why this is happening??

Original comment by [email protected] on 21 Oct 2010 at 5:12

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
It appears the getInstance is not syncronized. I'm updating the code to handle 
this.

Basically, when you call calling PushNotificationManager.getInstance you are 
getting a different instance of the singleton.

At the moment you would be better off having a class variable that stores that 
instance, so that you are guarnteed to get the same instance back.

Or you can try the new 163 version I just uploaded and provide feedback.

Original comment by [email protected] on 21 Oct 2010 at 7:10

  • Changed state: Started

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Thanks for that i'll try that and update you on this.......

Original comment by [email protected] on 22 Oct 2010 at 5:14

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
I tried getting instance only once. But same error occurred again after some 
tries.

Original comment by [email protected] on 22 Oct 2010 at 1:25

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
I was receiving the same javax.net.ssl.SSLHandshakeException exception and I 
solve this issue by removing all duplicates of org.json.JSONObject classes from 
my project (refactoring some packages helped ie org.json -> 
org.json.myframework). Javapns and otherframework included same org.json 
package with same class names within them - so that was the problem in my case 
- JAR hell :(

If you use Eclipse try Ctrl+Shift+T <JSONObject> to check for duplications.

Original comment by [email protected] on 28 Nov 2010 at 11:56

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Thanks for replying.

I have checked that also, but there is no duplication of jars for 
org.json.JSONObject classes. There exist only one jar for these classes i.e. 
javapns-jdk1.5-v1.6.2.jar.

Regards

Original comment by [email protected] on 29 Nov 2010 at 5:18

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
hi, I' getting the same error, please help me out

javax.net.ssl.SSLHandshakeException: Remote host closed connection during 
handshake
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:808)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1120)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:623)
        at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
        at java.io.OutputStream.write(OutputStream.java:58)
        at com.apple.ist.retail.pos.tr.protocol.tr.transport.Call.executeCall(Call.java:197)
        at com.apple.ist.retail.pos.tr.protocol.tr.transport.Transport.executeCall(Transport.java:210)
        at com.apple.ist.retail.pos.tr.protocol.tr.TenderRetailServiceImpl.authorizeDebitPurchase(TenderRetailServiceImpl.java:486)
        at com.extendyourstore.domain.manager.tenderauth.tenderretail.TRAuthTechnician.requestAuthorization(TRAuthTechnician.java:943)
        at com.extendyourstore.domain.manager.tenderauth.TenderAuthValet.execute(TenderAuthValet.java:107)
        at com.extendyourstore.domain.manager.tenderauth.tenderretail.TRAuthTechnician.transport(TRAuthTechnician.java:1066)
        at com.extendyourstore.domain.manager.tenderauth.NxsTenderAuthManager.transportValet(NxsTenderAuthManager.java:283)
        at com.extendyourstore.domain.manager.tenderauth.NxsTenderAuthManager.requestAuthorization(NxsTenderAuthManager.java:172)
        at com.extendyourstore.pos.services.tender.authorization.can.AuthorizeChargeSite.arrive(AuthorizeChargeSite.java:587)
        at com.extendyourstore.foundation.tour.engine.Site.arrive(Site.java:177)
        at com.extendyourstore.foundation.tour.engine.Road.traverseForward(Road.java:833)
        at com.extendyourstore.foundation.tour.engine.Road.traverse(Road.java:582)
        at com.extendyourstore.foundation.tour.engine.SiteVertex.driveSite(SiteVertex.java:285)
        at com.extendyourstore.foundation.tour.engine.AbstractSite.driveSite(AbstractSite.java:71)
        at com.extendyourstore.foundation.tour.engine.Site.driveSite(Site.java:153)
        at com.extendyourstore.foundation.tour.service.BusDriver.processLetter(BusDriver.java:315)
        at com.extendyourstore.foundation.tour.service.BusDriver.processLetters(BusDriver.java:213)
        at com.extendyourstore.foundation.tour.service.AbstractCrewMember.run(AbstractCrewMember.java:231)
        at com.extendyourstore.foundation.manager.thread.StaticCacheThread.run(StaticCacheThread.java:148)
Caused by: java.io.EOFException: SSL peer shut down incorrectly

Original comment by [email protected] on 17 Apr 2011 at 3:44

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
My guess is that you are not connecting to the correct host and/or port.

What troubleshooting have you done

Original comment by [email protected] on 17 Apr 2011 at 4:30

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
ceryash, were you able to fix the issue you reported?

Original comment by [email protected] on 9 Sep 2011 at 7:05

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Closing issue as no feedback was received by original poster for many months.  
Please feel free to re-open if the issue is still valid.

Original comment by [email protected] on 14 Sep 2011 at 4:08

  • Changed state: Invalid

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Hi all,
Please help me. I am also getting ssl exception issues when i use enabled ssl 
.p12 certificate. kindly any one suggest me. i am using javaPNS-2.2 version.
I tried already openssl i did not able solve. if there any certificate issues 
or not?
This is our code.. 


    public static void main(String arg[]) {
        try {
             PushNotificationPayload payload = PushNotificationPayload.complex();
             payload.addAlert("Hi doubakor rajesh");
             payload.addBadge(1);
             payload.addSound("default");
             payload.addCustomDictionary("id", 1);
             System.out.println("payload...."+payload.toString());

             String token = "xxxxxxxxxxxxxxxxx";
             System.out.println("length ...."+token.length());
             String keyStorePassword = "xxxxx";
             String keyStoreFilePath = "E:\\APNS\\SSL\\Prudentialssl.p12";



             List<PushedNotification> notifications = javapns.Push.payload(payload, keyStoreFilePath, keyStorePassword, false, token.trim());

             for (PushedNotification NOTIFICATION : notifications) {
                 System.out.println("enter for loop .....");
                    if (NOTIFICATION.isSuccessful()) {
                            /* APPLE ACCEPTED THE NOTIFICATION AND SHOULD DELIVER IT */  
                            System.out.println("PUSH NOTIFICATION SENT SUCCESSFULLY TO: " +
                                                            NOTIFICATION.getDevice().getToken());
                            /* STILL NEED TO QUERY THE FEEDBACK SERVICE REGULARLY */  
                    } 
                    else {
                            String INVALIDTOKEN = NOTIFICATION.getDevice().getToken();
                            /* ADD CODE HERE TO REMOVE INVALIDTOKEN FROM YOUR DATABASE */  
                            System.out.println("INVALIDTOKEN"+INVALIDTOKEN);

                            /* FIND OUT MORE ABOUT WHAT THE PROBLEM WAS */  
                            Exception THEPROBLEM = NOTIFICATION.getException();
                            THEPROBLEM.printStackTrace();

                            /* IF THE PROBLEM WAS AN ERROR-RESPONSE PACKET RETURNED BY APPLE, GET IT */  
                            ResponsePacket THEERRORRESPONSE = NOTIFICATION.getResponse();
                            if (THEERRORRESPONSE != null) {
                                    System.out.println(THEERRORRESPONSE.getMessage());
                            }
                    }
              }

        } catch(Exception e) {
            e.printStackTrace();
        }
    }


Error : 

javax.net.ssl.SSLHandshakeException: Remote host closed connection during 
handshake
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    at sun.security.ssl.AppOutputStream.write(Unknown Source)
    at java.io.OutputStream.write(Unknown Source)
    at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:402)
    at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:350)
    at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:320)
    at javapns.Push.sendPayload(Push.java:177)
    at javapns.Push.payload(Push.java:149)
    at com.test.Push.main(Push.java:28)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.read(Unknown Source)
    ... 11 more


Thanks advanced ...

Original comment by [email protected] on 19 Aug 2015 at 9:40

from javapns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.