您的位置:首页 > 其它

push推送相关注意事项

2017-04-01 11:20 686 查看
1.curl的问题

配置https的证书http://blog.csdn.net/weixin_35884835/article/details/52588157

2.ios push 针对http1.0的,需要服务器开通2195这个端口

3.nodejs报下面的错误 是证书过期了

2017-02-15 08:07:03 16621>>>>>>> Socket undefined error occurred:Error: socket hang up
2017-02-15 08:07:03 16621<<<<<<< TypeError: Cannot read property 'length' of undefined


4.抓包

tcpdump tcp port 443 -i any -Xs 1024 -nn
tcpdump tcp port 80 -i any -As 0 -nn
netstat -nap  判断哪个端口被调用


5.华为的push是要像华为申请一个access_token的 然后更改证书的的时候需要同步删除之前保存的access_token

{"message":"No permission to send message to these tmIDs.","requestID":"14900642050202330435","resultcode":20203}


出现这个错误是device token错误的原因导致的

可能是调试期间 access_token没有随着证书的变化而变化

6.忽略https的证书 加上 -k这个参数,下面这个报错就是需要证书验证,可以忽略

[root@localhost ~]# curl https://ip/index.php curl: (60) Peer's Certificate has expired.
More details here: http://curl.haxx.se/docs/sslcerts.html 
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.


curl命令忽略

curl https://ip -k


yii2 处理忽略https证书

$response = $curl->reset()->setOption(
CURLOPT_POSTFIELDS,
http_build_query($data_array)
)->setOption(CURLOPT_SSL_VERIFYPEER, false)->post($url);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  socket 服务器