-
-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restart Error - Push Error #221
Comments
hi @Sandcrawler789 thanks for the detailed bug report, could you give me samples of your rest calls? are they ios or android push notifications? |
hi @dcai, thanks for the quick response. I have attached an image below that shows the rest on the wire (it is the same in both requests). It is somewhat redacted, apologies, the tokens are correct and valid though (as it does work when kicked in UI). Currently trying to get APNs (iOS push) working on v3. For completeness, below is attached a working rest call (202 Accepted seen). |
cheers @Sandcrawler789 I will look into this issue this weekend, I suspend it might something to do with server token for apple push notification service. |
@dcai The 104 error is from the AirNotifier logs. I have clipped a bit of the log below (this is stdout from AirNotifier). It shows normal operation and then a 104, after this point the connection is not re-established and 32 broken pipe is seen. This is resolved by going to the AirNotifier UI, removing the last character from any of the 4 boxes under APNs configuration. Save. Add the character back. Save. EDIT: |
Thank you for taking a look. |
I have been looking into this issue yesterday, wasn't able to reproduce it with FCM protocol (for android), I suspect this is an issue with iOS's APNS/2 protocol only, the problem is I don't have an active apple developer account to test it at the moment, Ill reach out to a friend to set it up with his account, I will update this issue when I have a test environment ready. |
Unfortunately I have not got as far as testing with FCM yet, we have that working on v2 and are reluctant to move it until this one works first. |
Hi @dcai, wondering if you had managed to get any further with testing or found anything? |
Hi, I have a same problem with Airnotifier v3.0. The following error occurs when starting Airnotifier:
The cause is probably
Therefore, I think need to modify the code as follows:
|
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
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.
The text was updated successfully, but these errors were encountered: