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

errors with haystack running #32

Open
mandichen opened this issue Dec 15, 2015 · 2 comments
Open

errors with haystack running #32

mandichen opened this issue Dec 15, 2015 · 2 comments

Comments

@mandichen
Copy link

Got this warning in LMS
'Sorry we could not search the store for annotations'

I checked the log and got this,

Dec 15 15:18:44 vultr [service_variant=edx-notes-api][django.request][env:no_env] ERROR [vultr 23056] [base.py:231] - Internal Server Error: /api/v1/search/
Traceback (most recent call last):
File "/edx/app/edx_notes_api/venvs/edx_notes_api/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 98, in get_response
resolver_match = resolver.resolve(request.path_info)
File "/edx/app/edx_notes_api/venvs/edx_notes_api/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 343, in resolve
for pattern in self.url_patterns:
File "/edx/app/edx_notes_api/venvs/edx_notes_api/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 372, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/edx/app/edx_notes_api/venvs/edx_notes_api/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 366, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/edx/app/edx_notes_api/edx_notes_api/notesserver/urls.py", line 8, in
url(r'^api/', include('notesapi.urls', namespace='api')),
File "/edx/app/edx_notes_api/venvs/edx_notes_api/local/lib/python2.7/site-packages/django/conf/urls/init.py", line 28, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/edx/app/edx_notes_api/edx_notes_api/notesapi/urls.py", line 5, in
url(r'^v1/', include('notesapi.v1.urls', namespace='v1')),
File "/edx/app/edx_notes_api/venvs/edx_notes_api/local/lib/python2.7/site-packages/django/conf/urls/init.py", line 28, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/edx/app/edx_notes_api/edx_notes_api/notesapi/v1/urls.py", line 2, in
from notesapi.v1.views import AnnotationListView, AnnotationDetailView, AnnotationSearchView
File "/edx/app/edx_notes_api/edx_notes_api/notesapi/v1/views.py", line 13, in
from haystack.query import SQ
File "/edx/app/edx_notes_api/venvs/edx_notes_api/local/lib/python2.7/site-packages/haystack/init.py", line 41, in
raise ImproperlyConfigured("The default alias '%s' must be included in the HAYSTACK_CONNECTIONS setting." % DEFAULT_ALIAS)
ImproperlyConfigured: The default alias 'default' must be included in the HAYSTACK_CONNECTIONS setting.

But the settings look alright...

edx_notes_api/notesserver/settings/common.py

HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'notesserver.highlight.ElasticsearchSearchEngine',
'URL': 'http://127.0.0.1:9200/',
'INDEX_NAME': 'notes_index',
},
}

Any ideas?

@e0d
Copy link

e0d commented Dec 15, 2015

Looks strange, can you start and Django shell with the same settings you are currently using and do:

./manage shell --settings=<whatever>.

>>> from django.conf import settings
>>> from pprint import pprint\
>>> pprint.pprint(settings.HAYSTACK_CONNECTIONS)

@mandichen
Copy link
Author

@e0d
This is what i got:

{'default': {'ENGINE': 'notesserver.highlight.ElasticsearchSearchEngine',
'INDEX_NAME': 'notes_index',
'URL': 'http://127.0.0.1:9200/'}}

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