FAQ
0down votefavorite<http://stackoverflow.com/questions/22953528/gcm-connection-error?noredirect=1#>

I am trying out implementing gcm server application using XMPP(CCS) and i
cant able to connect to the google servers. I am trying out the sample code
from http://developer.android.com/google/gcm/ccs.html

when i try to connect

ccsClient.connect(userName, password);

i get the following error

gcm.googleapis.com:5235 Exception: XMPPError connecting to gcm.googleapis.com:5235.; : remote-server-error(502)
   -- caused by: XMPPError connecting to gcm.googleapis.com:5235.: remote-server-error(502) XMPPError connecting to gcm.googleapis.com:5235.
   -- caused by: java.net.ConnectException: Connection timed out: connect
     at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:592)
     at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1010)
     at SmackCcsClient.connect(SmackCcsClient.java:249)
     at Sample.main(Sample.java:342)Nested Exception: XMPPError connecting to gcm.googleapis.com:5235.: remote-server-error(502) XMPPError connecting to gcm.googleapis.com:5235.
   -- caused by: java.net.ConnectException: Connection timed out: connect
     at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:565)
     at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1010)
     at SmackCcsClient.connect(SmackCcsClient.java:249)
     at Sample.main(Sample.java:342)Nested Exception:
java.net.ConnectException: Connection timed out: connect
     at java.net.PlainSocketImpl.socketConnect(Native Method)
     at java.net.PlainSocketImpl.doConnect(Unknown Source)
     at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
     at java.net.PlainSocketImpl.connect(Unknown Source)
     at java.net.SocksSocketImpl.connect(Unknown Source)
     at java.net.Socket.connect(Unknown Source)
     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source)
     at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
     at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:557)
     at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1010)
     at SmackCcsClient.connect(SmackCcsClient.java:249)
     at Sample.main(Sample.java:342)Exception in thread "main" java.lang.NoClassDefFoundError: SmackCcsClient$GcmPacketExtension
     at SmackCcsClient.send(SmackCcsClient.java:130)
     at Sample.main(Sample.java:357)Caused by: java.lang.ClassNotFoundException: SmackCcsClient$GcmPacketExtension
     at java.net.URLClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     ... 2 more

I am using server key for the API key(password) and username="project
number"+"@gcm.googleapis.com"

My project is whitelisted for upstream messaging. Ports considered to be
closed are made open at my workplace. 5228, 5229, and 5230 for my IP. Which
Ip should i use to open up the ports? public Ip or the other one?

What could be the problem? Please help me resolve this! Thanks in advance

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm+unsubscribe@googlegroups.com.
To post to this group, send email to android-gcm@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/2ec9a057-e944-4550-a44b-7e709d01ffa8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupandroid-gcm @
categoriesandroid
postedApr 9, '14 at 6:03a
activeApr 9, '14 at 6:03a
posts1
users1
websitedeveloper.android.com...

1 user in discussion

Reva Badraraju: 1 post

People

Translate

site design / logo © 2019 Grokbase