{"action":"opened","issue":{"url":"https://api.github.com/repos/zulip/zulip/issues/9760","repository_url":"https://api.github.com/repos/zulip/zulip","labels_url":"https://api.github.com/repos/zulip/zulip/issues/9760/labels{/name}","comments_url":"https://api.github.com/repos/zulip/zulip/issues/9760/comments","events_url":"https://api.github.com/repos/zulip/zulip/issues/9760/events","html_url":"https://github.com/zulip/zulip/issues/9760","id":332999002,"node_id":"MDU6SXNzdWUzMzI5OTkwMDI=","number":9760,"title":"Add networking retries for forwarding via the push notification bouncer service","user":{"login":"timabbott","id":2746074,"node_id":"MDQ6VXNlcjI3NDYwNzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2746074?v=4","gravatar_id":"","url":"https://api.github.com/users/timabbott","html_url":"https://github.com/timabbott","followers_url":"https://api.github.com/users/timabbott/followers","following_url":"https://api.github.com/users/timabbott/following{/other_user}","gists_url":"https://api.github.com/users/timabbott/gists{/gist_id}","starred_url":"https://api.github.com/users/timabbott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timabbott/subscriptions","organizations_url":"https://api.github.com/users/timabbott/orgs","repos_url":"https://api.github.com/users/timabbott/repos","events_url":"https://api.github.com/users/timabbott/events{/privacy}","received_events_url":"https://api.github.com/users/timabbott/received_events","type":"User","site_admin":false},"labels":[{"id":780101529,"node_id":"MDU6TGFiZWw3ODAxMDE1Mjk=","url":"https://api.github.com/repos/zulip/zulip/labels/area:%20mobile","name":"area: mobile","color":"bfd4f2","default":false},{"id":461204071,"node_id":"MDU6TGFiZWw0NjEyMDQwNzE=","url":"https://api.github.com/repos/zulip/zulip/labels/area:%20production","name":"area: production","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-16T16:35:07Z","updated_at":"2018-06-16T16:35:07Z","closed_at":null,"author_association":"MEMBER","body":"We should be able to do a couple retries for this sort of networking error, which should clear if one just tries again in most cases.  \r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/urllib3/connection.py\", line 141, in _new_conn\r\n    (self.host, self.port), self.timeout, **extra_kw)\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/urllib3/util/connection.py\", line 60, in create_connection\r\n    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):\r\n  File \"/usr/lib/python3.4/socket.py\", line 533, in getaddrinfo\r\n    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):\r\nsocket.gaierror: [Errno -2] Name or service not known\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/urllib3/connectionpool.py\", line 601, in urlopen\r\n    chunked=chunked)\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/urllib3/connectionpool.py\", line 346, in _make_request\r\n    self._validate_conn(conn)\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/urllib3/connectionpool.py\", line 850, in _validate_conn\r\n    conn.connect()\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/urllib3/connection.py\", line 284, in connect\r\n    conn = self._new_conn()\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/urllib3/connection.py\", line 150, in _new_conn\r\n    self, \"Failed to establish a new connection: %s\" % e)\r\nurllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f8f246bbdd8>: Failed to establish a new connection: [Errno -2] Name or service not known\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/requests/adapters.py\", line 440, in send\r\n    timeout=timeout\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/urllib3/connectionpool.py\", line 639, in urlopen\r\n    _stacktrace=sys.exc_info()[2])\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/urllib3/util/retry.py\", line 388, in increment\r\n    raise MaxRetryError(_pool, url, error or ResponseError(cause))\r\nurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='push.zulipchat.com', port=443): Max retries exceeded with url: /api/v1/remotes/push/register (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8f246bbdd8>: Failed to establish a new connection: [Errno -2] Name or service not known',))\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/django/core/handlers/base.py\", line 185, in _get_response\r\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/django/views/decorators/csrf.py\", line 58, in wrapped_view\r\n    return view_func(*args, **kwargs)\r\n  File \"./zerver/lib/rest.py\", line 131, in rest_dispatch\r\n    return target_function(request, **kwargs)\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/django/views/decorators/csrf.py\", line 58, in wrapped_view\r\n    return view_func(*args, **kwargs)\r\n  File \"./zerver/decorator.py\", line 597, in _wrapped_func_arguments\r\n    raise err\r\n  File \"./zerver/decorator.py\", line 590, in _wrapped_func_arguments\r\n    return rate_limit()(view_func)(request, profile, *args, **kwargs)\r\n  File \"./zerver/decorator.py\", line 798, in wrapped_func\r\n    return func(request, *args, **kwargs)\r\n  File \"./zerver/decorator.py\", line 437, in _wrapped_view_func\r\n    return view_func(request, *args, **kwargs)\r\n  File \"./zerver/lib/request.py\", line 187, in _wrapped_view_func\r\n    return view_func(request, *args, **kwargs)\r\n  File \"./zerver/views/push_notifications.py\", line 44, in add_android_reg_id\r\n    add_push_device_token(user_profile, token, PushDeviceToken.GCM)\r\n  File \"./zerver/lib/push_notifications.py\", line 363, in add_push_device_token\r\n    send_to_push_bouncer('POST', 'register', post_data)\r\n  File \"./zerver/lib/push_notifications.py\", line 299, in send_to_push_bouncer\r\n    headers=headers)\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/requests/api.py\", line 58, in request\r\n    return session.request(method=method, url=url, **kwargs)\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/requests/sessions.py\", line 508, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/requests/sessions.py\", line 618, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"/home/zulip/deployments/2018-06-07-14-36-22/zulip-py3-venv/lib/python3.4/site-packages/requests/adapters.py\", line 508, in send\r\n    raise ConnectionError(e, request=request)\r\nrequests.exceptions.ConnectionError: HTTPSConnectionPool(host='push.zulipchat.com', port=443): Max retries exceeded with url: /api/v1/remotes/push/register (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8f246bbdd8>: Failed to establish a new connection: [Errno -2] Name or service not known',))\r\n```"}}
{"actor":{"display_login":"timabbott"}}