BelledonneCommunications / flexisip

Linphone.org mirror for flexisip (git://git.linphone.org/flexisip.git)
http://flexisip.org
GNU Affero General Public License v3.0
146 stars 70 forks source link

push notification failure #4

Closed mako16 closed 7 years ago

mako16 commented 7 years ago

hi we are trying push notification and we get the following error: ./flexisip_pusher --pntype apple --appid /etc/flexisip/apn/com.metro.metroPhone.pem.dev --pntok DBD55AB5B2BD7EDC600D5073C7B94ADEABBD31901A475B2588F6FDEA89E3BC98 --debug

iam running as root in a centos7

Error while writing logs in : /var/opt/belledonne-communications/log/flexisip/FlexisipLogs_pusher.log 2017-08-31 10:41:16:818 flexisip-debug-Searching push notification client on dir [/etc/flexisip/apn] 2017-08-31 10:41:16:818 flexisip-debug-Certificate /etc/flexisip/apn/com.metro.metroPhone.dev.pem has a valid expiration: Aug 30 17:40:07 2018 GMT. 2017-08-31 10:41:16:818 flexisip-error-Private key does not match the certificate public key for /etc/flexisip/apn/com.metro.metroPhone.dev.pem: 0 2017-08-31 10:41:16:818 flexisip-debug-Push notification payload is {"aps":{"alert":{"loc-key":"IM_MSG","loc-args":["Pusher"]},"sound":"msg.caf","badge":1},"call-id":"","pn_ttl":2592000} 2017-08-31 10:41:16:818 flexisip-error-No push notification client available for push notification request : 0x1d89d88 Segmentation fault

in /etc/flexisip/apn/ i have file com.metro.metroPhone.dev.pem

Please can you advise??

ghost commented 7 years ago

Hello,

Did you generate your pem file with private key as described ? If not, you should.

fedesenmartin commented 7 years ago

Hi (I will continue (mako16 issue) The push cert is now generated ok and no problem. But the voip cert is generating trouble ( I generate exactly as the push cert). And I dont know why we cant reach apple sandbox server btw is ok to have the voip cert there right?

This is the log:

/flexisip_pusher --pntype apple --appid com.xxxxx.xxxx.dev --pntok XXXXXXXX --debug Error while writing logs in : /var/opt/belledonne-communications/log/flexisip/FlexisipLogs_pusher.log 2017-08-31 16:56:30:431 flexisip-debug-Searching push notification client on dir [/etc/flexisip/apn] 2017-08-31 16:56:30:432 flexisip-debug-Certificate /etc/flexisip/apn/com.xxx.xxx.dev.pem has a valid expiration: Aug 31 17:16:29 2018 GMT. 2017-08-31 16:56:30:432 flexisip-debug-Adding ios push notification client [com.xxx.xxx.dev] 2017-08-31 16:56:30:433 flexisip-debug-Certificate /etc/flexisip/apn/com.xxx.xxx.voip.prod.pem has a valid expiration: Aug 30 17:29:03 2018 GMT. 2017-08-31 16:56:30:433 flexisip-error-Private key does not match the certificate public key for /etc/flexisip/apn/com.xxx.xxx.voip.prod.pem: 0 2017-08-31 16:56:30:434 flexisip-debug-Certificate /etc/flexisip/apn/com.xxx.xxx.voip.dev.pem has a valid expiration: Aug 31 17:42:19 2018 GMT. 2017-08-31 16:56:30:434 flexisip-debug-Adding ios push notification client [com.xxx.xxx.voip.dev] 2017-08-31 16:56:30:434 flexisip-debug-Push notification payload is {"aps":{"alert":{"loc-key":"IM_MSG","loc-args":["Pusher"]},"sound":"msg.caf","badge":1},"call-id":"","pn_ttl":2592000} 2017-08-31 16:56:30:434 flexisip-debug-PushNotificationClient com.xxx.xxx.dev.pem PNR 0xf64aa8 running, queue_size=0 2017-08-31 16:56:30:434 flexisip-debug-PushNotificationClient com.xxx.xxx.dev.pem next, queue_size=1 2017-08-31 16:56:45:469 flexisip-error-Error attempting to connect to gateway.sandbox.push.apple.com:2195: -1 - Connection timed out 140619760014928:error:0200206E:system library:connect:Connection timed out:bss_conn.c:269:host=gateway.sandbox.push.apple.com:2195 140619760014928:error:20073067:BIO routines:CONN_STATE:connect error:bss_conn.c:273: 2017-08-31 16:56:45:469 flexisip-warning-PushNotificationClient com.xxx.xxx.dev.pem PNR 0xf64aa8 failed: Cannot create connection to server 1 push notification(s) sent, 0 successfully and 1 failed.

Regards

ghost commented 7 years ago

From the logs it seems it's a connection issue, do you have network issues ?

mako16 commented 7 years ago

yes it was a network issue we manage to make it work. Thanks.

ghost commented 7 years ago

Great ! I'll close then

Regards

secDaC commented 5 years ago

Hello,

if I type this command: ./flexisip_pusher --pntype apple --appid /etc/flexisip/apn/com.metro.metroPhone.pem.dev --pntok DBD55AB5B2BD7EDC600D5073C7B94ADEABBD31901A475B2588F6FDEA89E3BC98 --debug with my appid and pntok in the terminal on the server, I get an error notice "Command not found".

I have also running CentOS 7 with flexisip.

Do you have any idea what's the reason?

Regards amd thanks for the answer in advanced