0

I had previously successfully installed and tested out django-haystack, thought it wasn't what I wanted, and uninstalled it*. Now, I'm having trouble re-installing haystack. It's like a messy breakup/reconciliation situation.

In particular, adding ANY haystack settings OR 'haystack', to INSTALLED_APPS in my settings.py file drastically breaks everything and I end up with a 502 response via Cloudflare, and Gunicorn telling me:

raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

Here's what I've tried so far:

  1. Forcing a re-install of django-haystack (thinking I might have uninstalled it incorrectly),
  2. Uninstalling django-silk, which I installed after removing django-haystack (thought it could be a case of 3rd party apps interfering with each other...),
  3. Installing and running django-watson, and after finding out that it's not fast enough for my needs, uninstalling it (this one is just anecdotal I guess).

Any ideas?


*Don't know if this information will be of any use, but here's what I did when uninstalling haystack the first time round:

  • pip uninstall django-haystack
  • Removed all haystack settings from settings.py
  • Removed 'haystack', from INSTALLED_APPS

Even more info:

$ pip show django-haystack 
---
Name: django-haystack
Version: 2.4.0
Location: .../lib/python2.7/site-packages # truncated path
Requires: Django


$ pip show Whoosh
---
Name: Whoosh
Version: 2.7.0
Location: .../lib/python2.7/site-packages # truncated path again
Requires: 
Community
  • 1
  • 1
gx14
  • 263
  • 2
  • 13
  • Could you check and see if you have `haystack` installed? – cssko Jun 28 '15 at 20:14
  • >>> import haystack Traceback (most recent call last): File "", line 1, in File "/apps/django17/local/lib/python2.7/site-packages/haystack/__init__.py", line 39, in raise ImproperlyConfigured('The HAYSTACK_CONNECTIONS setting is required.') ImproperlyConfigured: The HAYSTACK_CONNECTIONS setting is required. Does that mean `haystack` is somehow still installed? (sorry can't do code blocks) – gx14 Jun 28 '15 at 20:15
  • Okay, this sounds a bit like what happened to me yesterday. Use pip to uninstall `haystack` and `django-haystack`. Then reinstall `django-haystack`. – cssko Jun 28 '15 at 20:18
  • # pip uninstall haystack Cannot uninstall requirement haystack, not installed Storing debug log for failure in /root/.pip/pip.log Then, I uninstalled `django-haystack`, and reinstalled: – gx14 Jun 28 '15 at 20:23
  • # pip install django-haystack Downloading/unpacking django-haystack Downloading django-haystack-2.4.0.tar.gz (160kB): 160kB downloaded Running setup.py (path:.../build/django-haystack/setup.py) egg_info for package django-haystack Requirement already satisfied (use --upgrade to upgrade): Django in .../lib/python2.7/site-packages (from django-haystack) Installing collected packages: django-haystack Running setup.py install for django-haystack Successfully installed django-haystack Cleaning up... Still getting the `502`.. – gx14 Jun 28 '15 at 20:24
  • Hmm, alright. Where is your django app located? What are the permissions for that directory? It might be that the directory requires root access. I'm assuming you're using nginx and gunicorn? – cssko Jun 28 '15 at 20:34
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/81803/discussion-between-cssko-and-gx14). – cssko Jun 28 '15 at 20:37
  • Yup, nginx + gunicorn. I previously had trouble with `haystack` accessing the `whoosh_index` folder, but it's deleted now. To chmod the `whoosh_index` folder was the only access issue I had before this. My app's a typical folder in the Django project directory, I don't know how to get it to show permissions the system has on that folder? – gx14 Jun 28 '15 at 20:39

1 Answers1

1

Figured it out after getting some sleep! A spare ) in HAYSTACK_CONNECTIONS was the source of all my troubles..!

gx14
  • 263
  • 2
  • 13