carlosCharz / fcmxmppserverv2

XMPP Connection Server for FCM using the latest version of the Smack library (4.3.4) + Connection Draining Implementation
47 stars 33 forks source link

java.net.SocketException: Permission denied: connection to (10, [2607:f8b0:4001:c06::bc]:5236,6) denied due to policy #3

Closed Edijae closed 7 years ago

Edijae commented 7 years ago

I am trying to implement FCM xammp server in my google cloud module(endpoint) which i latter deploy it to appengine but am getting the error below when try to call css.connect().

CcsClient ccs = CcsClient.prepareClient(Utils.FCM_ID,Utils.FCM_KEY,false); 
  try {
      ccs.connect();
      JSONObject jsonObject = new JSONObject();
      jsonObject.put("to",clientId);
      jsonObject.put("message_id",345609);
      jsonObject.put("priority","high");
      JSONObject data = new JSONObject();
      data.put("success",false);
      jsonObject.put("data",data);
      ccs.send(jsonObject.toString());
    } catch (XMPPException | SmackException | IOException e) {
      e.printStackTrace();
    }

Error is

The following addresses failed: 'fcm-xmpp.googleapis.com:5236' failed because java.net.SocketException: Permission denied: connection to (10, [2607:f8b0:4001:c06::bc]:5236,6) denied due to policy