django-push-notifications
django-push-notifications copied to clipboard
error: [Errno 110] Connection timed out
I am getting below error stack for iOS push notification. android application is working fine.
Django version: 1.9.12 django-push-notifications: 1.2.1
Traceback (most recent call last):
File "/home/ubuntu/rest_api/venv/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/ubuntu/rest_api/venv/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
return self.run(*args, **kwargs)
File "/home/ubuntu/rest_api/api/tasks.py", line 112, in inform_group_update_to_group_members
devices.send_message(message, extra={"user_id": devices.user_id})
File "/home/ubuntu/rest_api/venv/local/lib/python2.7/site-packages/push_notifications/models.py", line 94, in send_message
return apns_send_message(registration_id=self.registration_id, alert=message, **kwargs)
File "/home/ubuntu/rest_api/venv/local/lib/python2.7/site-packages/push_notifications/apns.py", line 206, in apns_send_message
_apns_send(registration_id, alert, **kwargs)
File "/home/ubuntu/rest_api/venv/local/lib/python2.7/site-packages/push_notifications/apns.py", line 150, in _apns_send
with closing(_apns_create_socket_to_push()) as socket:
File "/home/ubuntu/rest_api/venv/local/lib/python2.7/site-packages/push_notifications/apns.py", line 55, in _apns_create_socket_to_push
return _apns_create_socket((SETTINGS["APNS_HOST"], SETTINGS["APNS_PORT"]))
File "/home/ubuntu/rest_api/venv/local/lib/python2.7/site-packages/push_notifications/apns.py", line 49, in _apns_create_socket
sock.connect(address_tuple)
File "/usr/lib/python2.7/ssl.py", line 433, in connect
self._real_connect(addr, False)
File "/usr/lib/python2.7/ssl.py", line 420, in _real_connect
socket.connect(self, addr)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
error: [Errno 110] Connection timed out
Can confirm, happens on my dev server too. Works on production though.
You should check if TCP port 2195 is opened or not.
Did you ever solve this?