Skip to content
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

retry for message sending #185

Open
wulfgar93 opened this issue Oct 10, 2019 · 2 comments
Open

retry for message sending #185

wulfgar93 opened this issue Oct 10, 2019 · 2 comments

Comments

@wulfgar93
Copy link

Hello!

I use socks5h proxy and sometimes I retrieve error:

Traceback (most recent call last):
File "/usr/lib/zabbix/alertscripts/zbxtg.py", line 939, in <module>
main()
File "/usr/lib/zabbix/alertscripts/zbxtg.py", line 848, in main
tg.send_message(uid, zbxtg_body_text)
File "/usr/lib/zabbix/alertscripts/zbxtg.py", line 94, in send_message
answer = requests.post(url, params=params, proxies=self.proxies)
File "/usr/lib/python2.7/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))

Can you add retry for message sending please?

@wulfgar93 wulfgar93 changed the title add retry sending retry for message sending Oct 10, 2019
@ableev
Copy link
Owner

ableev commented Oct 12, 2019

Zabbix has such functionality and it's working.

@kakaximark
Copy link

The error is send by your socks5h proxy I think so!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants