You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, I am using bees attack -n 10 -c 10 -XPOST -u 'http://sample/default.html' -K -P json -p sample.json and it is throwing
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "build/bdist.linux-x86_64/egg/beeswithmachineguns/bees.py", line 764, in attack
_sting(param)
File "build/bdist.linux-x86_64/egg/beeswithmachineguns/bees.py", line 383, in _sting
response = urlopen(request)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 171, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 500, in open
response = meth(req, response)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 612, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 538, in error
return self._call_chain(*args)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 620, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error
The text was updated successfully, but these errors were encountered:
@rajesh7221 the beeswithmachineguns code makes a call out to the target URI once per instance that is starting. This backtrace indicates that this call is receiving a 500 error from your server, which is an unhandled exception in the code.
This does not appear to be a BWMG issue, but your server is throwing 500 for some reason (admittedly, the code could handle this a bit more gracefully)
I will see about adding a patch to improve handling of HTTPError on this request, then this issue can be closed
FliesLikeABrick
added a commit
to FliesLikeABrick/beeswithmachineguns
that referenced
this issue
Nov 28, 2017
… information printed for _sting request failures, and is a fatal error. Modified to be non-fatal, prints error to stderr. This is not ideal, urllib.errors does not seem to exist on python2, was unable to find a way to catch HTTPError or URLERror specifically, so had to go with overly-broad exception catching
Can you please share a sample post request.
Currently, I am using bees attack -n 10 -c 10 -XPOST -u 'http://sample/default.html' -K -P json -p sample.json and it is throwing
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "build/bdist.linux-x86_64/egg/beeswithmachineguns/bees.py", line 764, in attack
_sting(param)
File "build/bdist.linux-x86_64/egg/beeswithmachineguns/bees.py", line 383, in _sting
response = urlopen(request)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 171, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 500, in open
response = meth(req, response)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 612, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 538, in error
return self._call_chain(*args)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 620, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error
The text was updated successfully, but these errors were encountered: