appleboy / gorush

A push notification server written in Go (Golang).
MIT License
8.03k stars 841 forks source link

About error message from fail push notification in API response. #269

Open tigercallme opened 7 years ago

tigercallme commented 7 years ago

hey, I try run release binary gorush-v1.9.0-darwin-amd64, a problem has occurred:

I set config.yml [sync: true]. request: /api/push
response: {"counts":1,"logs":[],"success":"ok"}

but, server error log :

DEBU[2017/08/12 - 23:29:23] worker number is 8, queue number is 8192 INFO[2017/08/12 - 23:29:25] {"uri":"/api/push","method":"POST","ip":"::1","content_type":"","agent":"python-requests/2.18.3"} DEBU[2017/08/12 - 23:29:25] Start push notification for Android ERRO[2017/08/12 - 23:29:55] FCM server error: Post https://fcm.googleapis.com/fcm/send: dial tcp 172.217.24.10:443: i/o timeout [GIN] 2017/08/12 - 23:29:55 | 200 | 30.002840023s | ::1 | POST /api/push

What surprised me was that error logs from sending fail notifications did not return.

appleboy commented 7 years ago

I will take it.

appleboy commented 7 years ago
FCM server error: Post fcm.googleapis.com/fcm/send: dial tcp 172.217.24.10:443: i/o timeout

The error log message from FCM server, not error log of notification so the field logs of JSON is empty. Please make sure you have set the correct API key.

tigercallme commented 7 years ago

I'm sure API key is right. This error is due to an Internet address (fcm.googleapis.com/fcm/send) that is not accessible. Er... you know, in China access to this URL must pass through the GFW.

appleboy commented 5 years ago

@tigercallme You can't use any service of Google in GFW. You can put your service in Linode or Do.

appleboy commented 5 years ago

@chasei You got same errors?

ERRO[2017/08/12 - 23:29:55] FCM server error: Post https://fcm.googleapis.com/fcm/send: dial tcp 172.217.24.10:443: i/o timeout

anhhoang236 commented 5 years ago

same issue when i deploy to aws lambda, any suggestions?

time="2019/02/13 - 10:11:33" level=debug msg="FCM server send message error: Post https://fcm.googleapis.com/fcm/send: dial tcp 172.217.27.42:443: i/o timeout"