SSLHandleShakeEception

133 views
Skip to first unread message

2da...@gmail.com

unread,
Dec 19, 2012, 11:03:04 PM12/19/12
to andro...@googlegroups.com
Hi.
 
My GCM test server works well on my home computer but it doesn't work on my office computer.
Some SSL exceptions occurs when I try to send a message to client.
Is this a firewall problem?
 
 
 
 
Code :
 
                Message message = new Message.Builder()
                .collapseKey(
                        String.valueOf(Math.random() % 100 + 1))
                       
                .delayWhileIdle(true).timeToLive(3)
                .addData("no", "1")
                .addData("title", "Hello")
                .addData("msg", msg).build();
               
                try {                            
                    System.out.println("send! : " + regId);
                    Result result = mSender.send(message, regId, 5);
                    System.out.println("result : " + result.getCanonicalRegistrationId());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } 
 
 
Exception
 
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
 at sun.security.ssl.Alerts.getSSLException(Unknown Source)
 at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
 at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
 at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
 at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
 at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
 at sun.security.ssl.Handshaker.processLoop(Unknown Source)
 at sun.security.ssl.Handshaker.process_record(Unknown Source)
 at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
 at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
 at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
 at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
 at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
 at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
 at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
 at com.google.android.gcm.server.Sender.post(Sender.java:479)
 at com.google.android.gcm.server.Sender.post(Sender.java:458)
 at com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:170)
 at com.google.android.gcm.server.Sender.send(Sender.java:121)
 at com.example.testgcmserver.MainServer.main(MainServer.java:52)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
 at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
 at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
 at sun.security.validator.Validator.validate(Unknown Source)
 at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
 at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
 at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
 ... 17 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
 at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
 at java.security.cert.CertPathBuilder.build(Unknown Source)
 ... 23 more
Reply all
Reply to author
Forward
0 new messages