Closed davidjeddy closed 1 year ago
In your command, your group is called 'ssh', but the there is no security group "ssh" in that region for you.
~/.../beeswithmachineguns$ bees up -s 4 -g ssh -k
Make sure that group exist in that region, also try using a name for the security group that makes sense. IE "commerce-bees"
I used "commerce-bees"
I created a Security group called 'ssh' and added port 22 from my IP. I also added port 22 to the default security group; same error. I'll give "commerce-bees" a try tonight.
Hmm ok so quick run down.
Create commerce-bees security group. Add your IP to port 22 to commerce-bees sec group. run the following
~/.../beeswithmachineguns$ bees up -s 4 -g commerce-bees
I ran had an issue that my regions AMI didn't exist anymore so I had to create a new one. Which was pretty simple plain ubuntu and install apache bench
Added sec-group as directed:
Attempted to bee's is up:
If it helps:
I'm missing something oblivious here, right?
Are you in the US East (N. Virginia) on the AWS console? For testing, you can allow ssh from any host since these are just temp machines and have no prod data on them.
The error message indicates an issue with not being able to find the security group in the US East (N. Virginia) region. So maybe your default region is something else look in the top right corner and see what it says.
MY default region afaik is us-east-1; I'll try opening the commerce-bees
sec group to the world and get back to you. Thank you for your help, it is appreciated.
No problem, I just noticed something in your message, are you using D subnet for us-east-1?
'nother go around. I know the image does not show it but I double checked the SecGroup allowed SSH from the world.
It looks like the agent is able to connect
Tried this from another ticket as well:
I think I have the answer for you :) I just did.a little test using the AMI that is proving it gives me the same sec group not found bs. So i would recommend spinning up an ubuntu 14.04 or 16.04 instance and installing apache benchmark.
apt-get install apache2-utils
That is what bees uses, this is what i did in to make mine work since there was no ami for my region. Here is the command that works for me bringing them up, using my own ami.
bees up -s 2 -k sao_paulo -g commerce-bees -l ubuntu -z sa-east-1a -i ami-ff5e1293
No joy :(. Even double checked and used an Ubuntu AMI from the us-east-1 region.
I'll try to use that AMI, for Sao Paulo you tried using my AMI.
Only thing I can think of is removing bees and installing it a different method.
Gave it another go:
Sadly no dice.
What version of python are you running?
Sorry for the late reply. Python is at version 2.7.12 on Ubuntu 16.04.
If it helps here is the command history:
2001 cd ~/Projects
2002 git clone https://github.com/newsapps/beeswithmachineguns.git
2003 cd bwe
2004 cd beeswithmachineguns/
2005 python -v
2006 python --version
2007 pip install https://github.com/newsapps/beeswithmachineguns/archive/master.zip
2008 sudo apt install python-pip
2009 pip install https://github.com/newsapps/beeswithmachineguns/archive/master.zip
2010 pip install --upgrade pip
2011 vim ~/.boto
2012 chmod 600 ~/.boto
2013 bees up -s 4 -g public -k frakkingtoasters
2014 bees up -s 4 -g ssh -k <REMOVED>
2015 vim ~/.boto
2016 bees up -s 4 -g ssh -k <REMOVED>
2017 history
and the ~/.boto file:
[Credentials]
aws_access_key_id = <REMOVED>
aws_secret_access_key = <REMOVED>
ec2_region_name = us-east-1a
ec2_region_endpoint = ec2.us-east-1.amazonaws.com
Hope this helps.
No problem, ill follow your commands later this week and see if i can replicate your issue.
Any update on this issue?
Sorry, totally spaced out on this. I'll try it again this evening.
So this is what I finally got to work:
Deleted the entire bees repo
Pre req:
Process:
bees up -g default -z us-east-1a -s 2 -k beestest
; response is
pheagey@Armor-VIII:~$ bees up -g default -z us-east-1a -s 2 -k beestest
New bees will use the "default" EC2 security group. Please note that port 22 (SSH) is not normally open on this group. You will need to use to the EC2 tools to open it before you will be able to attack.
Read 2 bees from the roster: us-east-1a
Connecting to the hive.
GroupId found: default
Placement: us-east-1a
Attempting to call up 2 bees.
Traceback (most recent call last):
File "/home/pheagey/.local/bin/bees", line 6, in <module>
main.main()
File "/home/pheagey/.local/lib/python2.7/site-packages/beeswithmachineguns/main.py", line 277, in main
parse_options()
File "/home/pheagey/.local/lib/python2.7/site-packages/beeswithmachineguns/main.py", line 216, in parse_options
bees.up(options.servers, options.group, options.zone, options.instance, options.type, options.login, options.key, options.subnet, options.tags, options.bid)
File "/home/pheagey/.local/lib/python2.7/site-packages/beeswithmachineguns/bees.py", line 242, in up
list(map(instance_ids.pop, [instance_ids.index(i) for i in dead_instances]))
IndexError: pop index out of range
5. Checking the EC2 console we have progress, as in two new instances are started up...but where to from here?
I tried a couple time with different combinations of security groups, AZs, ssh keys, and instance count.
![image](https://user-images.githubusercontent.com/6232455/39794602-200f8bda-5319-11e8-85ca-67022a0a89a4.png)
root@ba7d62120c6d:~/.ssh# bees up -s 2 -k bees -g bees-hq -l ubuntu -i ami-02354e95b39ca8dec -z us-east-1a
Connecting to the hive.
GroupId found: bees-hq
Placement: us-east-1a
Attempting to call up 2 bees.
Waiting for bees to load their machine guns...
Traceback (most recent call last):
File "/usr/local/bin/bees", line 6, in <module>
main.main()
File "/usr/local/lib/python2.7/dist-packages/beeswithmachineguns/main.py", line 277, in main
parse_options()
File "/usr/local/lib/python2.7/dist-packages/beeswithmachineguns/main.py", line 216, in parse_options
bees.up(options.servers, options.group, options.zone, options.instance, options.type, options.login, options.key, options.subnet, options.tags, options.bid)
File "/usr/local/lib/python2.7/dist-packages/beeswithmachineguns/bees.py", line 249, in up
instance.update()
File "/usr/local/lib/python2.7/dist-packages/boto/ec2/instance.py", line 413, in update
rs = self.connection.get_all_reservations([self.id], dry_run=dry_run)
File "/usr/local/lib/python2.7/dist-packages/boto/ec2/connection.py", line 681, in get_all_reservations
[('item', Reservation)], verb='POST')
File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 1186, in get_list
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidInstanceID.NotFound</Code><Message>The instance ID 'i-03b05e9779a78ac90' does not exist</Message></Error></Errors><RequestID>b3d81a8f-83a5-4254-bb14-37066ee4a484</RequestID></Response>
getting an instance ID issue when providing an AMI? not sure but it doesn't make much sense?
Issue is > 4 years old. Closing
Following the README instructions to get a hive setup results in less than desired state.
Added AWS 'ssh' security group with access via SSH from my IP as well. any idea what BWMG is needing at this point?