title: GCM ANDROID not able to send Notification/message to android device
body: <p>I am trying to get gcm notification in my android mobile.my device gets registered and also i can unregistered it ,in browser it shows device registered but when i click send message to device it gives me 500 error, i am running it on Apache the error is following</p>
  
  <pre><code>     java.net.ConnectException: Connection timed out: connect
   java.net.PlainSocketImpl.socketConnect(Native Method)
   java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
   java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
   java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
   java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
   java.net.Socket.connect(Socket.java:519)
   com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:550)
   com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
   sun.net.NetworkClient.doConnect(NetworkClient.java:163)
   sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
   sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
   sun.net.www.protocol.https.HttpsClient.&lt;init&gt;(HttpsClient.java:271)
   sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:328)
          sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
  sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:778)
  sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
  sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:881)
  sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
  com.google.android.gcm.server.Sender.post(Sender.java:479)
  com.google.android.gcm.server.Sender.post(Sender.java:458)
  com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:170)
  com.google.android.gcm.server.Sender.send(Sender.java:121)
  com.google.android.gcm.demo.server.SendAllMessagesServlet.doPost(SendAllMessagesServlet.java:82)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  </code></pre>
  
  <p>Please help me out..
  Thanks in advance.</p>