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

Aminate - ERROR Connection refused & Caught exception reading instance data #157

Open
calaba opened this issue Oct 23, 2013 · 4 comments
Open

Comments

@calaba
Copy link

calaba commented Oct 23, 2013

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'

@coryb
Copy link
Contributor

coryb commented Oct 23, 2013

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

@calaba
Copy link
Author

calaba commented Oct 23, 2013

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.

@coryb
Copy link
Contributor

coryb commented Oct 23, 2013

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

@calaba
Copy link
Author

calaba commented Oct 23, 2013

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

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

2 participants