Hi devs,
Recently I’ve deployed mattermost services stack. Previously I had troubles with iOS device token and some other stuff. But all that is resolved now. The only problem that I am facing right now is that push-proxy service is not sending notifications successfully.
Services versions:
mattermost-server: 5.15
mattermost-webapp: 5.15
mattermost-mobile: 1.21
mattermost-push-proxy: 5.9.0
Below are the logs for push-proxy service:
Oct 04 13:25:45 ip-172-31-13-5 bash[1428]: 2019/10/04 13:25:45 INFO Loading /home/ubuntu/mattermost-push-proxy/config/mattermost-push-proxy.json
Oct 04 13:25:45 ip-172-31-13-5 bash[1428]: 2019/10/04 13:25:45 INFO Push proxy server is initializing...
Oct 04 13:25:45 ip-172-31-13-5 bash[1428]: 2019/10/04 13:25:45 INFO Initializing apple notification server for type=apple
Oct 04 13:25:45 ip-172-31-13-5 bash[1428]: 2019/10/04 13:25:45 INFO Initializing apple notification server for type=apple_rn
Oct 04 13:25:45 ip-172-31-13-5 bash[1428]: 2019/10/04 13:25:45 INFO Initializing Android notification server for type=android
Oct 04 13:25:45 ip-172-31-13-5 bash[1428]: 2019/10/04 13:25:45 INFO Initializing Android notification server for type=android_rn
Oct 04 13:25:45 ip-172-31-13-5 bash[1428]: 2019/10/04 13:25:45 INFO Server is listening on :8066
Oct 04 13:26:04 ip-172-31-13-5 bash[1428]: 2019/10/04 13:26:04 INFO Sending apple push notification for device=apple_rn and type=message
Oct 04 13:27:11 ip-172-31-13-5 bash[1428]: 2019/10/04 13:27:11 ERROR Failed to send apple push sid=8kij64tz47nidf64w5r1are4th did=071ac56dcaf43e52f8b72bd8afdfbe902a4b194d3755cf4dc77c6b7ac70d3e7d err=Post https://api.push.apple.com/3/device/071ac56dcaf43e52f8b72bd8afdfbe902a4b194d3755cf4dc77c6b7ac70d3e7d: net/http: request canceled (Client.Timeout exceeded while awaiting headers) type=apple_rn
Oct 04 13:40:51 ip-172-31-13-5 bash[1428]: 2019/10/04 13:40:51 INFO Sending apple push notification for device=apple_rn and type=message
Oct 04 13:41:59 ip-172-31-13-5 bash[1428]: 2019/10/04 13:41:59 ERROR Failed to send apple push sid=8kij64tz47nidf64w5r1are4th did=071ac56dcaf43e52f8b72bd8afdfbe902a4b194d3755cf4dc77c6b7ac70d3e7d err=Post https://api.push.apple.com/3/device/071ac56dcaf43e52f8b72bd8afdfbe902a4b194d3755cf4dc77c6b7ac70d3e7d: net/http: request canceled (Client.Timeout exceeded while awaiting headers) type=apple_rn
Oct 04 13:42:09 ip-172-31-13-5 bash[1428]: 2019/10/04 13:42:09 INFO Sending apple push notification for device=apple_rn and type=message
Oct 04 13:43:14 ip-172-31-13-5 bash[1428]: 2019/10/04 13:43:14 ERROR Failed to send apple push sid=8kij64tz47nidf64w5r1are4th did=071ac56dcaf43e52f8b72bd8afdfbe902a4b194d3755cf4dc77c6b7ac70d3e7d err=Post https://api.push.apple.com/3/device/071ac56dcaf43e52f8b72bd8afdfbe902a4b194d3755cf4dc77c6b7ac70d3e7d: net/http: request canceled (Client.Timeout exceeded while awaiting headers) type=apple_rn
I’ve hosted the server and the push-proxy server on same cloud machine. I’ve added the /push
endpoint in nginx to forward the requests to push-proxy service. Android notifications are working perfectly.
This is my configuration file.
{
"ListenAddress":":8066",
"ThrottlePerSec":300,
"ThrottleMemoryStoreSize":50000,
"ThrottleVaryByHeader":"X-Forwarded-For",
"EnableMetrics": false,
"ApplePushSettings":[
{
"Type":"apple",
"ApplePushUseDevelopment":false,
"ApplePushCertPrivate":"./config/aps_production_priv.pem",
"ApplePushCertPassword":"pass",
"ApplePushTopic":"com.COMPANY.mattermost"
},
{
"Type":"apple_rn",
"ApplePushUseDevelopment":false,
"ApplePushCertPrivate":"./config/aps_development_priv.pem",
"ApplePushCertPassword":"pass",
"ApplePushTopic":"com.COMPANY.mattermost"
}
],
"AndroidPushSettings":[
{
"Type":"android",
"AndroidApiKey":"AAAA1iLDJ0c:APA91bFPaBBFvhHvf2DltR0yFnSLScxGYnDJyTlhciSeuHw9JdWF2aci7lI_LnesjwUDUK5LJXYACWMjaBeBDLEinCjr1QMVEvtd-vsFanGZyASRuePsekLebSktPd0pUKNibkD8OvGM"
},
{
"Type":"android_rn",
"AndroidApiKey":"AAAA1iLDJ0c:APA91bFPaBBFvhHvf2DltR0yFnSLScxGYnDJyTlhciSeuHw9JdWF2aci7lI_LnesjwUDUK5LJXYACWMjaBeBDLEinCjr1QMVEvtd-vsFanGZyASRuePsekLebSktPd0pUKNibkD8OvGM"
}
]
}
Please help me.