接收FCM错误:java.net.UnknownHostException:fcm.googleapis.com

时间:2019-03-26 07:00:06

标签: java android firebase-cloud-messaging android-push-notification

在服务器级别的最后一周,我们已将GCM端点(https://android.googleapis.com/gcm/send)更改为FCM端点(https://fcm.googleapis.com/fcm/send)URL,但未更改Google论坛建议的任何代码逻辑。     对于某些请求,我们能够从服务器级别成功将Android PUSH通知发送到设备令牌。     但是有时它会给我们以下提到的错误:

2019-03-29 10:41:48 ERROR Error:428 - fcm.googleapis.com
java.net.UnknownHostException: fcm.googleapis.com
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
        at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
        at com.google.android.gcm.server.Sender.post(Sender.java:740)
        at com.google.android.gcm.server.Sender.post(Sender.java:717)
        at com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:410)

I have checked with proxy , dns team. There is no blocking .
Why this issue is coming . Please suggest.

0 个答案:

没有答案