Pyapns Fault 500: "Connection to the APNS server is not possible.

I am trying to get a django application to send push notifications to an iOS device running this service’s iOS application. I am trying to use pyapns to send notifications. But I can not connect it to the Apple notification server.

The service is mostly running, this is the last thing I want to get before I exit the beta. You can visit http://pagemove.se/ to read about the application.

Here is the log:

Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 75, in wrapper return func(*a, **kw) File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 67, in wrapper return func(*a, **kw) File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 97, in notify return _xmlrpc_thread(*f_args) File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 127, in _xmlrpc_thread errback(e) File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 65, in errback_wrapper errback(e) # not an instance of UnknownAppID - nothing we can do here File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 55, in errback raise e xmlrpclib.Fault:

Has anyone had this problem? Could this be with a .pem file? or setting up an ubuntu server? Can I forget to open some ports in the router?

Edit

I checked the test if the ports for apns are open. I did

telnet gateway.sandbox.push.apple.com 2195

and received

Trying 17.149.34.65...
Connected to gateway.sandbox.push-apple.com.akadns.net.
Escape character is '^]'.

, .

+3
5

- , , .pem, , .

.pem:

http://blog.serverdensity.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/

, , Keychain - , , , , Keychain - , openssl rsa ... , , .

, .pem, , .

.pem - - ( , ):

https://gist.github.com/58f79e1cd811f62bf011

, :)

+5

pyapns... ... ... (https://github.com/djacobs/PyAPNs). !

+2

, , , . -, .pem , . , , .pem .

, 2 '.pem' (Cert Key), , . http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12. ( .pem - ).

2 , , 2 .pem. , APNS.

$ telnet gateway.sandbox.push.apple.com 2195

, .pem - , . , - , . , .

$ openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert PushChatCert.pem -key PushChatKey.pem

, .pem, . .pem.

$ openssl rsa -in haspassword.pem -out nopassword.pem

. , !

+1

, - "." app_id

+1

I had this error too, and in my case, it was because I skipped the python-epoll library as indicated in the documentation .

I think it is also useful to check twistd.log in your current directory

0
source

All Articles