aminator icon indicating copy to clipboard operation
aminator copied to clipboard

Aminate - ERROR Connection refused & Caught exception reading instance data

Open calaba opened this issue 11 years ago • 4 comments

Successfully run git clone, then python setup.py install ... however if I try to run aminate I am getting this errors ....

biguser@ubuntu:/data/netflix/aminator$ aminate -h 2013-10-22 23:59:24 [INFO] Aminator 2.0.174-dev default configuration loaded 2013-10-22 23:59:24 [ERROR] Caught exception reading instance data Traceback (most recent call last): File "/home/biguser/anaconda/lib/python2.7/site-packages/boto/utils.py", line 211, in retry_url r = opener.open(req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 404, in open response = self._open(req, data) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 422, in _open '_open', req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(_args) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 1214, in http_open return self.do_open(httplib.HTTPConnection, req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 1184, in do_open raise URLError(err) URLError: <urlopen error [Errno 111] Connection refused> 2013-10-22 23:59:25 [ERROR] Caught exception reading instance data Traceback (most recent call last): File "/home/biguser/anaconda/lib/python2.7/site-packages/boto/utils.py", line 211, in retry_url r = opener.open(req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 404, in open response = self._open(req, data) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 422, in _open '_open', req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(_args) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 1214, in http_open return self.do_open(httplib.HTTPConnection, req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 1184, in do_open raise URLError(err) URLError: <urlopen error [Errno 111] Connection refused> 2013-10-22 23:59:27 [ERROR] Caught exception reading instance data Traceback (most recent call last): File "/home/biguser/anaconda/lib/python2.7/site-packages/boto/utils.py", line 211, in retry_url r = opener.open(req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 404, in open response = self._open(req, data) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 422, in _open '_open', req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(_args) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 1214, in http_open return self.do_open(httplib.HTTPConnection, req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 1184, in do_open raise URLError(err) URLError: <urlopen error [Errno 111] Connection refused> 2013-10-22 23:59:31 [ERROR] Caught exception reading instance data Traceback (most recent call last): File "/home/biguser/anaconda/lib/python2.7/site-packages/boto/utils.py", line 211, in retry_url r = opener.open(req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 404, in open response = self._open(req, data) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 422, in _open '_open', req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(_args) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 1214, in http_open return self.do_open(httplib.HTTPConnection, req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 1184, in do_open raise URLError(err) URLError: <urlopen error [Errno 111] Connection refused> 2013-10-22 23:59:39 [ERROR] Caught exception reading instance data Traceback (most recent call last): File "/home/biguser/anaconda/lib/python2.7/site-packages/boto/utils.py", line 211, in retry_url r = opener.open(req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 404, in open response = self._open(req, data) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 422, in _open '_open', req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 1214, in http_open return self.do_open(httplib.HTTPConnection, req) File "/home/biguser/anaconda/lib/python2.7/urllib2.py", line 1184, in do_open raise URLError(err) URLError: <urlopen error [Errno 111] Connection refused> 2013-10-22 23:59:39 [ERROR] Unable to read instance data, giving up Traceback (most recent call last): File "/home/biguser/anaconda/bin/aminate", line 10, in sys.exit(run()) File "/home/biguser/anaconda/lib/python2.7/site-packages/aminator/cli.py", line 55, in run sys.exit(Aminator(debug=args.debug, envname=args.env).aminate()) File "/home/biguser/anaconda/lib/python2.7/site-packages/aminator/core.py", line 49, in init self.plugin_manager = plugin_manager(self.config, self.parser, plugins=self.config.environments[envname]) File "/home/biguser/anaconda/lib/python2.7/site-packages/aminator/plugins/init.py", line 64, in init plugin.obj.configure(config, parser) File "/home/biguser/anaconda/lib/python2.7/site-packages/aminator/plugins/cloud/ec2.py", line 109, in configure config.context.web_log['host'] = md[pub] if pub in md else md[ipv4] File "/home/biguser/anaconda/lib/python2.7/site-packages/boto/utils.py", line 266, in getitem return super(LazyLoadMetadata, self).getitem(key) KeyError: 'local-ipv4'

calaba avatar Oct 23 '13 19:10 calaba

Hi Ric,

My guess is you are not running aminator on an ec2 instance (the exception is aminator trying to connect to the ec2 metadata service). The main purpose of aminator is to produce ami images for ec2 and to do this it has to be run on an ec2 instance. There are a few plugins (https://github.com/aminator-plugins) which allow it to be run with eucalyptus for example, but the default is ec2.

There is obviously a bug where "aminate -h" should produce useful information and not throw an exception like you are seeing, so we will try to get that fixed.

-Cory

coryb avatar Oct 23 '13 19:10 coryb

Hi Cory, correct I am using the Aminator oustdie the EC2.

I was hoping I can use it to "bake" my own AMI and deploy it to AWS.

I tried using AMI tools which in general seems to work but to make your own image to boot correctly is a hell as you have to convince the AWS-grub to work with your image ... which is lot of guessing - right kernel, right disk ramdisk and root fs layout ... etc .. Anyway, thank you for explanation. Now I know that I wanted to use Aminator for something it wasn't designed for.

calaba avatar Oct 23 '13 21:10 calaba

Basically aminator applies custom data (via chef, yum, apt, etc) over a pre-existing base os AMI. As you noted, creating the initial base os AMI is a pain. We have a wiki page here: https://github.com/Netflix/aminator/wiki/Creation-of-an-Ubuntu-12.04-foundation-AMI It might provide some tips, but that document is really a work in progress and not complete.

Once you get a base os then aminator can help you iterate on that base to create custom application stacks for your deployments.

-Cory

coryb avatar Oct 23 '13 22:10 coryb

Yep, saw it, work in progress as you say :). Anyway thank you very much for explanation - I was following the wrong direction.

calaba avatar Oct 23 '13 23:10 calaba