Error setting up SAIO: middleware.healthcheck not found

asked 2011-05-03 13:34:23 -0600

warning - complete python newbie! Trying to get SAIO ruinning in a VM - followed guide but getting the followiing on startmain:

root@ubuntu:/var/log# startmain Starting proxy-server...(/etc/swift/proxy-server.conf) Starting container-server...(/etc/swift/container-server/1.conf) Starting container-server...(/etc/swift/container-server/2.conf) Starting container-server...(/etc/swift/container-server/3.conf) Starting container-server...(/etc/swift/container-server/4.conf) Starting account-server...(/etc/swift/account-server/1.conf) Starting account-server...(/etc/swift/account-server/2.conf) Starting account-server...(/etc/swift/account-server/3.conf) Starting account-server...(/etc/swift/account-server/4.conf) Starting object-server...(/etc/swift/object-server/1.conf) Starting object-server...(/etc/swift/object-server/2.conf) Starting object-server...(/etc/swift/object-server/3.conf) Starting object-server...(/etc/swift/object-server/4.conf) Traceback (most recent call last): File "/usr/local/bin/swift-proxy-server", line 7, in <module> execfile(__file__) File "/root/swift/trunk/bin/swift-proxy-server", line 22, in <module>

File "/root/swift/trunk/swift/common/wsgi.py", line 122, in run_wsgi File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 204, in loadapp return loadobj(APP, uri, name=name, **kw) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 224, in loadobj global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 248, in loadcontext global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 278, in _loadconfig return loader.get_context(object_type, name, global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 405, in get_context global_additions=global_additions) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 503, in _pipeline_app_context for name in pipeline[:-1]] File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 409, in get_context section) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 431, in _context_from_use object_type, name=use, global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 361, in get_context global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 248, in loadcontext global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 285, in _loadegg return loader.get_context(object_type, name, global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 561, in get_context object_type, name=name) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 587, in find_egg_entry_point possible.append((entry.load(), protocol, entry.name)) File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1948, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) ImportError: No module named middleware.healthcheck

Hints?

edit retag flag offensive close merge delete

9 answers

Sort by ยป oldest newest most voted
0

answered 2011-05-03 16:18:13 -0600

Looks OK - pretty much a copy/paste from the setup page. I am wondering if I need to re-load the code base since the module seems to be missing: "ImportError: No module named middleware.healthcheck"

edit flag offensive delete link more
0

answered 2011-05-03 15:23:29 -0600

clay-gerrard gravatar image

double check for typos in your proxy-server.conf: http://swift.openstack.org/development_saio.html#configuring-each-node (http://swift.openstack.org/developmen...)

especially make sure that the helthcheck section is correct: [filter:healthcheck] use = egg:swift#healthcheck

edit flag offensive delete link more
0

answered 2011-05-17 12:55:58 -0600

mihgen gravatar image

I had the same issue installing from http://swift.openstack.org/development_saio.html (http://swift.openstack.org/developmen...)

The issue has been resolved when I ran python setup.py install , not python setup.py develop

edit flag offensive delete link more
0

answered 2011-05-09 20:08:47 -0600

gholt gravatar image

In the setup.py, it says (for the filter_factory installation):

healthcheck=swift.common.middleware.healthcheck:filter_factory

And the config should have:

[filter:healthcheck] use = egg:swift#healthcheck

So I'm not sure why yours is trying to import middleware.healthcheck instead of swift.common.middleware.healthcheck

edit flag offensive delete link more
0

answered 2011-05-09 20:09:26 -0600

gholt gravatar image

Eh, I accidentally marked this as answered, which I definitely haven't done. :)

edit flag offensive delete link more
0

answered 2011-05-21 13:27:20 -0600

Just getting back to this after a real work break. Thanks for your suggestion - that solved the issue. Not sure what the setup differences are between install and develop, but after I that things went fairly smoothly. I had some additional issues with the logical links for the loopback storage setup (I think the swift reset script breaks those) but there were some other notes in here that gave me enough clues to fix that too. Wish I had kept notes.

edit flag offensive delete link more
0

answered 2012-05-23 17:09:23 -0600

In spite of these advices i still have this issue.

(venv) # swift-init proxy no-daemon Starting proxy-server...(/etc/swift/proxy-server.conf) Traceback (most recent call last): File "/home/vanch/venv/bin/swift-proxy-server", line 5, in <module> File "/home/vanch/venv/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 461, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home/vanch/venv/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 1194, in run_script execfile(script_filename, namespace, namespace) File "/home/vanch/venv/lib/python2.6/site-packages/swift-1.4.9-py2.6.egg/EGG-INFO/scripts/swift-proxy-server", line 22, in <module> File "/home/vanch/venv/lib/python2.6/site-packages/swift-1.4.9-py2.6.egg/swift/common/wsgi.py", line 132, in run_wsgi File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 204, in loadapp return loadobj(APP, uri, name=name, **kw) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 224, in loadobj global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 248, in loadcontext global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 278, in _loadconfig return loader.get_context(object_type, name, global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 405, in get_context global_additions=global_additions) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 503, in _pipeline_app_context for name in pipeline[:-1]] File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 409, in get_context section) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 431, in _context_from_use object_type, name=use, global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 361, in get_context global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 248, in loadcontext global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 285, in _loadegg return loader.get_context(object_type, name, global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 561, in get_context object_type, name=name) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 587, in find_egg_entry_point possible.append((entry.load(), protocol, entry.name)) File "/home/vanch/venv/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 1948, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) ImportError: No module named middleware.healthcheck

If I remove a middleware instance in proxy pipeline then it argues on the next one and so on. All of this is valid only when using virtualenv.

edit flag offensive delete link more
0

answered 2012-06-07 13:17:05 -0600

I had the same problem,solved by adding the line below in swift/common/wsgi.py from swift.common.middleware import healthcheck, memcache, tempauth, proxy_logging

edit flag offensive delete link more
0

answered 2012-08-29 21:03:49 -0600

briancline gravatar image

Had the same issue, along with the same errors around both middleware.healthcheck and middleware.recon, but no longer a problem once I ran python setup.py install.

Seems like there is probably a specific reason this wouldn't have been reflected in the docs? Or is the desired fix to adjust what occurs when the development install is built?

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-05-03 13:34:23 -0600

Seen: 105 times

Last updated: Aug 29 '12