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

Type error returned when starting attack #218

Open
joehep opened this issue May 10, 2018 · 11 comments
Open

Type error returned when starting attack #218

joehep opened this issue May 10, 2018 · 11 comments

Comments

@joehep
Copy link

joehep commented May 10, 2018

I have built a Docker container using Ubuntu and am seeing the following error when I direct my bees to attack.

root@005e10755623:/data# bees attack -n 10000 -c 250 -u https://host.redacted.com/api
Read 5 bees from the roster: us-east-1a
Connecting to the hive.
Assembling bees.
Each of 5 bees will fire 2000 rounds, 50 at a time.
Stinging URL sequentially so it will be cached for the attack.
Organizing the swarm.
Bee 0 is joining the swarm.
Bee 1 is joining the swarm.
Bee 2 is joining the swarm.
Bee 3 is joining the swarm.
Bee 4 is joining the swarm.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/beeswithmachineguns/bees.py", line 801, in attack
    summarized_results = _summarize_results(results, params, csv_filename)
  File "/usr/local/lib/python2.7/dist-packages/beeswithmachineguns/bees.py", line 543, in _summarize_results
    complete_results = [r['complete_requests'] for r in summarized_results['complete_bees']]
TypeError: sequence index must be integer, not 'str'

I have tried this on my Mac, Centos, and Ubuntu. I have used several versions of Python - from 2.7.10 to 3.6.5 an each has given the same error.

@BEARTRAPTHERAPPER
Copy link

Try cms++ it should be better equiped for a multiple data transfer....

@FayeGibbins
Copy link

I'm seeing this too. +1 on getting a fix please

@FayeGibbins
Copy link

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.6/site-packages/beeswithmachineguns/bees.py", line 801, in attack
summarized_results = _summarize_results(results, params, csv_filename)
File "/usr/local/lib/python3.6/site-packages/beeswithmachineguns/bees.py", line 543, in _summarize_results
complete_results = [r['complete_requests'] for r in summarized_results['complete_bees']]
File "/usr/local/lib/python3.6/site-packages/beeswithmachineguns/bees.py", line 543, in
complete_results = [r['complete_requests'] for r in summarized_results['complete_bees']]
TypeError: 'gaierror' object is not subscriptable

@mrblog
Copy link

mrblog commented Mar 19, 2019

I've tried every version of Python available for Amazon Linux to get bees installed and every combination gets to a different point of progress, but ultimately fails with some Python error or another. I started with the default python2.7 then tried the latest available via yum, python 3.6. Then I tried python 2.6, and finally python 3.4, which is where I am now. I had to upgrade boto to 2.49.0 to even get it to authenticate. And now this TypeError: 'gaierror' object is not subscriptable error when trying to initiate the attack is where I am. Can anybody provide a set of versions of python, boto, and other dependencies that actually works on Amazon Linux? Perhaps I'll have better luck with Ubuntu?

@mrblog
Copy link

mrblog commented Mar 19, 2019

I get the same TypeError: 'gaierror' object is not subscriptable error with Python 3.6. The same on Amazon Linux and Ubuntu.

With Python 2.7 I get the error TypeError: sequence index must be integer, not 'str as above and that is on a new install of Ubuntu instead of Amazon Linux.

There must be a combination that works.

@rene1983
Copy link

I get the same TypeError: 'gaierror' object is not subscriptable error with Python 3.6. The same on Amazon Linux and Ubuntu.

With Python 2.7 I get the error TypeError: sequence index must be integer, not 'str as above and that is on a new install of Ubuntu instead of Amazon Linux.

There must be a combination that works.

I get the same problem with latest Amazon Linux 2 / Python 2.6 and Ubuntu 18 / Python 2.7. Is this project dead?

@RyanBeatty
Copy link

I'm getting this error when running with the default ami that the tool chooses. Anybody have a workaround?

@KishoreAllaparthi
Copy link

Any workaround ?

@rene1983
Copy link

this project is dead

@KishoreAllaparthi
Copy link

Are there any other alternatives to beeswithmachineguns?

@bycEEE
Copy link

bycEEE commented Jun 17, 2021

A couple years late.

client.connect(params['instance_name'], username=params['username'])

'instance_name': instance.private_dns_name if instance.public_dns_name == "" else instance.public_dns_name,

Paramiko tries to connect using eg. ip-10-10-120-230.ec2.internal. That doesn't resolve to anything for me locally, my workaround is editing:

'instance_name': instance.private_dns_name if instance.public_dns_name == "" else instance.public_dns_name,

to:

'instance_name': instance.private_ip_address,

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

8 participants