[ckan-dev] DataStore config questions
David Raznick
kindly at gmail.com
Sun May 27 14:46:17 UTC 2012
On Sun, May 27, 2012 at 1:49 PM, Jim Craner <jim at codeforamerica.org> wrote:
> Hi everyone,
>
> I'm having some difficulties getting the DataStore feature working on
> my CKAN 1.7 / Ubuntu 10.04 LTS (package install) implementation. What
> I've done so far:
>
> * ElasticSearch is running on port 9200 (lynx localhost:9200 returns a
> json file with a 200 OK code and the ES version string)
>
> * I have nginx installed and running as a front-end for Apache2. I
> used this gist as my guide for this:
>
> https://gist.github.com/2637431
>
> Seems to be working fine -- nginx is running on 80, passing off to
> default CKAN apache on 8080.
>
> * I added the custom elastic snippet to the nginx.conf file
> referencing elasticsearch on localhost:9200
>
> * I set ckan.datastore.enabled =1 in my ckan .ini file.
>
> * I installed the latest version of ckanext-datastorer, supervisor,
> and set up the celery supervisor script
>
> -- At this point, am I missing something from the configuration?
>
> * I then uploaded a simple test.csv file resource into a test dataset,
> checking the DataStore/API option for the resource
>
> * When I visit the resource's page, the Preview section just displays
> a thin pink bar across the screen (immediately below the "Embed"
> button), just as it did before I enabled/config'ed the DataStore
>
> * When I visit <site>/api/data/<resource_id>/_search?size=5&pretty=true,
> I get the following message:
>
> "error": "IndexMissingException[[ckan-data] missing]",
> "status": 404
>
> It looks like the file upload has not worked. The index only gets created
on the first successful command.
The common error here is when uploading the file you are looking at the
nginx instance on 80 not ckan-apache on 8080. Also make sure you add a new
resource we currently do not reload when a resource changes.
You could also try a simple test of the datastore with something like.
curl -XPUT <site>/api/data/<resource_id>/1 -d '{"test":"data"}' -H
'Authorization: your-api-key'
(making sure site is the nginx site)
This will make a new record of id 1 against that resource. The search
above and preview should work now, returning '{"test":"data"}'.
If that does not work then it should give you some feedback at to why.
If that does works then could you give me the output of celeryd as it
should error if something has gone wrong with the upload.
Thanks
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120527/d525392f/attachment-0001.html>
More information about the ckan-dev
mailing list