Skip to content

Restart Error - Push Error #221

@Sandcrawler789

Description

@Sandcrawler789

Install AirNotifier v3.0
Have tried on Ubuntu twice and CentOs7 once (same issues on all 3 servers).

Restart AirNotifier

Make test call (using push service to send APNs).

Log print below received.

1602660704 E [MainThread][root][push.py:153] no active apns connection
1602660704 E [MainThread][root][push.py:177] Traceback (most recent call last):
File "/root/airnotifier/api/push.py", line 174, in post
self.send_response(ACCEPTED)
File "/root/airnotifier/api/init.py", line 212, in send_response
self.finish(data)
File "/root/airnotifier/api/init.py", line 215, in finish
super(APIBaseHandler, self).finish(chunk)
File "/root/.local/share/virtualenvs/airnotifier--hHQdAqd/lib64/python3.6/site-packages/tornado/web.py", line 1119, in finish
raise RuntimeError("finish() called twice")
RuntimeError: finish() called twice
finish() called twice
1602660704 E [MainThread][tornado.application][web.py:1788] Uncaught exception POST /api/v2/push (<IP_ADDRESS>)
HTTPServerRequest(protocol='http', host='<IP_ADDRESS>:8801', method='POST', uri='/api/v2/push', version='HTTP/1.1', remote_ip='<IP_ADDRESS>')
Traceback (most recent call last):
File "/root/airnotifier/api/push.py", line 174, in post
self.send_response(ACCEPTED)
File "/root/airnotifier/api/init.py", line 212, in send_response
self.finish(data)
File "/root/airnotifier/api/init.py", line 215, in finish
super(APIBaseHandler, self).finish(chunk)
File "/root/.local/share/virtualenvs/airnotifier--hHQdAqd/lib64/python3.6/site-packages/tornado/web.py", line 1119, in finish
raise RuntimeError("finish() called twice")
RuntimeError: finish() called twice

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/.local/share/virtualenvs/airnotifier--hHQdAqd/lib64/python3.6/site-packages/tornado/web.py", line 1699, in _execute
result = await result
File "/root/airnotifier/api/push.py", line 178, in post
self.send_response(INTERNAL_SERVER_ERROR, dict(error=str(ex)))
File "/root/airnotifier/api/init.py", line 212, in send_response
self.finish(data)
File "/root/airnotifier/api/init.py", line 215, in finish
super(APIBaseHandler, self).finish(chunk)
File "/root/.local/share/virtualenvs/airnotifier--hHQdAqd/lib64/python3.6/site-packages/tornado/web.py", line 1119, in finish
raise RuntimeError("finish() called twice")
RuntimeError: finish() called twice

Access front end UI.

Go to 'voipexprod'.
Go to APNs configuration.

Remove the last character from any field.
Save.
Add character back to the field.
Save.

1602660712 I [MainThread][tornado.access][web.py:2246] 302 POST /applications/voipexprod/settings (<IP_ADDRESS>) 8.88ms
1602660712 I [MainThread][tornado.access][web.py:2246] 200 GET /applications/voipexprod/settings (<IP_ADDRESS>) 25.53ms
1602660715 I [MainThread][tornado.access][web.py:2246] 302 POST /applications/voipexprod/settings (<IP_ADDRESS>) 7.66ms
1602660715 I [MainThread][tornado.access][web.py:2246] 200 GET /applications/voipexprod/settings (<IP_ADDRESS>) 25.30ms

Make call and it works.

1602660721 I [MainThread][root][dao.py:25] find token: (<TOKEN_ID>)
1602660721 I [MainThread][root][push.py:111] sending notification to ios: (<TOKEN_ID>)
1602660722 I [MainThread][tornado.access][web.py:2246] 202 POST /api/v2/push (<IP_ADDRESS>) 922.25ms
1602660722 I [MainThread][root][init.py:218] PushHandler call ends 0.9223105907440186

  1. When a rest call is made in to the service, immediately after restart, it does not work (with correct configuration).
  2. Why does it take a visit to the UI to hit save to restart the connection?

Currently this activity is having to be undertaken daily to keep the service usable.

NOTE:
This issue occurs after a "104 Connection Reset by Peer" as well and requires the same change/save in the UI to make work.

Would it be possible to have a look at the above and see whether there is a resolution?
Happy to supply any additional information if required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions